[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: non quoted arguements



In article <01GSAWG9D45U001D1T@ENH.NIST.GOV> bright@ENH.NIST.GOV writes:

   How does one write a function/macro/anything to return the input, like the
   old nlambdas and fexpers used to do?  The reason:  I'd like to track what I
   do without having to quote everything.  Say, track-it, which returns the
   value of foo, but pushes the symbol foo onto a list:

   (setq bar '(a list with data))   (defparameter *all-new-names* '(some old
   names too))
   (track-it bar) --> (a list with data), and   *all-new-names* = (bar some
   old names too)

(defmacro track-it (name)
  `(progn
     (pushnew ',name *all-new-names*)
     ,name))

--
Tim Moore                    moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore
"Wind in my hair - Shifting and drifting - Mechanical music - Adrenaline surge"
	- Rush