Path: utzoo!utgpu!news-server.csri.toronto.edu!clyde.concordia.ca!uunet!know!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!agate!riacs!shelby!neon!neon!gumby From: gumby@Cygnus.COM (David Vinayak Wallace) Newsgroups: comp.lang.lisp Subject: Re: scope/extent interaction with flet and load Message-ID: Date: 4 Nov 90 02:54:09 GMT References: <60375@bbn.BBN.COM> <1990Oct26.133156@cs.yale.edu> Sender: news@Neon.Stanford.EDU (USENET News System) Distribution: comp Organization: Cygnus Support Lines: 18 In-Reply-To: engelson-sean@cs.yale.edu's message of 26 Oct 90 17:31:56 GMT 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.