aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Love2000-05-02 10:40:37 +0000
committerDave Love2000-05-02 10:40:37 +0000
commit820ad5e7e34dc1eaa9b84cbaa46c8db03b581c98 (patch)
treeb726ca0bea42f1b55bfd2e5e3a88dbe298cabd28
parent3e8b2a018fb8850195f2989f431092402b9a7ffc (diff)
downloademacs-820ad5e7e34dc1eaa9b84cbaa46c8db03b581c98.tar.gz
emacs-820ad5e7e34dc1eaa9b84cbaa46c8db03b581c98.zip
(help-xref-on-pp): Check for constant symbols.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/help.el12
2 files changed, 13 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b8bb650ef2..9433f964645 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12000-05-02 Dave Love <fx@gnu.org>
2
3 * help.el (help-xref-on-pp): Check for constant symbols.
4
12000-04-29 Gerd Moellmann <gerd@gnu.org> 52000-04-29 Gerd Moellmann <gerd@gnu.org>
2 6
3 * startup.el (normal-top-level): Put a condition-case around 7 * startup.el (normal-top-level): Put a condition-case around
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."
766 ((looking-at "#<") (search-forward ">" nil 'move)) 766 ((looking-at "#<") (search-forward ">" nil 'move))
767 ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)") 767 ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)")
768 (let* ((sym (intern-soft 768 (let* ((sym (intern-soft
769 (buffer-substring (match-beginning 1) (match-end 1)))) 769 (buffer-substring (match-beginning 1)
770 (match-end 1))))
770 (fn (cond ((fboundp sym) #'describe-function) 771 (fn (cond ((fboundp sym) #'describe-function)
771 ((and sym (boundp sym)) #'describe-variable)))) 772 ((or (memq sym '(t nil))
773 (keywordp sym))
774 nil)
775 ((and sym (boundp sym))
776 #'describe-variable))))
772 (when fn (help-xref-button 1 fn sym))) 777 (when fn (help-xref-button 1 fn sym)))
773 (goto-char (match-end 1))) 778 (goto-char (match-end 1)))
774 (t (forward-char 1)))))) 779 (t (forward-char 1))))))
@@ -782,7 +787,8 @@ Returns the documentation as a string, also."
782 (enable-recursive-minibuffers t) 787 (enable-recursive-minibuffers t)
783 val) 788 val)
784 (setq val (completing-read (if (symbolp v) 789 (setq val (completing-read (if (symbolp v)
785 (format "Describe variable (default %s): " v) 790 (format
791 "Describe variable (default %s): " v)
786 "Describe variable: ") 792 "Describe variable: ")
787 obarray 'boundp t nil nil 793 obarray 'boundp t nil nil
788 (if (symbolp v) (symbol-name v)))) 794 (if (symbolp v) (symbol-name v))))