anchor.diff:    ((search-engines (append (mapcar (lambda (engine) (apply 'make-search-engine engine))
                                      *my-search-engines*)
                              %slot-default%))))"))
  -    (:p "Note that the last search engine is the default one. For example, in
  +      (:p "Note that the last search engine is the default one. For example, in
   order to make python3 the default, the above code can be slightly modified as
   follows.")
  -    (:pre (:code "(defvar *my-search-engines*
  +      (:pre (:code "(defvar *my-search-engines*
     (list
      '(\"doi\" \"https://dx.doi.org/~a\" \"https://dx.doi.org/\")
      '(\"python3\" \"https://docs.python.org/3/search.html?q=~a\" \"https://docs.python.org/3\")))
  
positive.code: (define-configuration buffer
    ((search-engines (append %slot-default%
                             (mapcar (lambda (engine) (apply 'make-search-engine engine))
                                     *my-search-engines*)))))"))
  
      (:h3 "URL-dispatchers")
      (:p "You can configure which actions to take depending on the URL to be
  loaded.  For instance, you can configure which Torrent program to start to load
  magnet links.  See the" (:nxref :function 'url-dispatching-handler) " function
  documentation.")
  
      (:h3 "Downloads")
      (:p "See the " (command-markup 'nyxt/download-mode:list-downloads) " command and the "
          (:nxref :slot 'download-path :class-name 'buffer) " buffer slot documentation.")
  
      (:h3 "Proxy and Tor")
      (:p "See the " (:nxref :class-name 'nyxt/proxy-mode:proxy-mode) " documentation.")
  
      (:h3 "Blocker mode")
      (:p "This mode blocks access to websites related to especific hosts. To see
  all hosts being blocked, execute command " (:code "describe-variable") ", choose variable "
  (:code "NYXT/BLOCKER-MODE:*DEFAULT-HOSTLIST*") ", and read data on "
  (:code "nyxt/blocker-mode:url-body") " slot." " To customize host blocking, read the "
  (:nxref :class-name 'nyxt/blocker-mode:blocker-mode) " documentation.")
  
      (:h3 "Custom commands")
      (:p "Creating your own invocable commands is similar to creating a Common
  Lisp function, except the form is " (:code "define-command") " instead of "
  (:code "defun") ". If you want this command to be invocable outside of
          the context of a mode, use " (:code "define-command-global") ".")
      (:p "Example:")
      (:pre (:code "(define-command-global bookmark-url ()
    \"Query the user which URL to bookmark.\"
    (let ((url (prompt
                :prompt \"Bookmark URL\"
                :sources (make-instance 'prompter:raw-source))))
      (bookmark-add url)))"))
      (:p "See the " (:nxref :class-name 'prompt-buffer) " class documentation for how
  to write custom prompt-buffers.")
  
      (:h3 "Hooks")
      (:p "Hooks provide a powerful mechanism to tweak the behaviour of various
  events that occur in the context of windows, buffers, modes, etc.")
      (:p "A hook holds a list of " (:i "handlers") ".  Handlers are named and
  typed functions.  Each hook has a dedicated handler constructor.")
      (:p
       "Hooks can be 'run', that is, their handlers are run according to
  the " (:nxref :slot 'nhooks:combination :class-name 'nhooks:hook) " slot of the hook.  This combination is a function
  of the handlers.  Depending on the combination, a hook can run the handlers
  either in parallel, or in order until one fails, or even " (:i "compose")
       " them (pass the result of one as the input of the next).  The handler types
  specify which input and output values are expected.")
      (:p "To add or delete a hook, you only need to know a couple of functions:"
          (:ul
           (:li (:nxref :class-name 'nhooks:handler) " a class to wrap hook handlers in.")
           (:li (:nxref :function 'nhooks:add-hook) " (also known as "
                (:code "hooks:add-hook")
                ") allows you to add a handler to a hook,for it to be invoked when the hook fires.")
           (:li (:code "nhooks:on") " (also available as " (:code "hooks:on")
                ") as a shorthand for the " (:code "nhooks:add-hook") ".")
           (:li (:nxref :function 'nhooks:remove-hook) " (also available as "
                (:code "hooks:remove-hook") ") that removes the handler from a certain hook.")
           (:li (:code "hnooks:once-on") " (also available as " (:code "hooks:once-on")
                ") as a one-shot version of " (:code "nhooks:on")
                " that removes the handler right after it's completed.")))
      (:p "Many hooks are executed at different points in Nyxt, among others:")
      (:ul
       (:li "Global hooks, such as " (:nxref :variable '*after-init-hook*)
            " or " (:nxref :variable '*after-startup-hook*) ".")
       (:li "Window- or buffer-related hooks.")
       (:ul
        (:li (:nxref :slot 'window-make-hook :class-name 'window) " for when a new window is created.")
        (:li (:nxref :slot 'window-delete-hook :class-name 'window) " for when a window is deleted.")
        (:li (:nxref :slot 'window-set-buffer-hook :class-name 'window)
             " for when the " (:nxref :function 'current-buffer) " changes in the window.")
        (:li (:nxref :slot 'buffer-load-hook :class-name 'network-buffer)
             " for when there's a new page loading in the buffer.")
        (:li (:nxref :slot 'buffer-loaded-hook :class-name 'network-buffer)
             " for when this page is mostly done loading (some scripts/image/styles may not
  be fully loaded yet, so you may need to wait a bit after it fires.)")
        (:li (:nxref :slot 'request-resource-hook :class-name 'network-buffer)
             " for when a new request happens. Allows redirecting and blocking requests, and
  is a good place to do something conditioned on the links being loaded.")
        (:li (:nxref :slot 'prompt-buffer-ready-hook :class-name 'prompt-buffer)
             " fires when the prompt buffer is ready for user input. You may need to call "
             (:nxref :function 'prompter:all-ready-p)
             " on the prompt to ensure all the sources it contains are ready too, and then
  you can safely set new inputs and select the necessary suggestions."))
       (:li "Commands :before and :after methods.")
       (:ul
        (:li "Try, for example, "
             (:code "(defmethod set-url :after (&key (prefill-current-url-p t)) ...)")
             " to do something after the set-url finishes executing."))
       (:li "Modes 'enable' and 'disable' methods and their :before, :after, and :around methods."))
      (:p "For instance, if you want to force 'old.reddit.com' over 'www.reddit.com', you
  can set a hook like the following in your configuration file:")
      (:pre (:code "(defun old-reddit-handler (request-data)
    (let ((url (url request-data)))
      (setf (url request-data)
            (if (search \"reddit.com\" (quri:uri-host url))
  
negative.code: \(define-configuration web-buffer
    ((request-resource-hook
      (hooks:add-hook %slot-default% 'old-reddit-handler))))"))
        (:p "(See " (:nxref :function 'url-dispatching-handler)
            " for a simpler way to achieve the same result.)")
        (:p "Or, if you want to set multiple handlers at once,")
        (:pre (:code "(define-configuration web-buffer
    ((request-resource-hook
      (reduce #'hooks:add-hook
              '(old-reddit-handler auto-proxy-handler)
              :initial-value %slot-default%))))"))
        (:p "Some hooks like the above example expect a return value, so it's
  important to make sure we return " (:nxref :class-name 'request-data) " here.  See the
  documentation of the respective hooks for more details."))
  
       (:section
        :id "data-paths"
        (:h3 "Data paths and data profiles")
        (:p "Nyxt provides a uniform configuration interface for all data files
  persisted to disk (bookmarks, cookies, etc.).  To each file corresponds
  a " (:nxref :class-name 'nyxt-file) " object. An " (:nxref :class-name 'nyxt-profile) " is a
  customizable object that helps define general rules for data storage.  Both
  nyxt-file and nyxt-profile compose, so it's possible to define general rules
  for all files (even for those not known in advance) while it's also
  possible to specialize some data given an nyxt-profile.")
        (:p "The profile can be set from command line and from the
  configuration file."
            "You can list all known profiles (including the user-defined
  profiles) with the " (:code "--list-profiles") " command-line option.")
        (:p "The nyxt-files can be passed a hint from the "
            (:code "--with-file") " command line option, but each nyxt-file and
  profile rules are free to ignore it.")
        (:p "When a path ends with the " (:code ".gpg") " extension, by default your
  GnuPG key is used to decrypt and encrypt the file transparently.  Refer to the
  GnuPG documentation for how to set it up.")
        (:p "Note that the socket and the initialization nyxt-paths cannot be set in
  your configuration (the socket is used before the initialization file is
  loaded).  Instead you can specify these paths from their respective command-line
  option.  You can instantiate a unique, separate Nyxt instance when you provide a
  new socket path.  This is particularly useful in combination with profiles,
  say to develop Nyxt or extensions.")
        (:p "Example to create a development profile that stores all data in "
            (:code "/tmp/nyxt") " and stores bookmark in an encrypted file:")
        (:pre (:code "(define-class dev-profile (nyxt-profile)
     ((files:name :initform \"nyxt-dev\"))
     (:documentation \"Development profile.\"))
  
  