diff options
author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-13 17:48:53 +0200 |
---|---|---|
committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-07-13 17:48:53 +0200 |
commit | 196ea8c4b3ff20c41b8202a1cce746ca54232cbd (patch) | |
tree | 20e905667363849ba0b641945cdb9920f08527ab /lisp/emacs-lisp | |
parent | 6c6e4e822847b148b759a4725ae46ad832c52882 (diff) | |
download | emacs-196ea8c4b3ff20c41b8202a1cce746ca54232cbd.tar.gz emacs-196ea8c4b3ff20c41b8202a1cce746ca54232cbd.tar.bz2 emacs-196ea8c4b3ff20c41b8202a1cce746ca54232cbd.zip |
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.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/nadvice.el | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index b0dd03edfd5..b7c2dab0980 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -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))) |