Path: utzoo!mnetor!uunet!lll-winken!lll-lcc!mordor!sri-spam!rutgers!mtune!codas!killer!pollux!ti-csl!home!ekberg From: ekberg@home.csc.ti.com (Tom Ekberg) Newsgroups: comp.emacs Subject: functionp Message-ID: <39315@ti-csl.CSNET> Date: 5 Jan 88 00:06:56 GMT Sender: news@ti-csl.CSNET Lines: 21 Keywords: function,emacs I have been unable to locate a function like the Common Lisp function named functionp. There are some functions which are similar, but none I found worked on all functions, so I wrote a function to handle this. How does the following definition appear to your critical eyes? (defun functionp (object) "Returns t if OBJECT is a function." (cond ((subrp object) t) ((commandp object) t) ((listp object) (eq (car object) 'lambda)) (t nil))) In case you are wondering, I am working on a function named describe which works like the Common Lisp describe function to give a description of any object given to it. The function names functionp is an essential part of the describe function. -- tom (aisle C-4L), EKBERG%TI-CSL@CSNET-RELAY, TI-CSL!EKBERG@IM4U.UUCP