]> code.delx.au - gnu-emacs/blobdiff - lisp/wid-edit.el
Merge branch 'master' into cairo
[gnu-emacs] / lisp / wid-edit.el
index 04a900f23c095f2dbfb7311f12def2ddc5ba4a06..0a9578391e0e686da7644d66667e3b444983fd40 100644 (file)
@@ -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."