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

default settings for DEFMACRO



From:     ALAN@MIT-MC
Date: Fri, 3 May 80 03:09:57 GMT
Original-Date: 02/05/80 23:09:57 EDT
Subject:
	Date: 5 February 1980 22:50-EST
	From: Glenn S. Burke <GSB at MIT-ML>
	There are certain macros which exist in FORMAT which really don't need
	to be there.  Because they are there, however, DEFMAX gets autoloaded
	when |forget-macromemos/|| gets called as they get defined.
    Well shouldn't such macros be surrounded by (EVAL-WHEN (EVAL COMPILE) ...)s ??
The documentation on NIL/MACLISP's DEFMACRO features suggest using
the two switches DEFMACRO-FOR-COMPILING and DEFMACRO-DISPLACE-CALL - 
it is the latter switch, which when "on" requires a call to 
|forget-macromemos/||.  Typically, a file will globally DECLARE these
switches "off", define its temporary macros, then set them back on; or
you can get local options, e.g.
   (DEFMACRO (MYCONS DEFMACRO-FOR-COMPILING () DEFMACRO-DISPLACE-CALL () )
	     (X Y &OPTIONAL (AREA TEMP-CONS-AREA) &AUX (OUTP (GC-SIZE AREA)))
	(AND OUTP (SETQ AREA (GET-NEW-AREA)))
	`(&INTERNAL-ALLOCATE ,area ,x ,y))
All this stuff is documented, both in the source for DEFMACRO and in
the LISP.NEWS file, about second or third page down.