comparison lisp/hyper-apropos.el @ 2275:445bd1969ed0

[xemacs-hg @ 2004-09-15 08:30:25 by stephent] fix void-function error in apropos <87656glyun.fsf@tleepslib.sk.tsukuba.ac.jp>
author stephent
date Wed, 15 Sep 2004 08:30:27 +0000
parents 57b76886836d
children fd1acd2f457a
comparison
equal deleted inserted replaced
2274:8e1339255ca7 2275:445bd1969ed0
340 (symbolp fn) 340 (symbolp fn)
341 (symbolp (symbol-function fn))) 341 (symbolp (symbol-function fn)))
342 (function-obsoleteness-doc fn) 342 (function-obsoleteness-doc fn)
343 ;; A symbol's function slot can point to an unbound symbol. 343 ;; A symbol's function slot can point to an unbound symbol.
344 ;; In that case, `documentation' will fail. 344 ;; In that case, `documentation' will fail.
345 (ignore-errors 345 (condition-case nil
346 (documentation fn))))) 346 (documentation fn)
347 (void-function "(alias for undefined function)")
348 (error "(unexpected error from `documention')")))))
347 (if (and 349 (if (and
348 doc 350 doc
349 (string-match 351 (string-match
350 "\\`([^\n\t )]+[\t ]*\\([^\n)]+\\)?)\\(:[\t ]*\\|\n?\\'\\)" 352 "\\`([^\n\t )]+[\t ]*\\([^\n)]+\\)?)\\(:[\t ]*\\|\n?\\'\\)"
351 doc)) 353 doc))
769 ((bytecode) (format ",\n(loaded from \"%s\")" 771 ((bytecode) (format ",\n(loaded from \"%s\")"
770 (symbol-file symbol))))) 772 (symbol-file symbol)))))
771 local (current-local-map) 773 local (current-local-map)
772 global (current-global-map) 774 global (current-global-map)
773 obsolete (get symbol 'byte-obsolete-info) 775 obsolete (get symbol 'byte-obsolete-info)
774 doc (or (documentation symbol) "function not documented")) 776 doc (or (condition-case nil
777 (documentation symbol)
778 (void-function
779 "(alias for undefined function)")
780 (error "(unexpected error from `documention')"))
781 "function not documented"))
775 (save-excursion 782 (save-excursion
776 (set-buffer hyper-apropos-help-buf) 783 (set-buffer hyper-apropos-help-buf)
777 (goto-char (point-max)) 784 (goto-char (point-max))
778 (setq standard-output (current-buffer)) 785 (setq standard-output (current-buffer))
779 (hyper-apropos-insert-section-heading alias-desc desc) 786 (hyper-apropos-insert-section-heading alias-desc desc)