comparison lisp/help.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 67e24d0cc80f
children b7b90f750a78
comparison
equal deleted inserted replaced
2274:8e1339255ca7 2275:445bd1969ed0
1212 If the optional argument STRIP-ARGLIST is non-nil, remove the arglist 1212 If the optional argument STRIP-ARGLIST is non-nil, remove the arglist
1213 part of the documentation of internal subroutines." 1213 part of the documentation of internal subroutines."
1214 (let ((doc (condition-case nil 1214 (let ((doc (condition-case nil
1215 (or (documentation function) 1215 (or (documentation function)
1216 (gettext "not documented")) 1216 (gettext "not documented"))
1217 (void-function "")))) 1217 (void-function "(alias for undefined function)")
1218 (error "(unexpected error from `documention')"))))
1218 (if (and strip-arglist 1219 (if (and strip-arglist
1219 (string-match "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'" doc)) 1220 (string-match "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'" doc))
1220 (setq doc (substring doc 0 (match-beginning 0)))) 1221 (setq doc (substring doc 0 (match-beginning 0))))
1221 doc)) 1222 doc))
1222 1223
1322 (let* ((sym (intern-soft name)) 1323 (let* ((sym (intern-soft name))
1323 (var (and sym (boundp sym) 1324 (var (and sym (boundp sym)
1324 (documentation-property sym 1325 (documentation-property sym
1325 'variable-documentation t))) 1326 'variable-documentation t)))
1326 (fun (and sym (fboundp sym) 1327 (fun (and sym (fboundp sym)
1327 (documentation sym t)))) 1328 (condition-case nil
1329 (documentation sym t)
1330 (void-function "(alias for undefined function)")
1331 (error "(unexpected error from `documention')")))))
1328 (when (or var fun) 1332 (when (or var fun)
1329 (let ((ex (make-extent b e))) 1333 (let ((ex (make-extent b e)))
1330 (require 'hyper-apropos) 1334 (require 'hyper-apropos)
1331 (set-extent-property ex 'mouse-face 'highlight) 1335 (set-extent-property ex 'mouse-face 'highlight)
1332 (set-extent-property ex 'help-symbol sym) 1336 (set-extent-property ex 'help-symbol sym)