diff options
| author | Richard M. Stallman | 1997-06-21 17:30:26 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-06-21 17:30:26 +0000 |
| commit | 9dccd7efe5de031a6eeb976be41d9479695e39ad (patch) | |
| tree | 20a667350dcb3a8a7b952a2ddf8887272083739c | |
| parent | 944c91b6b349b73876522664c736fa01dab9d9eb (diff) | |
| download | emacs-9dccd7efe5de031a6eeb976be41d9479695e39ad.tar.gz emacs-9dccd7efe5de031a6eeb976be41d9479695e39ad.zip | |
(widget-documentation-link-action):
Use describe-function or describe-variable in simple cases.
| -rw-r--r-- | lisp/wid-edit.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index f7926ba3d45..ec9fdcdc596 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -2637,7 +2637,13 @@ when he invoked the menu." | |||
| 2637 | 2637 | ||
| 2638 | (defun widget-documentation-link-action (widget &optional event) | 2638 | (defun widget-documentation-link-action (widget &optional event) |
| 2639 | "Run apropos on WIDGET's value. Ignore optional argument EVENT." | 2639 | "Run apropos on WIDGET's value. Ignore optional argument EVENT." |
| 2640 | (apropos (concat "\\`" (regexp-quote (widget-get widget :value)) "\\'"))) | 2640 | (let* ((string (widget-get widget :value)) |
| 2641 | (symbol (intern string))) | ||
| 2642 | (if (and (fboundp symbol) (boundp symbol)) | ||
| 2643 | (apropos (concat "\\`" (regexp-quote string) "\\'")) | ||
| 2644 | (if (fboundp symbol) | ||
| 2645 | (describe-function symbol) | ||
| 2646 | (describe-variable symbol))))) | ||
| 2641 | 2647 | ||
| 2642 | (defcustom widget-documentation-links t | 2648 | (defcustom widget-documentation-links t |
| 2643 | "Add hyperlinks to documentation strings when non-nil." | 2649 | "Add hyperlinks to documentation strings when non-nil." |