diff options
| author | Glenn Morris | 2008-08-30 20:14:11 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-08-30 20:14:11 +0000 |
| commit | 9da97cf02076c52b73e865f52cf9887c50437ef4 (patch) | |
| tree | ba3eeb6964423f6dbdb146b8b07da705022b7a74 | |
| parent | b7270504e4c5eb47e6bb0f514bdc8c7d14a5b704 (diff) | |
| download | emacs-9da97cf02076c52b73e865f52cf9887c50437ef4.tar.gz emacs-9da97cf02076c52b73e865f52cf9887c50437ef4.zip | |
(apropos-command): Report documentation errors, rather than ignoring.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/apropos.el | 8 |
2 files changed, 7 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index c3773c1664c..d0b4024f220 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | 2008-08-30 Glenn Morris <rgm@gnu.org> | 1 | 2008-08-30 Glenn Morris <rgm@gnu.org> |
| 2 | 2 | ||
| 3 | * apropos.el (apropos-command): Ignore documentation errors. | 3 | * apropos.el (apropos-command): Report documentation errors. |
| 4 | * help-fns.el (describe-function-1): Handle broken aliases. (Bug#825) | 4 | * help-fns.el (describe-function-1): Handle broken aliases. (Bug#825) |
| 5 | 5 | ||
| 6 | 2008-08-29 Chong Yidong <cyd@stupidchicken.com> | 6 | 2008-08-29 Chong Yidong <cyd@stupidchicken.com> |
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." | |||
| 489 | (setq score (apropos-score-symbol symbol)) | 489 | (setq score (apropos-score-symbol symbol)) |
| 490 | (unless var-predicate | 490 | (unless var-predicate |
| 491 | (if (fboundp symbol) | 491 | (if (fboundp symbol) |
| 492 | (if (setq doc (ignore-errors (documentation symbol t))) | 492 | (if (setq doc (condition-case nil |
| 493 | (progn | 493 | (documentation symbol t) |
| 494 | (error 'error))) | ||
| 495 | ;; Eg alias to undefined function. | ||
| 496 | (if (eq doc 'error) | ||
| 497 | "(documentation error)" | ||
| 494 | (setq score (+ score (apropos-score-doc doc))) | 498 | (setq score (+ score (apropos-score-doc doc))) |
| 495 | (substring doc 0 (string-match "\n" doc))) | 499 | (substring doc 0 (string-match "\n" doc))) |
| 496 | "(not documented)"))) | 500 | "(not documented)"))) |