mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-24 22:07:36 +00:00
Tweak output of doc in advice--make-docstring
* lisp/emacs-lisp/nadvice.el (advice--make-docstring): Make the bit about the function/macro having an advice into a complete sentence (bug#31063) and make it less dramatic.
This commit is contained in:
parent
6c6e4e8228
commit
196ea8c4b3
1 changed files with 6 additions and 4 deletions
|
|
@ -87,8 +87,9 @@ Each element has the form (WHERE BYTECODE STACK) where:
|
|||
"Build the raw docstring for FUNCTION, presumably advised."
|
||||
(let* ((flist (indirect-function function))
|
||||
(docfun nil)
|
||||
(macrop (eq 'macro (car-safe flist)))
|
||||
(docstring nil))
|
||||
(if (eq 'macro (car-safe flist)) (setq flist (cdr flist)))
|
||||
(if macrop (setq flist (cdr flist)))
|
||||
(while (advice--p flist)
|
||||
(let ((doc (aref flist 4))
|
||||
(where (advice--where flist)))
|
||||
|
|
@ -100,10 +101,11 @@ Each element has the form (WHERE BYTECODE STACK) where:
|
|||
(setq docstring
|
||||
(concat
|
||||
docstring
|
||||
(propertize (format "%s advice: " where)
|
||||
'face 'warning)
|
||||
(format "This %s has %s advice: "
|
||||
(if macrop "macro" "function")
|
||||
where)
|
||||
(let ((fun (advice--car flist)))
|
||||
(if (symbolp fun) (format-message "`%S'" fun)
|
||||
(if (symbolp fun) (format-message "`%S'." fun)
|
||||
(let* ((name (cdr (assq 'name (advice--props flist))))
|
||||
(doc (documentation fun t))
|
||||
(usage (help-split-fundoc doc function)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue