comparison 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
comparison
equal deleted inserted replaced
97877:b2f9b466af00 97878:45912950adb0
487 (setcar p (list 487 (setcar p (list
488 (setq symbol (car p)) 488 (setq symbol (car p))
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)")))
497 (and var-predicate 501 (and var-predicate
498 (funcall var-predicate symbol) 502 (funcall var-predicate symbol)