anchor.diff:                       (hooks:run-hook ,after-hook)))
                  (nyxt-condition (c)
                    (format t "~s" c)))))
  -         ;; Overwrite previous command:
  -         (setf *command-list* (delete ',name *command-list* :key #'name))
  -         (push (make-instance 'command
  -                              :name ',name
  -                              :docstring ,documentation
  -                              :fn (symbol-function ',name)
  -                              :sexp '(define-command (,@arglist) ,@body))
  -               *command-list*)))))
  +         (let ((new-command (make-instance 'command
  +                                           :name ',name
  +                                           :docstring ,documentation
  +                                           :fn (symbol-function ',name)
  +                                           :sexp '(define-command (,@arglist) ,@body)
  +                                           :global-p ,global-p)))
  +           (unless ,deprecated-p
  +             ;; Overwrite previous command:
  +             (setf *command-list* (delete ',name *command-list* :key #'name))
  +             (push new-command
  +                   *command-list*))
  +           new-command)))))
  +
  +(export-always 'define-command)
  +(defmacro define-command (name (&rest arglist) &body body)
  +  `(%define-command ,name () (,@arglist) ,@body))
   
   (export-always 'define-command-global)
   (defmacro define-command-global (name (&rest arglist) &body body)
  
positive.code:        ,(documentation function-symbol 'function)
         (,function-symbol (first arg-list)))))
  
  (export-always 'define-command)
  (defmacro define-command (name (&rest arglist) &body body)
    "Define new command NAME.
  `define-command' has a syntax similar to `defun'.
  ARGLIST must be a list of optional arguments or key arguments.
  
negative.code: This means it will be listed in `command-source' when the global option is on.
  This is mostly useful for third-party packages to define globally-accessible
  commands without polluting Nyxt packages."
    `(%define-command ,name (:global-p t) (,@arglist) ,@body))
  
  ;; TODO: Should `define-deprecated-command' report the version number of deprecation?
  ;; Maybe OK to just remove all deprecated commands on major releases.
  