[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue DEFINING-MACROS-NON-TOP-LEVEL, v5
- To: jrose@Sun.COM
 
- Subject: Issue DEFINING-MACROS-NON-TOP-LEVEL, v5
 
- From: Jon L White <jonl@lucid.com>
 
- Date: Mon, 9 Jan 89 22:11:52 PST
 
- Cc: IIM@ECLA.USC.EDU, cl-compiler@SAIL.STANFORD.EDU, iim@ECLA.USC.EDU
 
- In-reply-to: John Rose's message of Mon, 9 Jan 89 11:46:32 PST <8901091946.AA07376@lukasiewicz.sun.com>
 
re: Yes, just last week I too found MACROLET very useful at top level, for
    creating a number of related top-level forms, and using a macro to
    factor out repeated structure among the forms.  Here's an example:
	    (macrolet ((def-forwarded-to-head (acsor head-acsor)
			  `(defun ,acsor (x) (,head-acsor (person-head x)))))
	      (def-forwarded-to-head person-nose head-nose)
	      (def-forwarded-to-head person-mouse head-mouse)
	      (def-forwarded-to-head person-eye-1 head-eye-1)
	      ...)
This works in Lucid Common Lisp, even though MACROLET doesn't "pass
toplevel thru", because Lucid already allows defining macros at non
toplevel positions [however, there is some debugging information lost
in such cases -- I hope this bug is fixed in the next release].
-- JonL --