mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
(help-xref-on-pp): Check for constant symbols.
This commit is contained in:
parent
3e8b2a018f
commit
820ad5e7e3
2 changed files with 13 additions and 3 deletions
12
lisp/help.el
12
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))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue