Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!tut.cis.ohio-state.edu!ucsd!rutgers!aramis.rutgers.edu!atanasoff.rutgers.edu!lou From: lou@atanasoff.rutgers.edu (Lou Steinberg) Newsgroups: comp.lang.lisp Subject: Re: PLet Message-ID: Date: 9 Jan 90 17:33:14 GMT References: <509@cs.columbia.edu> <1515@skye.ed.ac.uk> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 22 To: lou@atanasoff.rutgers.edu, jeff@aiai.ed.ac.uk Oops - I let my message get away before I had fixed a mistake at the end... Let's try that again. Here is the corrected ending: Note that we hash on the "whole" rather than the argument ("form") because the argument might be just a symbol, which might also be the argument of some other call to this macro. However, even this approach can be wrong - the "whole" can be eq in two different macro calls if the whole itself comes from a constant in another macro. E.g.: (defmacro foo (x) `(cons ,macro-stuff (1+ ,x))) (defmacro fie (x) `(cons ,macro-stuff (1- ,x))) (setq macro-stuff '(eval-once *x*)) (let ((*x* 1)) (foo 10)) (1 . 11) (let ((*x* 2)) (fie 10)) (1 . 9) -- Lou Steinberg uucp: {pretty much any major site}!rutgers!aramis.rutgers.edu!lou arpa: lou@cs.rutgers.edu