;;; apropos.el --- apropos commands for users and programmers
;; Copyright (C) 1989, 1994, 1995, 2001, 2002, 2003, 2004,
-;; 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Author: Joe Wells <jbw@bigbird.bu.edu>
;; Rewritten: Daniel Pfeiffer <occitan@esperanto.org>
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
(setq apropos-accumulator
(apropos-internal apropos-regexp
(or var-predicate
- (if do-all 'functionp 'commandp))))
+ ;; We used to use `functionp' here, but this
+ ;; rules out macros. `fboundp' rules in
+ ;; keymaps, but it seems harmless.
+ (if do-all 'fboundp 'commandp))))
(let ((tem apropos-accumulator))
(while tem
(if (or (get (car tem) 'apropos-inhibit)
(setq symbol (car p))
(setq score (apropos-score-symbol symbol))
(unless var-predicate
- (if (functionp symbol)
+ (if (fboundp symbol)
(if (setq doc (documentation symbol t))
(progn
(setq score (+ score (apropos-score-doc doc)))
(defun apropos-describe-plist (symbol)
"Display a pretty listing of SYMBOL's plist."
(help-setup-xref (list 'apropos-describe-plist symbol) (interactive-p))
- (with-output-to-temp-buffer (help-buffer)
+ (with-help-window (help-buffer)
(set-buffer standard-output)
(princ "Symbol ")
(prin1 symbol)
(put-text-property (+ (point-min) 7) (- (point) 14)
'face apropos-symbol-face))
(insert (apropos-format-plist symbol "\n "))
- (princ ")")
- (print-help-return-message)))
+ (princ ")")))
(provide 'apropos)
-;;; arch-tag: d56fa2ac-e56b-4ce3-84ff-852f9c0dc66e
+;; arch-tag: d56fa2ac-e56b-4ce3-84ff-852f9c0dc66e
;;; apropos.el ends here