Just do not understand the description of macro used for operators which creates context. It seems to me that if there is a binding, macro is the only choice.
Is this cannot be achieved by other means? What does the text below really mean?
Thanks a lot.
There is another kind of context besides a lexical environment. In the broader sense, the context is the state of theworld, including the values of special variables, the contents of data structures, and the state of things outside Lisp. Operators which build this kind of context must be defined as macros too, unless their code bodies are to be packaged up in closures. The names of context-building macros often begin with with-. The most commonly used macro of this type is probably with-open-file. Its body is evaluated with a newly opened file bound to a user-supplied variable:
(with-open-file (s "dump" :direction :output)
(princ 99 s))
......
This operator clearly has to be defined as amacro,because it binds s. However, operators which cause forms to be evaluated in a new context must be defined as macros anyway.