Mercurial > emacs
diff lisp/subr.el @ 45246:aec4852e765a
(functionp): Catch errors in indirect-function.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 12 May 2002 16:41:11 +0000 |
parents | 829beb9a6a4b |
children | 02df8e2ff88b |
line wrap: on
line diff
--- 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)