mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-11 09:20:51 +00:00
Put advice documentation at the end of the displayed doc string
* lisp/emacs-lisp/nadvice.el (advice--make-docstring): Put the advice things at the end of the documentation (bug#50222). It's important to have the first line of the original documentation remain the first line, because it's used when doing one-line summaries of the function.
This commit is contained in:
parent
d0693617b8
commit
61323c6d76
@ -119,7 +119,6 @@ Each element has the form (WHERE BYTECODE STACK) where:
|
||||
(or doc "No documentation")))))
|
||||
"\n")))
|
||||
(setq flist (advice--cdr flist)))
|
||||
(if docstring (setq docstring (concat docstring "\n")))
|
||||
(unless docfun (setq docfun flist))
|
||||
(let* ((origdoc (unless (eq function docfun) ;Avoid inf-loops.
|
||||
(documentation docfun t)))
|
||||
@ -131,7 +130,12 @@ Each element has the form (WHERE BYTECODE STACK) where:
|
||||
(if (stringp arglist) t
|
||||
(help--make-usage-docstring function arglist)))
|
||||
(setq origdoc (cdr usage)) (car usage)))
|
||||
(help-add-fundoc-usage (concat docstring origdoc) usage))))
|
||||
(help-add-fundoc-usage (concat origdoc
|
||||
(if (string-suffix-p "\n" origdoc)
|
||||
"\n"
|
||||
"\n\n")
|
||||
docstring)
|
||||
usage))))
|
||||
|
||||
(defun advice-eval-interactive-spec (spec)
|
||||
"Evaluate the interactive spec SPEC."
|
||||
|
Loading…
Reference in New Issue
Block a user