From d7d563e3faef07aa17da53869bbc5c5868c3c0ef Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 12 May 2002 16:41:11 +0000 Subject: [PATCH] (functionp): Catch errors in indirect-function. --- lisp/subr.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.5