changeset 18365:ceb9388fe67f

(widget-documentation-link-action): Use describe-function or describe-variable in simple cases.
author Richard M. Stallman <rms@gnu.org>
date Sat, 21 Jun 1997 17:30:26 +0000
parents 01666331d10f
children 2aaa07c43738
files lisp/wid-edit.el
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/wid-edit.el	Sat Jun 21 12:48:00 1997 +0000
+++ b/lisp/wid-edit.el	Sat Jun 21 17:30:26 1997 +0000
@@ -2637,7 +2637,13 @@
 
 (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."