From: Thomas A. Russ
Subject: Re: declarations in defmacro
Date: 
Message-ID: <ymizoqxudn5.fsf@sevak.isi.edu>
Inside the backquote you can put the declarations anywhere they would be
legal in the generated code.  One CL feature that I found handy for use
in macros is the LOCALLY form, which provides a way to introduce
declarations that are in force for the body of the expansion:

(defmacro foo (...)

  `(locally (declare ....)
      <body>
      ))

For example:

(defmacro with-speed (&rest body)
  `(locally (declare (optimize (speed 3) (safety 0) (space 0) (debug 0)))
     ,@body))



-- 
Thomas A. Russ,  USC/Information Sciences Institute          ยทยทยท@isi.edu