mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-13 03:06:23 -08:00
shortdoc: Don't burp on missing docstrings
* lisp/emacs-lisp/shortdoc.el (shortdoc--display-function): Report missing docstrings more cleanly than "Wrong type argument: stringp, nil".
This commit is contained in:
parent
1396b373ff
commit
f73cb8fba2
1 changed files with 3 additions and 1 deletions
|
|
@ -1707,7 +1707,9 @@ function's documentation in the Info manual"))
|
|||
;; Doc string.
|
||||
(insert " "
|
||||
(or (plist-get data :doc)
|
||||
(car (split-string (documentation function) "\n"))))
|
||||
(car (split-string (or (documentation function)
|
||||
"Error: missing docstring.")
|
||||
"\n"))))
|
||||
(insert "\n")
|
||||
(add-face-text-property start-section (point) 'shortdoc-section t)
|
||||
(let ((print-escape-newlines t)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue