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

another question about defmacro lambda lists



    Date: Sun, 25 Jan 87 20:04 EST
    From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>

    Well, there's something funny here.  Consider:

      (defmacro foo (&rest x &whole y) ...)
      (defmacro bar ((&rest x &whole y)) ...)

    In bar, x and y are bound to the same value, but in foo x is bound to
    (cdr y).  I suppose it makes sense to allow &whole in bar anyway, but it
    could be confusing to some users.

I agree it isn't symmetric, but there probably are cases that really are
useful.  Something like
	(defmacro with-open-file ((&whole stuff var filename &rest keys)
				  &body body)
	  ...
	  (warn "The first form of with-open-file, ~S, is malformed." stuff)
	  ...)