From: Glenn Morris Date: Sat, 30 Aug 2008 20:14:11 +0000 (+0000) Subject: (apropos-command): Report documentation errors, rather than ignoring. X-Git-Tag: emacs-pretest-23.0.90~3133 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9da97cf02076c52b73e865f52cf9887c50437ef4;p=emacs.git (apropos-command): Report documentation errors, rather than ignoring. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3773c1664c..d0b4024f220 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,6 +1,6 @@ 2008-08-30 Glenn Morris - * apropos.el (apropos-command): Ignore documentation errors. + * apropos.el (apropos-command): Report documentation errors. * help-fns.el (describe-function-1): Handle broken aliases. (Bug#825) 2008-08-29 Chong Yidong diff --git a/lisp/apropos.el b/lisp/apropos.el index a0ac773cd23..31eada954fe 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -489,8 +489,12 @@ while a list of strings is used as a word list." (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)")))