mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Fix Elisp's elisp--documentation-one-liner (bug#43609)
To be backward compatible, this function must return nil when there is a symbol at point but no documentation for it. Before this fixed it returned the string "<symbol-name>: nil". * lisp/progmodes/elisp-mode.el (elisp--documentation-one-liner): Check callback actually produced non-nil doc.
This commit is contained in:
parent
4e2264b60d
commit
95f7a2835a
1 changed files with 7 additions and 6 deletions
|
|
@ -1416,12 +1416,13 @@ which see."
|
|||
(defun elisp--documentation-one-liner ()
|
||||
(let* (str
|
||||
(callback (lambda (doc &rest plist)
|
||||
(setq str
|
||||
(format "%s: %s"
|
||||
(propertize (prin1-to-string
|
||||
(plist-get plist :thing))
|
||||
'face (plist-get plist :face))
|
||||
doc)))))
|
||||
(when doc
|
||||
(setq str
|
||||
(format "%s: %s"
|
||||
(propertize (prin1-to-string
|
||||
(plist-get plist :thing))
|
||||
'face (plist-get plist :face))
|
||||
doc))))))
|
||||
(or (progn (elisp-eldoc-var-docstring callback) str)
|
||||
(progn (elisp-eldoc-funcall callback) str))))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue