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.
(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))))