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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user