summaryrefslogtreecommitdiff
path: root/lisp/apropos.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-04-12 18:49:35 +0000
committerRichard M. Stallman <rms@gnu.org>1997-04-12 18:49:35 +0000
commitb1a2c6fbe4f785b450ed660f18be0b6b4fbb75f4 (patch)
treed177f790ad8f0ee35d94716f5a08e9ddde2ca9c2 /lisp/apropos.el
parentf614c847a0feb25a47c8119665dcf70ea50e1705 (diff)
downloademacs-b1a2c6fbe4f785b450ed660f18be0b6b4fbb75f4.tar.gz
(apropos): Add support for faces, widgets, and user options.
(apropos-print): Ditto.
Diffstat (limited to 'lisp/apropos.el')
-rw-r--r--lisp/apropos.el24
1 files changed, 21 insertions, 3 deletions
diff --git a/lisp/apropos.el b/lisp/apropos.el
index 977255bbf20..aadf72d910a 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -181,6 +181,7 @@ Returns list of symbols and documentation found."
(lambda (symbol)
(or (fboundp symbol)
(boundp symbol)
+ (facep symbol)
(symbol-plist symbol))))))
(apropos-print
(or do-all apropos-do-all)
@@ -202,7 +203,19 @@ Returns list of symbols and documentation found."
(setq doc (list (car properties)))
(while (setq properties (cdr (cdr properties)))
(setq doc (cons (car properties) doc)))
- (mapconcat #'symbol-name (nreverse doc) " "))))
+ (mapconcat #'symbol-name (nreverse doc) " "))
+ (when (get symbol 'widget-type)
+ (if (setq doc (documentation-property
+ symbol 'widget-documentation t))
+ (substring doc 0
+ (string-match "\n" doc))
+ "(not documented)"))
+ (when (facep symbol)
+ (if (setq doc (documentation-property
+ symbol 'face-documentation t))
+ (substring doc 0
+ (string-match "\n" doc))
+ "(not documented)"))))
(setq p (cdr p)))))
nil))
@@ -517,8 +530,13 @@ found."
"Macro"
"Function"))
do-keys)
- (apropos-print-doc 'describe-variable 2
- "Variable" do-keys)
+ (if (get symbol 'custom-type)
+ (apropos-print-doc 'customize-variable-other-window 2
+ "User Option" do-keys)
+ (apropos-print-doc 'describe-variable 2
+ "Variable" do-keys))
+ (apropos-print-doc 'customize-face-other-window 5 "Face" do-keys)
+ (apropos-print-doc 'widget-browse-other-window 4 "Widget" do-keys)
(apropos-print-doc 'apropos-describe-plist 3
"Plist" nil)))))
(prog1 apropos-accumulator