From: Richard M. Stallman Date: Sat, 12 Apr 1997 19:13:07 +0000 (+0000) Subject: (functionp): New function. X-Git-Tag: emacs-20.1~2527 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a9a44ed170d462f5d634f3e1743dae0791bbb2b7;p=emacs.git (functionp): New function. --- 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.