Fix up comment convention on the arch-tag lines.
[bpt/emacs.git] / lisp / apropos.el
index 8df7992..ce70ee2 100644 (file)
@@ -1,7 +1,7 @@
 ;;; 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>
@@ -11,7 +11,7 @@
 
 ;; 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,
@@ -456,7 +456,10 @@ while a list of strings is used as a word list."
     (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)
@@ -470,7 +473,7 @@ while a list of strings is used as a word list."
                   (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)))
@@ -1005,7 +1008,7 @@ If non-nil TEXT is a string that will be printed as a heading."
 (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)
@@ -1014,11 +1017,10 @@ If non-nil TEXT is a string that will be printed as a heading."
        (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