# HG changeset patch # User Richard M. Stallman # Date 1021221671 0 # Node ID aec4852e765accd056cecf83ef1174c077acc084 # Parent c3375b447f2b121ca372f369f39e88eecbee6503 (functionp): Catch errors in indirect-function. diff -r c3375b447f2b -r aec4852e765a lisp/subr.el --- a/lisp/subr.el Sun May 12 15:19:59 2002 +0000 +++ b/lisp/subr.el Sun May 12 16:41:11 2002 +0000 @@ -1804,7 +1804,9 @@ (defun functionp (object) "Non-nil iff OBJECT is a type of object that can be called as a function." (or (and (symbolp object) (fboundp object) - (setq object (indirect-function object)) + (condition-case nil + (setq object (indirect-function object)) + (error nil)) (eq (car-safe object) 'autoload) (not (car-safe (cdr-safe (cdr-safe (cdr-safe (cdr-safe object))))))) (subrp object) (byte-code-function-p object)