>>>> "Holger" == Holger Schauer
<schauer(a)coling.uni-freiburg.de> writes:
>>>> "MS" == Michael Sperber schrieb am 24 Aug
1998 11:14:43 +0200:
MS> What I want is:
MS> (setq 23)
MS> (defmacro foo () 'bar)
MS> (foo) => 23
MS> (let ((bar 42)) (foo)) => 23 [note: CL actually yields 42]
MS> (setq bar 57)
MS> (foo) => 57
MS> (let ((bar 42)) (foo)) => 57 [note: CL actually yields 42]
Holger> But exactly this behaviour is what you get when you use
Holger> (defmacro foo () bar) instead of (defmacro foo () 'bar):
Ah, now I see what you meant. Unfortunately, this approach works only
with self-quoting values for BAR:
(setq bar #'(lambda (x) x))
(defmacro foo () bar)
(let ((bar #'(lambda (x) (+ x 1)))) (funcall (foo) 23))
=> illegal form #<CLOSURE :LAMBDA (X) X>
Consequently, what you're doing is really an accidental hack.
--
Cheers =8-} Chipsy
Friede, Völkerverständigung und überhaupt blabla