From a9a44ed170d462f5d634f3e1743dae0791bbb2b7 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sat, 12 Apr 1997 19:13:07 +0000 Subject: [PATCH] (functionp): New function. --- lisp/subr.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lisp/subr.el b/lisp/subr.el index a498cea5b37..656f02a1b30 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -973,6 +973,12 @@ configuration." (and (consp object) (eq (car object) 'frame-configuration))) +(defun functionp (object) + "Non-nil of OBJECT is a type of object that can be called as a function." + (or (subrp object) (compiled-function-p object) + (eq (car-safe object) 'lambda) + (and (symbolp object) (fboundp object)))) + ;; now in fns.c ;(defun nth (n list) ; "Returns the Nth element of LIST. -- 2.39.5