Eclipse defined
Macro REBINDING
Syntax:
rebinding (var*) form* => result-form
Arguments and Values:
vars---the variables to be rebound.
form---an implicit progn.
result-form---a Lisp form.
Description:
Rebinding returns a Lisp form which creates a temporary binding for each variable var. Each var will be evaluated exactly once within result-form, in the order in which the variables are named in vars.
References within the forms to any variable named in vars will appear in result-form as a reference to the temporary binding for the variable.
Example:
(defmacro lister (x y)
(rebinding (x y)
`(list ,x ,y)))
=> LISTER
(macroexpand '(lister i j))
=> (LET ((#1=#:X I)
(#2=#:Y J))
(LIST #1# #2#))
;; The actual uninterned symbol names may vary with different
;; implementations. For example, symbols produced by gensym
;; might be used.
Side Effects:
May increment *GENSYM-COUNTER*.
Affected By:
Symbol names be be effected by *GENSYM-COUNTER*.
Exceptional Situations: None.
See Also:
with-unique-names, gensym.
Notes:
Rebinding is intended to facilitate the creation of hygienic macros, in which:
Rebinding is compatible with similarly named facilities in other Lisp implementations. It is related to the once-only facility defined in some Lisp implementations.