changeset 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 b2f9b466af00
children 8912ff5c3a2c
files lisp/apropos.el
diffstat 1 files changed, 6 insertions(+), 2 deletions(-) [+]
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)")))