[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 95f7a28: Fix Elisp's elisp--documentation-one-liner (bug#43609)
From: |
João Távora |
Subject: |
master 95f7a28: Fix Elisp's elisp--documentation-one-liner (bug#43609) |
Date: |
Mon, 2 Nov 2020 11:26:07 -0500 (EST) |
branch: master
commit 95f7a2835a79c1f12b5dc86230405e8040910c72
Author: João Távora <joaotavora@gmail.com>
Commit: João Távora <joaotavora@gmail.com>
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.
---
lisp/progmodes/elisp-mode.el | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index ce2b924..12788ea 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -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))))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 95f7a28: Fix Elisp's elisp--documentation-one-liner (bug#43609),
João Távora <=