changeset 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 c3375b447f2b
children 6baa96917e56
files lisp/subr.el
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
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)