From: Richard M. Stallman Date: Sun, 12 May 2002 16:41:11 +0000 (+0000) Subject: (functionp): Catch errors in indirect-function. X-Git-Tag: ttn-vms-21-2-B4~15095 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d7d563e3faef07aa17da53869bbc5c5868c3c0ef;p=emacs.git (functionp): Catch errors in indirect-function. --- diff --git a/lisp/subr.el b/lisp/subr.el index e7fbe0f6a7b..2636ccadea9 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1804,7 +1804,9 @@ configuration." (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)