summaryrefslogtreecommitdiff
path: root/lisp/help.el
diff options
context:
space:
mode:
authorDave Love <fx@gnu.org>2000-05-02 10:40:04 +0000
committerDave Love <fx@gnu.org>2000-05-02 10:40:04 +0000
commit55a66115dd86053f11b93e26bb29670b0de29031 (patch)
tree6566c0b0811c701f889f87c62198d72f0fd6fa2a /lisp/help.el
parent349f571bb2e93a8cb6784809cd3a9407c8b4a123 (diff)
downloademacs-55a66115dd86053f11b93e26bb29670b0de29031.tar.gz
(help-xref-on-pp): Check for constant symbols.
Diffstat (limited to 'lisp/help.el')
-rw-r--r--lisp/help.el12
1 files changed, 9 insertions, 3 deletions
diff --git a/lisp/help.el b/lisp/help.el
index 6e343c03ce6..6b4b65ef6da 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -766,9 +766,14 @@ Return 0 if there is no such symbol."
((looking-at "#<") (search-forward ">" nil 'move))
((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)")
(let* ((sym (intern-soft
- (buffer-substring (match-beginning 1) (match-end 1))))
+ (buffer-substring (match-beginning 1)
+ (match-end 1))))
(fn (cond ((fboundp sym) #'describe-function)
- ((and sym (boundp sym)) #'describe-variable))))
+ ((or (memq sym '(t nil))
+ (keywordp sym))
+ nil)
+ ((and sym (boundp sym))
+ #'describe-variable))))
(when fn (help-xref-button 1 fn sym)))
(goto-char (match-end 1)))
(t (forward-char 1))))))
@@ -782,7 +787,8 @@ Returns the documentation as a string, also."
(enable-recursive-minibuffers t)
val)
(setq val (completing-read (if (symbolp v)
- (format "Describe variable (default %s): " v)
+ (format
+ "Describe variable (default %s): " v)
"Describe variable: ")
obarray 'boundp t nil nil
(if (symbolp v) (symbol-name v))))