# HG changeset patch # User Richard M. Stallman # Date 866914226 0 # Node ID ceb9388fe67f4919e04ff471f1ab6676fcec83ba # Parent 01666331d10f53e9149aab4629369279478c8364 (widget-documentation-link-action): Use describe-function or describe-variable in simple cases. diff -r 01666331d10f -r ceb9388fe67f lisp/wid-edit.el --- 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."