Page 9 Table of Contents Index Page 11
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E



CHAPTER 2. CONVENTIONS

variable outside the macro form and the variable inside the body share the same name, they
cannot be assumed to be the same reference. That is, the macro is free to create a new binding
for the variable. Thus, the following code fragment will not necessarily affect the value of stream
outside the formatting-table form:


 (formatting-table (stream)
   (setq stream some-other-stream)
   ...)

Furthermore, for the macros that take a sheet, stream, or medium argument, the position of
that variable is always before any forms or other "inputs".

2.9 Macros that Expand into Calls to Advertised Functions

Some macros that take a "body" argument expand into a call to an advertised function that takes
a functional argument. This functional argument will execute the suppled body. For a macro
named "with-environment", the function is generally named "invoke-with-environment". For
example, with-drawing-options might be defined as follows:



 (defgeneric invoke-with-drawing-options (medium continuation &key)
   (declare (dynamic-extent continuation)))

 (defmacro with-drawing-options ((medium &rest drawing-options) &body body)
   `(flet ((with-drawing-options-body (,medium) ,@body))
      (declare (dynamic-extent #'with-drawing-options-body))
      (invoke-with-drawing-options
        ,medium #'with-drawing-options-body ,@drawing-options)))

 (defmethod invoke-with-drawing-options
            ((medium clx-display-medium) continuation &rest drawing-options)
   (with-drawing-options-merged-into-medium (medium drawing-options)
     (funcall continuation medium)))

2.10 Terminology Pertaining to Error Conditions

When this specification specifies that it "is an error" for some situation to occur, this means
that:


Page 9 Table of Contents Index Page 11
Chapters
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
A, B, C, D, E