diff lisp/apropos.el @ 97878:45912950adb0

(apropos-command): Report documentation errors, rather than ignoring.
author Glenn Morris <rgm@gnu.org>
date Sat, 30 Aug 2008 20:14:01 +0000
parents 68aa068f4c20
children d42aff5ca541
line wrap: on
line diff
--- a/lisp/apropos.el	Sat Aug 30 20:07:58 2008 +0000
+++ b/lisp/apropos.el	Sat Aug 30 20:14:01 2008 +0000
@@ -489,8 +489,12 @@
 		   (setq score (apropos-score-symbol symbol))
 		   (unless var-predicate
 		     (if (fboundp symbol)
-			 (if (setq doc (ignore-errors (documentation symbol t)))
-			     (progn
+			 (if (setq doc (condition-case nil
+                                           (documentation symbol t)
+                                         (error 'error)))
+                             ;; Eg alias to undefined function.
+                             (if (eq doc 'error)
+                                 "(documentation error)"
 			       (setq score (+ score (apropos-score-doc doc)))
 			       (substring doc 0 (string-match "\n" doc)))
 			   "(not documented)")))