Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!lll-crg!lll-lcc!qantel!hplabs!hpfcdc!hpfcla!diamant From: diamant@hpfcla.UUCP Newsgroups: net.lang.lisp Subject: Re: question for a Common Lisp guru Message-ID: <8700002@hpfclp.UUCP> Date: Sat, 1-Mar-86 02:45:00 EST Article-I.D.: hpfclp.8700002 Posted: Sat Mar 1 02:45:00 1986 Date-Received: Sun, 9-Mar-86 09:28:23 EST References: <1829@hammer.UUCP> Organization: 01 Mar 86 00:45:00 MST Lines: 29 /***** hpfclp:net.lang.lisp / hammer!patcl / 11:13 pm Feb 24, 1986*/ The book Common Lisp (1984) says that "defun", used to establish global function definitions, is a macro (p. 67). Yet, this doesn't seem possible, as there does not seem to be any special form which could be used to implement such a macro. Also, there are some references in the book to "defun" as a special form, although it is not listed in the table of all special forms (p. 57). So, is the book wrong to define "defun" as a macro, and should it really be one of the special forms? Pat Clancy Tektronix /* ---------- */ Defun can (and typically is) implemented with (setf (symbol-function ... In particular, a simple definition (no error checking; documentation not handled, etc) for defun is: (defmacro defun (name &rest body) `(setf (symbol-function ',name #'(lambda ,@body)))) John Diamant Fort Collins Systems Division UUCP: {ihnp4!hpfcla,hplabs}!hpfclp!diamant Hewlett Packard Co. ARPA/CSNET: diamant%hpfclp@hplabs Fort Collins, CO