diff options
| author | Richard M. Stallman | 2002-05-12 16:41:11 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2002-05-12 16:41:11 +0000 |
| commit | d7d563e3faef07aa17da53869bbc5c5868c3c0ef (patch) | |
| tree | effeba3da2d18b739249645c2d98098c01d9da54 | |
| parent | 7ec8d2c666f49c5ab2a7a774e01d99f6bf15c010 (diff) | |
| download | emacs-d7d563e3faef07aa17da53869bbc5c5868c3c0ef.tar.gz emacs-d7d563e3faef07aa17da53869bbc5c5868c3c0ef.zip | |
(functionp): Catch errors in indirect-function.
| -rw-r--r-- | lisp/subr.el | 4 |
1 files changed, 3 insertions, 1 deletions
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." | |||
| 1804 | (defun functionp (object) | 1804 | (defun functionp (object) |
| 1805 | "Non-nil iff OBJECT is a type of object that can be called as a function." | 1805 | "Non-nil iff OBJECT is a type of object that can be called as a function." |
| 1806 | (or (and (symbolp object) (fboundp object) | 1806 | (or (and (symbolp object) (fboundp object) |
| 1807 | (setq object (indirect-function object)) | 1807 | (condition-case nil |
| 1808 | (setq object (indirect-function object)) | ||
| 1809 | (error nil)) | ||
| 1808 | (eq (car-safe object) 'autoload) | 1810 | (eq (car-safe object) 'autoload) |
| 1809 | (not (car-safe (cdr-safe (cdr-safe (cdr-safe (cdr-safe object))))))) | 1811 | (not (car-safe (cdr-safe (cdr-safe (cdr-safe (cdr-safe object))))))) |
| 1810 | (subrp object) (byte-code-function-p object) | 1812 | (subrp object) (byte-code-function-p object) |