mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-03-06 05:52:32 -08:00
(widget-documentation-link-action):
Use describe-function or describe-variable in simple cases.
This commit is contained in:
parent
944c91b6b3
commit
9dccd7efe5
1 changed files with 7 additions and 1 deletions
|
|
@ -2637,7 +2637,13 @@ when he invoked the menu."
|
|||
|
||||
(defun widget-documentation-link-action (widget &optional event)
|
||||
"Run apropos on WIDGET's value. Ignore optional argument EVENT."
|
||||
(apropos (concat "\\`" (regexp-quote (widget-get widget :value)) "\\'")))
|
||||
(let* ((string (widget-get widget :value))
|
||||
(symbol (intern string)))
|
||||
(if (and (fboundp symbol) (boundp symbol))
|
||||
(apropos (concat "\\`" (regexp-quote string) "\\'"))
|
||||
(if (fboundp symbol)
|
||||
(describe-function symbol)
|
||||
(describe-variable symbol)))))
|
||||
|
||||
(defcustom widget-documentation-links t
|
||||
"Add hyperlinks to documentation strings when non-nil."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue