Path: utzoo!attcan!uunet!zaphod.mps.ohio-state.edu!usc!sdd.hp.com!ucsd!ucbvax!agate!bionet!arisia!roo!cutting From: cutting@parc.xerox.com (Doug Cutting) Newsgroups: comp.lang.lisp Subject: Re: scope/extent interaction with flet and load Message-ID: Date: 29 Oct 90 18:27:47 GMT References: <60375@bbn.BBN.COM> <1990Oct26.133156@cs.yale.edu> <332@puma.ge.com> Sender: news@parc.xerox.com Distribution: comp Organization: Xerox PARC, Palo Alto, CA Lines: 24 In-reply-to: kmorgan@fergie.ge.com's message of 27 Oct 90 14:05:35 GMT In article <332@puma.ge.com> kmorgan@fergie.ge.com (Keith Morgan) writes: In article <1990Oct26.133156@cs.yale.edu> engelson-sean@cs.yale.edu (Wisp Lizard) writes: >what you want with functions, you need to change the global function >definition, as follows: > >(let ((old+ #'+)) > (setf (symbol-function '+) #'cons) > (unwind-protect > (load "fu") ; note the correct spelling :-) > (setf (symbol-function '+) old+)) Unfortunately this solution will not work in a multiprocess environment since the global function cell is being set, not bound, and all processes will end up using the new definition . What is really needed is a way to declare an flet binding special but I don't think there is a way to do that. How about: (defvar *plus* #'+) (defun + (&rest numbers) (apply *plus* numbers)) (let ((*plus* #'list)) (load "fu")) Doug