diff options
| author | Stefan Monnier | 2026-02-04 10:59:23 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2026-02-04 10:59:23 -0500 |
| commit | f73cb8fba211bb47d7b992ef8a94f9987bdd31e0 (patch) | |
| tree | 1cbcfa400605eedacb9627b28d062951d6a33fd1 | |
| parent | 1396b373ff7a947cd6e897a99cdcadd901a3ae03 (diff) | |
| download | emacs-f73cb8fba211bb47d7b992ef8a94f9987bdd31e0.tar.gz emacs-f73cb8fba211bb47d7b992ef8a94f9987bdd31e0.zip | |
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".
| -rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 70583e08dbd..8b382bd14dd 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el | |||
| @@ -1707,7 +1707,9 @@ function's documentation in the Info manual")) | |||
| 1707 | ;; Doc string. | 1707 | ;; Doc string. |
| 1708 | (insert " " | 1708 | (insert " " |
| 1709 | (or (plist-get data :doc) | 1709 | (or (plist-get data :doc) |
| 1710 | (car (split-string (documentation function) "\n")))) | 1710 | (car (split-string (or (documentation function) |
| 1711 | "Error: missing docstring.") | ||
| 1712 | "\n")))) | ||
| 1711 | (insert "\n") | 1713 | (insert "\n") |
| 1712 | (add-face-text-property start-section (point) 'shortdoc-section t) | 1714 | (add-face-text-property start-section (point) 'shortdoc-section t) |
| 1713 | (let ((print-escape-newlines t) | 1715 | (let ((print-escape-newlines t) |