aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1997-03-17 09:54:01 +0000
committerKarl Heuer1997-03-17 09:54:01 +0000
commitd69e3b68e663e871f45539b9feb9a4a232a0b9b4 (patch)
tree094db46bc79946f4d57c8c3938aa3431d8ab110e
parent2dd5c7f71a5584db1c61c0b59ac922a075296c14 (diff)
downloademacs-d69e3b68e663e871f45539b9feb9a4a232a0b9b4.tar.gz
emacs-d69e3b68e663e871f45539b9feb9a4a232a0b9b4.zip
(apropos): Print all property symbols.
-rw-r--r--lisp/apropos.el30
1 files changed, 15 insertions, 15 deletions
diff --git a/lisp/apropos.el b/lisp/apropos.el
index adbc13d0b7d..977255bbf20 100644
--- a/lisp/apropos.el
+++ b/lisp/apropos.el
@@ -185,24 +185,24 @@ Returns list of symbols and documentation found."
185 (apropos-print 185 (apropos-print
186 (or do-all apropos-do-all) 186 (or do-all apropos-do-all)
187 (lambda (p) 187 (lambda (p)
188 (let (symbol doc) 188 (let (symbol doc properties)
189 (while p 189 (while p
190 (setcar p (list 190 (setcar p (list
191 (setq symbol (car p)) 191 (setq symbol (car p))
192 (if (fboundp symbol) 192 (when (fboundp symbol)
193 (if (setq doc (documentation symbol t)) 193 (if (setq doc (documentation symbol t))
194 (substring doc 0 (string-match "\n" doc)) 194 (substring doc 0 (string-match "\n" doc))
195 "(not documented)")) 195 "(not documented)"))
196 (if (boundp symbol) 196 (when (boundp symbol)
197 (if (setq doc (documentation-property 197 (if (setq doc (documentation-property
198 symbol 'variable-documentation t)) 198 symbol 'variable-documentation t))
199 (substring doc 0 199 (substring doc 0 (string-match "\n" doc))
200 (string-match "\n" doc)) 200 "(not documented)"))
201 "(not documented)")) 201 (when (setq properties (symbol-plist symbol))
202 (if (setq doc (symbol-plist symbol)) 202 (setq doc (list (car properties)))
203 (if (eq (/ (length doc) 2) 1) 203 (while (setq properties (cdr (cdr properties)))
204 (format "1 property (%s)" (car doc)) 204 (setq doc (cons (car properties) doc)))
205 (concat (/ (length doc) 2) " properties"))))) 205 (mapconcat #'symbol-name (nreverse doc) " "))))
206 (setq p (cdr p))))) 206 (setq p (cdr p)))))
207 nil)) 207 nil))
208 208