Article View: gnu.emacs.bug
Article #98320weird interaction between local and buffer local variables
From: Michael L. Littman
Date: Mon, 14 Oct 1991 05:24
Date: Mon, 14 Oct 1991 05:24
42 lines
2150 bytes
2150 bytes
GNU Emacs 18.57.7 of Fri Mar 22 1991 on payday (berkeley-unix) Hey folks, I'm getting a strange interaction between local and buffer local variables. I ran across this trying to combine 2 Emacs Lisp programs that work fine alone. I execute the following commands in a vanilla scratch buffer. You may want to avoid doing in this in your "home" emacs because things get weird. ;------------------ ; This works fine. "tuna1" becomes local to the scratch buffer. This ; seems to mean that it has a value of nil everywhere for starters but ; if I change it in "scratch" it doesn't change elsewhere. (make-local-variable 'tuna1) ; This seems to behave identically to above. (setq tuna2) (let (tuna2) (make-local-variable 'tuna2)) ; This is the weird one. After executing this, "tuna3" is void in the ; scratch buffer, but nil everywhere else. Furthermore, attempts to ; use a let statement in the scratch buffer to set "tuna3" ; temporarily will fail. "tuna3" will still be void. The command ; (buffer-local-variables) chokes when creating the list of local ; variables because tuna3 is void. (let (tuna3) (make-local-variable 'tuna3)) ;----------------- The variable I am having a problem with is "obj". I have worked around the problem by putting "(setq obj)" in my .emacs file. Perhaps not the most elegant way of handling it but that's my punishment for trying to combine existing programs. Thanks! -Michael
Technical Details
Message-ID:
<9110141324.AA00323@breeze.bellcore.com>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!breeze.bellcore.com!mlittmanShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,7d4a5b366f543a4d,start X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1991-10-13 22:24:51 PST Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!breeze.bellcore.com!mlittman From: mlittman@breeze.bellcore.com (Michael L. Littman) Newsgroups: gnu.emacs.bug Subject: weird interaction between local and buffer local variables Message-ID: <9110141324.AA00323@breeze.bellcore.com> Date: 14 Oct 91 05:24:51 GMT Sender: gnulists@ai.mit.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 42 Approved: bug-gnu-emacs@prep.ai.mit.edu