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

new DEFMACRO



Very simple explanation (and fix) for (defmacro foo () nil):
    Date: 30 November 1980 21:59-EST
    From: Kent M. Pitman <KMP at MIT-MC>
	Date: 26 November 1980 22:58-EST
	From: William G. Dubuque <WGD>
	(defmacro foo () nil) then do (foo) and you get infinite recursion.
    -----
    This is the result of a bad interaction between the NIL return value --
    which fights with the (OR (MACROFETCH ...) ; NIL falls through!
			      (MACROMEMO ...)) ; expansion returned
    and the fact that the thing being memo-ized isn't CDR'd as it would be
    .  .  .
    Something in the new DEFMAX is still losing badly.
Someone should have noticed that DEFMACRO was producing (PROGN FOO-MACROARG)
as the main code, rather than (PROGN FOO-MACROARG NIL)  as should have been
expected.  This bug is entirely due to the new part of DEFMACRO which tries
to permit a documentation "string" (or symbols, as in the case of MacLISP -- 
it seems that NIL looked like a "documentation string").  I've fixed this
and installed version 138.
   I don't seen anything at all losing badly in the new DEFMAX, but if
you have an example, send it along.