From: Dave Love Date: Tue, 2 May 2000 10:40:37 +0000 (+0000) Subject: (help-xref-on-pp): Check for constant symbols. X-Git-Tag: emacs-pretest-21.0.90~4085 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=820ad5e7e34dc1eaa9b84cbaa46c8db03b581c98;p=emacs.git (help-xref-on-pp): Check for constant symbols. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 8b8bb650ef2..9433f964645 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2000-05-02 Dave Love + + * help.el (help-xref-on-pp): Check for constant symbols. + 2000-04-29 Gerd Moellmann * 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." ((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))))