Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!ucsd!dog.ee.lbl.gov!hellgate.utah.edu!cdr.utah.edu!moore From: moore%cdr.utah.edu@cs.utah.edu (Tim Moore) Newsgroups: comp.lang.lisp Subject: Re: scope/extent interaction with flet and load Message-ID: <1990Nov4.135540.10584@hellgate.utah.edu> Date: 4 Nov 90 20:55:40 GMT References: <60375@bbn.BBN.COM> <1990Oct26.133156@cs.yale.edu> Distribution: comp Organization: University of Utah CS Dept Lines: 27 In article gumby@Cygnus.COM (David Vinayak Wallace) writes: > > Date: 26 Oct 90 17:31:56 GMT > From: engelson-sean@cs.yale.edu (Wisp Lizard) > > (let ((old+ #'+)) > (setf (symbol-function '+) #'cons) > (unwind-protect > (load "fu") ; note the correct spelling :-) > (setf (symbol-function '+) old+)) > > Note the use of unwind-protect in case an error occurs while loading. > >Yuk. No need for unwind-protect (and this version should work for >multiprocessing lisps if their letf is implemented correctly): > >(letf (((macro-function 'foo) #'cons)) (load "foo")) > >I believe letf was added to the revised common lisp. I'm not sure what Gumby means by "revised common lisp", but letf is not described in CLtL2 or in any ANSI draft I've seen. It may be "standard" in some implementations (Genera?). Tim Moore moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore "Ah, youth. Ah, statute of limitations." -John Waters