(kill-comment): Fixed by rewriting it with syntax-tables rather than regexps
[emacs.git] / lisp / apropos.el
blob19a8aab206b04bb0dd9f719b045fe0e0b74d2d45
1 ;;; apropos.el --- apropos commands for users and programmers.
3 ;; Copyright (C) 1989, 1994, 1995 Free Software Foundation, Inc.
5 ;; Author: Joe Wells <jbw@bigbird.bu.edu>
6 ;; Rewritten: Daniel Pfeiffer <occitan@esperanto.org>
7 ;; Keywords: help
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software; you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation; either version 2, or (at your option)
14 ;; any later version.
16 ;; GNU Emacs is distributed in the hope that it will be useful,
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 ;; GNU General Public License for more details.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
23 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
26 ;;; Commentary:
28 ;; The ideas for this package were derived from the C code in
29 ;; src/keymap.c and elsewhere. The functions in this file should
30 ;; always be byte-compiled for speed. Someone should rewrite this in
31 ;; C (as part of src/keymap.c) for speed.
33 ;; The idea for super-apropos is based on the original implementation
34 ;; by Lynn Slater <lrs@esl.com>.
36 ;; History:
37 ;; Fixed bug, current-local-map can return nil.
38 ;; Change, doesn't calculate key-bindings unless needed.
39 ;; Added super-apropos capability, changed print functions.
40 ;;; Made fast-apropos and super-apropos share code.
41 ;;; Sped up fast-apropos again.
42 ;; Added apropos-do-all option.
43 ;;; Added fast-command-apropos.
44 ;; Changed doc strings to comments for helping functions.
45 ;;; Made doc file buffer read-only, buried it.
46 ;; Only call substitute-command-keys if do-all set.
48 ;; Optionally use configurable faces to make the output more legible.
49 ;; Differentiate between command, function and macro.
50 ;; Apropos-command (ex command-apropos) does cmd and optionally user var.
51 ;; Apropos shows all 3 aspects of symbols (fn, var and plist)
52 ;; Apropos-documentation (ex super-apropos) now finds all it should.
53 ;; New apropos-value snoops through all values and optionally plists.
54 ;; Reading DOC file doesn't load nroff.
55 ;; Added hypertext following of documentation, mouse-2 on variable gives value
56 ;; from buffer in active window.
58 ;;; Code:
60 (defgroup apropos nil
61 "Apropos commands for users and programmers"
62 :group 'help
63 :prefix "apropos")
65 ;; I see a degradation of maybe 10-20% only.
66 (defcustom apropos-do-all nil
67 "*Whether the apropos commands should do more.
69 Slows them down more or less. Set this non-nil if you have a fast machine."
70 :group 'apropos
71 :type 'boolean)
74 (defcustom apropos-symbol-face 'bold
75 "*Face for symbol name in Apropos output, or nil for none."
76 :group 'apropos
77 :type 'face)
79 (defcustom apropos-keybinding-face 'underline
80 "*Face for lists of keybinding in Apropos output, or nil for none."
81 :group 'apropos
82 :type 'face)
84 (defcustom apropos-label-face 'italic
85 "*Face for label (`Command', `Variable' ...) in Apropos output.
86 A value of nil means don't use any special font for them, and also
87 turns off mouse highlighting."
88 :group 'apropos
89 :type 'face)
91 (defcustom apropos-property-face 'bold-italic
92 "*Face for property name in apropos output, or nil for none."
93 :group 'apropos
94 :type 'face)
96 (defcustom apropos-match-face 'secondary-selection
97 "*Face for matching text in Apropos documentation/value, or nil for none.
98 This applies when you look for matches in the documentation or variable value
99 for the regexp; the part that matches gets displayed in this font."
100 :group 'apropos
101 :type 'face)
104 (defvar apropos-mode-map
105 (let ((map (make-sparse-keymap)))
106 (define-key map "\C-m" 'apropos-follow)
107 (define-key map " " 'scroll-up)
108 (define-key map "\177" 'scroll-down)
109 (define-key map "q" 'quit-window)
110 (define-key map [mouse-2] 'apropos-mouse-follow)
111 (define-key map [down-mouse-2] nil)
112 map)
113 "Keymap used in Apropos mode.")
116 (defvar apropos-regexp nil
117 "Regexp used in current apropos run.")
119 (defvar apropos-files-scanned ()
120 "List of elc files already scanned in current run of `apropos-documentation'.")
122 (defvar apropos-accumulator ()
123 "Alist of symbols already found in current apropos run.")
125 (defvar apropos-item ()
126 "Current item in or for apropos-accumulator.")
128 (defun apropos-mode ()
129 "Major mode for following hyperlinks in output of apropos commands.
131 \\{apropos-mode-map}"
132 (interactive)
133 (kill-all-local-variables)
134 (use-local-map apropos-mode-map)
135 (setq major-mode 'apropos-mode
136 mode-name "Apropos"))
138 ;;;###autoload
139 (defun apropos-variable (regexp &optional do-all)
140 "Show user variables that match REGEXP.
141 With optional prefix ARG or if `apropos-do-all' is non-nil, also show
142 normal variables."
143 (interactive (list (read-string
144 (concat "Apropos "
145 (if (or current-prefix-arg apropos-do-all)
146 "variable"
147 "user option")
148 " (regexp): "))
149 current-prefix-arg))
150 (apropos-command regexp nil
151 (if (or do-all apropos-do-all)
152 #'(lambda (symbol)
153 (and (boundp symbol)
154 (get symbol 'variable-documentation)))
155 'user-variable-p)))
157 ;; For auld lang syne:
158 ;;;###autoload
159 (fset 'command-apropos 'apropos-command)
160 ;;;###autoload
161 (defun apropos-command (apropos-regexp &optional do-all var-predicate)
162 "Show commands (interactively callable functions) that match REGEXP.
163 With optional prefix ARG, or if `apropos-do-all' is non-nil, also show
164 noninteractive functions.
166 If VAR-PREDICATE is non-nil, show only variables, and only those that
167 satisfy the predicate VAR-PREDICATE."
168 (interactive (list (read-string (concat
169 "Apropos command "
170 (if (or current-prefix-arg
171 apropos-do-all)
172 "or function ")
173 "(regexp): "))
174 current-prefix-arg))
175 (let ((message
176 (let ((standard-output (get-buffer-create "*Apropos*")))
177 (print-help-return-message 'identity))))
178 (or do-all (setq do-all apropos-do-all))
179 (setq apropos-accumulator
180 (apropos-internal apropos-regexp
181 (or var-predicate
182 (if do-all 'functionp 'commandp))))
183 (let ((tem apropos-accumulator))
184 (while tem
185 (if (get (car tem) 'apropos-inhibit)
186 (setq apropos-accumulator (delq (car tem) apropos-accumulator)))
187 (setq tem (cdr tem))))
188 (let ((p apropos-accumulator)
189 doc symbol)
190 (while p
191 (setcar p (list
192 (setq symbol (car p))
193 (unless var-predicate
194 (if (functionp symbol)
195 (if (setq doc (documentation symbol t))
196 (substring doc 0 (string-match "\n" doc))
197 "(not documented)")))
198 (and var-predicate
199 (funcall var-predicate symbol)
200 (if (setq doc (documentation-property
201 symbol 'variable-documentation t))
202 (substring doc 0
203 (string-match "\n" doc))))))
204 (setq p (cdr p))))
205 (and (apropos-print t nil)
206 message
207 (message message))))
210 ;;;###autoload
211 (defun apropos (apropos-regexp &optional do-all)
212 "Show all bound symbols whose names match REGEXP.
213 With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound
214 symbols and key bindings, which is a little more time-consuming.
215 Returns list of symbols and documentation found."
216 (interactive "sApropos symbol (regexp): \nP")
217 (setq apropos-accumulator
218 (apropos-internal apropos-regexp
219 (and (not do-all)
220 (not apropos-do-all)
221 (lambda (symbol)
222 (or (fboundp symbol)
223 (boundp symbol)
224 (facep symbol)
225 (symbol-plist symbol))))))
226 (let ((tem apropos-accumulator))
227 (while tem
228 (if (get (car tem) 'apropos-inhibit)
229 (setq apropos-accumulator (delq (car tem) apropos-accumulator)))
230 (setq tem (cdr tem))))
231 (let ((p apropos-accumulator)
232 symbol doc properties)
233 (while p
234 (setcar p (list
235 (setq symbol (car p))
236 (when (fboundp symbol)
237 (if (setq doc (condition-case nil
238 (documentation symbol t)
239 (void-function
240 "(alias for undefined function)")))
241 (substring doc 0 (string-match "\n" doc))
242 "(not documented)"))
243 (when (boundp symbol)
244 (if (setq doc (documentation-property
245 symbol 'variable-documentation t))
246 (substring doc 0 (string-match "\n" doc))
247 "(not documented)"))
248 (when (setq properties (symbol-plist symbol))
249 (setq doc (list (car properties)))
250 (while (setq properties (cdr (cdr properties)))
251 (setq doc (cons (car properties) doc)))
252 (mapconcat #'symbol-name (nreverse doc) " "))
253 (when (get symbol 'widget-type)
254 (if (setq doc (documentation-property
255 symbol 'widget-documentation t))
256 (substring doc 0
257 (string-match "\n" doc))
258 "(not documented)"))
259 (when (facep symbol)
260 (if (setq doc (documentation-property
261 symbol 'face-documentation t))
262 (substring doc 0
263 (string-match "\n" doc))
264 "(not documented)"))
265 (when (get symbol 'custom-group)
266 (if (setq doc (documentation-property
267 symbol 'group-documentation t))
268 (substring doc 0
269 (string-match "\n" doc))
270 "(not documented)"))))
271 (setq p (cdr p))))
272 (apropos-print
273 (or do-all apropos-do-all)
274 nil))
277 ;;;###autoload
278 (defun apropos-value (apropos-regexp &optional do-all)
279 "Show all symbols whose value's printed image matches REGEXP.
280 With optional prefix ARG or if `apropos-do-all' is non-nil, also looks
281 at the function and at the names and values of properties.
282 Returns list of symbols and values found."
283 (interactive "sApropos value (regexp): \nP")
284 (or do-all (setq do-all apropos-do-all))
285 (setq apropos-accumulator ())
286 (let (f v p)
287 (mapatoms
288 (lambda (symbol)
289 (setq f nil v nil p nil)
290 (or (memq symbol '(apropos-regexp do-all apropos-accumulator
291 symbol f v p))
292 (setq v (apropos-value-internal 'boundp symbol 'symbol-value)))
293 (if do-all
294 (setq f (apropos-value-internal 'fboundp symbol 'symbol-function)
295 p (apropos-format-plist symbol "\n " t)))
296 (if (or f v p)
297 (setq apropos-accumulator (cons (list symbol f v p)
298 apropos-accumulator))))))
299 (apropos-print nil t))
302 ;;;###autoload
303 (defun apropos-documentation (apropos-regexp &optional do-all)
304 "Show symbols whose documentation contain matches for REGEXP.
305 With optional prefix ARG or if `apropos-do-all' is non-nil, also use
306 documentation that is not stored in the documentation file and show key
307 bindings.
308 Returns list of symbols and documentation found."
309 (interactive "sApropos documentation (regexp): \nP")
310 (or do-all (setq do-all apropos-do-all))
311 (setq apropos-accumulator () apropos-files-scanned ())
312 (let ((standard-input (get-buffer-create " apropos-temp"))
313 f v)
314 (unwind-protect
315 (save-excursion
316 (set-buffer standard-input)
317 (apropos-documentation-check-doc-file)
318 (if do-all
319 (mapatoms
320 (lambda (symbol)
321 (setq f (apropos-safe-documentation symbol)
322 v (get symbol 'variable-documentation))
323 (if (integerp v) (setq v))
324 (setq f (apropos-documentation-internal f)
325 v (apropos-documentation-internal v))
326 (if (or f v)
327 (if (setq apropos-item
328 (cdr (assq symbol apropos-accumulator)))
329 (progn
330 (if f
331 (setcar apropos-item f))
332 (if v
333 (setcar (cdr apropos-item) v)))
334 (setq apropos-accumulator
335 (cons (list symbol f v)
336 apropos-accumulator)))))))
337 (apropos-print nil t))
338 (kill-buffer standard-input))))
341 (defun apropos-value-internal (predicate symbol function)
342 (if (funcall predicate symbol)
343 (progn
344 (setq symbol (prin1-to-string (funcall function symbol)))
345 (if (string-match apropos-regexp symbol)
346 (progn
347 (if apropos-match-face
348 (put-text-property (match-beginning 0) (match-end 0)
349 'face apropos-match-face
350 symbol))
351 symbol)))))
353 (defun apropos-documentation-internal (doc)
354 (if (consp doc)
355 (apropos-documentation-check-elc-file (car doc))
356 (and doc
357 (string-match apropos-regexp doc)
358 (progn
359 (if apropos-match-face
360 (put-text-property (match-beginning 0)
361 (match-end 0)
362 'face apropos-match-face
363 (setq doc (copy-sequence doc))))
364 doc))))
366 (defun apropos-format-plist (pl sep &optional compare)
367 (setq pl (symbol-plist pl))
368 (let (p p-out)
369 (while pl
370 (setq p (format "%s %S" (car pl) (nth 1 pl)))
371 (if (or (not compare) (string-match apropos-regexp p))
372 (if apropos-property-face
373 (put-text-property 0 (length (symbol-name (car pl)))
374 'face apropos-property-face p))
375 (setq p nil))
376 (if p
377 (progn
378 (and compare apropos-match-face
379 (put-text-property (match-beginning 0) (match-end 0)
380 'face apropos-match-face
382 (setq p-out (concat p-out (if p-out sep) p))))
383 (setq pl (nthcdr 2 pl)))
384 p-out))
387 ;; Finds all documentation related to APROPOS-REGEXP in internal-doc-file-name.
389 (defun apropos-documentation-check-doc-file ()
390 (let (type symbol (sepa 2) sepb beg end)
391 (insert ?\^_)
392 (backward-char)
393 (insert-file-contents (concat doc-directory internal-doc-file-name))
394 (forward-char)
395 (while (save-excursion
396 (setq sepb (search-forward "\^_"))
397 (not (eobp)))
398 (beginning-of-line 2)
399 (if (save-restriction
400 (narrow-to-region (point) (1- sepb))
401 (re-search-forward apropos-regexp nil t))
402 (progn
403 (setq beg (match-beginning 0)
404 end (point))
405 (goto-char (1+ sepa))
406 (or (setq type (if (eq ?F (preceding-char))
407 1 ; function documentation
408 2) ; variable documentation
409 symbol (read)
410 beg (- beg (point) 1)
411 end (- end (point) 1)
412 doc (buffer-substring (1+ (point)) (1- sepb))
413 apropos-item (assq symbol apropos-accumulator))
414 (setq apropos-item (list symbol nil nil)
415 apropos-accumulator (cons apropos-item
416 apropos-accumulator)))
417 (if apropos-match-face
418 (put-text-property beg end 'face apropos-match-face doc))
419 (setcar (nthcdr type apropos-item) doc)))
420 (setq sepa (goto-char sepb)))))
422 (defun apropos-documentation-check-elc-file (file)
423 (if (member file apropos-files-scanned)
425 (let (symbol doc beg end this-is-a-variable)
426 (setq apropos-files-scanned (cons file apropos-files-scanned))
427 (erase-buffer)
428 (insert-file-contents file)
429 (while (search-forward "\n#@" nil t)
430 ;; Read the comment length, and advance over it.
431 (setq end (read)
432 beg (1+ (point))
433 end (+ (point) end -1))
434 (forward-char)
435 (if (save-restriction
436 ;; match ^ and $ relative to doc string
437 (narrow-to-region beg end)
438 (re-search-forward apropos-regexp nil t))
439 (progn
440 (goto-char (+ end 2))
441 (setq doc (buffer-substring beg end)
442 end (- (match-end 0) beg)
443 beg (- (match-beginning 0) beg)
444 this-is-a-variable (looking-at "(def\\(var\\|const\\) ")
445 symbol (progn
446 (skip-chars-forward "(a-z")
447 (forward-char)
448 (read))
449 symbol (if (consp symbol)
450 (nth 1 symbol)
451 symbol))
452 (if (if this-is-a-variable
453 (get symbol 'variable-documentation)
454 (and (fboundp symbol) (apropos-safe-documentation symbol)))
455 (progn
456 (or (setq apropos-item (assq symbol apropos-accumulator))
457 (setq apropos-item (list symbol nil nil)
458 apropos-accumulator (cons apropos-item
459 apropos-accumulator)))
460 (if apropos-match-face
461 (put-text-property beg end 'face apropos-match-face
462 doc))
463 (setcar (nthcdr (if this-is-a-variable 2 1)
464 apropos-item)
465 doc)))))))))
469 (defun apropos-safe-documentation (function)
470 "Like documentation, except it avoids calling `get_doc_string'.
471 Will return nil instead."
472 (while (and function (symbolp function))
473 (setq function (if (fboundp function)
474 (symbol-function function))))
475 (if (eq (car-safe function) 'macro)
476 (setq function (cdr function)))
477 (setq function (if (byte-code-function-p function)
478 (if (> (length function) 4)
479 (aref function 4))
480 (if (eq (car-safe function) 'autoload)
481 (nth 2 function)
482 (if (eq (car-safe function) 'lambda)
483 (if (stringp (nth 2 function))
484 (nth 2 function)
485 (if (stringp (nth 3 function))
486 (nth 3 function)))))))
487 (if (integerp function)
489 function))
493 (defvar apropos-label-properties nil
494 "List of face properties to use for a label.
495 Bound by `apropos-print' for use by `apropos-print-doc'.")
497 (defun apropos-print (do-keys spacing)
498 "Output result of apropos searching into buffer `*Apropos*'.
499 The value of `apropos-accumulator' is the list of items to output.
500 Each element should have the format (SYMBOL FN-DOC VAR-DOC [PLIST-DOC]).
501 The return value is the list that was in `apropos-accumulator', sorted
502 alphabetically by symbol name; but this function also sets
503 `apropos-accumulator' to nil before returning."
504 (if (null apropos-accumulator)
505 (message "No apropos matches for `%s'" apropos-regexp)
506 (setq apropos-accumulator
507 (sort apropos-accumulator (lambda (a b)
508 (string-lessp (car a) (car b)))))
509 (setq apropos-label-properties
510 (if (and apropos-label-face
511 (symbolp apropos-label-face))
512 `(face ,apropos-label-face
513 mouse-face highlight)))
514 (with-output-to-temp-buffer "*Apropos*"
515 (let ((p apropos-accumulator)
516 (old-buffer (current-buffer))
517 symbol item point1 point2)
518 (set-buffer standard-output)
519 (apropos-mode)
520 (if window-system
521 (insert "If you move the mouse over text that changes color,\n"
522 (substitute-command-keys
523 "you can click \\[apropos-mouse-follow] to get more information.\n")))
524 (insert (substitute-command-keys
525 "In this buffer, type \\[apropos-follow] to get full documentation.\n\n"))
526 (while (consp p)
527 (or (not spacing) (bobp) (terpri))
528 (setq apropos-item (car p)
529 symbol (car apropos-item)
530 p (cdr p)
531 point1 (point))
532 (princ symbol) ; print symbol name
533 (setq point2 (point))
534 ;; Calculate key-bindings if we want them.
535 (and do-keys
536 (commandp symbol)
537 (indent-to 30 1)
538 (if (let ((keys
539 (save-excursion
540 (set-buffer old-buffer)
541 (where-is-internal symbol)))
542 filtered)
543 ;; Copy over the list of key sequences,
544 ;; omitting any that contain a buffer or a frame.
545 (while keys
546 (let ((key (car keys))
547 (i 0)
548 loser)
549 (while (< i (length key))
550 (if (or (framep (aref key i))
551 (bufferp (aref key i)))
552 (setq loser t))
553 (setq i (1+ i)))
554 (or loser
555 (setq filtered (cons key filtered))))
556 (setq keys (cdr keys)))
557 (setq item filtered))
558 ;; Convert the remaining keys to a string and insert.
559 (insert
560 (mapconcat
561 (lambda (key)
562 (setq key (condition-case ()
563 (key-description key)
564 (error)))
565 (if apropos-keybinding-face
566 (put-text-property 0 (length key)
567 'face apropos-keybinding-face
568 key))
569 key)
570 item ", "))
571 (insert "M-x")
572 (put-text-property (- (point) 3) (point)
573 'face apropos-keybinding-face)
574 (insert " " (symbol-name symbol) " ")
575 (insert "RET")
576 (put-text-property (- (point) 3) (point)
577 'face apropos-keybinding-face)))
578 (terpri)
579 ;; only now so we don't propagate text attributes all over
580 (put-text-property point1 point2 'item
581 (if (eval `(or ,@(cdr apropos-item)))
582 (car apropos-item)
583 apropos-item))
584 (if apropos-symbol-face
585 (put-text-property point1 point2 'face apropos-symbol-face))
586 (apropos-print-doc 'describe-function 1
587 (if (commandp symbol)
588 "Command"
589 (if (apropos-macrop symbol)
590 "Macro"
591 "Function"))
593 ;; We used to use customize-variable-other-window instead
594 ;; for a customizable variable, but that is slow.
595 ;; It is better to show an ordinary help buffer
596 ;; and let the user click on the customization button
597 ;; in that buffer, if he wants to.
598 (apropos-print-doc 'describe-variable 2 "Variable" t)
599 (apropos-print-doc 'customize-group-other-window 6 "Group" t)
600 (apropos-print-doc 'customize-face-other-window 5 "Face" t)
601 (apropos-print-doc 'widget-browse-other-window 4 "Widget" t)
602 (apropos-print-doc 'apropos-describe-plist 3
603 "Plist" nil))
604 (setq buffer-read-only t))))
605 (prog1 apropos-accumulator
606 (setq apropos-accumulator ()))) ; permit gc
609 (defun apropos-macrop (symbol)
610 "T if SYMBOL is a Lisp macro."
611 (and (fboundp symbol)
612 (consp (setq symbol
613 (symbol-function symbol)))
614 (or (eq (car symbol) 'macro)
615 (if (eq (car symbol) 'autoload)
616 (memq (nth 4 symbol)
617 '(macro t))))))
620 (defun apropos-print-doc (action i str do-keys)
621 (if (stringp (setq i (nth i apropos-item)))
622 (progn
623 (insert " ")
624 (put-text-property (- (point) 2) (1- (point))
625 'action action)
626 (insert str ": ")
627 (if apropos-label-properties
628 (add-text-properties (- (point) (length str) 2)
629 (1- (point))
630 apropos-label-properties))
631 (insert (if do-keys (substitute-command-keys i) i))
632 (or (bolp) (terpri)))))
635 (defun apropos-mouse-follow (event)
636 (interactive "e")
637 (let ((other (if (eq (current-buffer) (get-buffer "*Apropos*"))
639 (current-buffer))))
640 (save-excursion
641 (set-buffer (window-buffer (posn-window (event-start event))))
642 (goto-char (posn-point (event-start event)))
643 (or (and (not (eobp)) (get-text-property (point) 'mouse-face))
644 (and (not (bobp)) (get-text-property (1- (point)) 'mouse-face))
645 (error "There is nothing to follow here"))
646 (apropos-follow other))))
649 (defun apropos-follow (&optional other)
650 (interactive)
651 (let* (;; Properties are always found at the beginning of the line.
652 (bol (save-excursion (beginning-of-line) (point)))
653 ;; If there is no `item' property here, look behind us.
654 (item (get-text-property bol 'item))
655 (item-at (if item nil (previous-single-property-change bol 'item)))
656 ;; Likewise, if there is no `action' property here, look in front.
657 (action (get-text-property bol 'action))
658 (action-at (if action nil (next-single-property-change bol 'action))))
659 (and (null item) item-at
660 (setq item (get-text-property (1- item-at) 'item)))
661 (and (null action) action-at
662 (setq action (get-text-property action-at 'action)))
663 (if (not (and item action))
664 (error "There is nothing to follow here"))
665 (if (consp item) (error "There is nothing to follow in `%s'" (car item)))
666 (if other (set-buffer other))
667 (funcall action item)))
671 (defun apropos-describe-plist (symbol)
672 "Display a pretty listing of SYMBOL's plist."
673 (with-output-to-temp-buffer "*Help*"
674 (set-buffer standard-output)
675 (princ "Symbol ")
676 (prin1 symbol)
677 (princ "'s plist is\n (")
678 (if apropos-symbol-face
679 (put-text-property 8 (- (point) 14) 'face apropos-symbol-face))
680 (insert (apropos-format-plist symbol "\n "))
681 (princ ")")
682 (print-help-return-message)))
684 (provide 'apropos)
686 ;;; apropos.el ends here