X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/0479a1b62ceeb9586168146e2c8f49f2a5ebaf2f..6445ee0fb751ae2c1dfef900d44721b3d952812f:/lisp/wid-edit.el diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 04a900f23c..0a9578391e 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -2846,9 +2846,17 @@ The following properties have special meanings for this widget: (if (and (fboundp symbol) (boundp symbol)) ;; If there are two doc strings, give the user a way to pick one. (apropos (concat "\\`" (regexp-quote string) "\\'")) - (if (fboundp symbol) - (describe-function symbol) - (describe-variable symbol))))) + (cond + ((fboundp symbol) + (describe-function symbol)) + ((facep symbol) + (describe-face symbol)) + ((featurep symbol) + (describe-package symbol)) + ((or (boundp symbol) (get symbol 'variable-documentation)) + (describe-variable symbol)) + (t + (message "No documentation available for %s" symbol)))))) (defcustom widget-documentation-links t "Add hyperlinks to documentation strings when non-nil."