Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!bloom-beacon!mgm.mit.edu!wolfgang From: wolfgang@mgm.mit.edu (Wolfgang Rupprecht) Newsgroups: comp.emacs Subject: Re: Buffer Local Variables Message-ID: <2673@bloom-beacon.MIT.EDU> Date: 30 Jan 88 16:34:07 GMT References: <8770@ism780c.UUCP> Sender: daemon@bloom-beacon.MIT.EDU Reply-To: wolfgang@mgm.mit.edu (Wolfgang Rupprecht) Organization: Freelance Software Consultant, Cambridge, Ma. Lines: 22 In article <8770@ism780c.UUCP> mikep@ism780c.UUCP (Michael A. Petonic) writes: >I've notices a peculiarity with GNU Emacs version 18.40.4 on >BSD. Say that I define a variable FOO and make that variable >buffer local. Say I store a value of "BAR" into FOO. >[...] when I change modes, say from >Emacs-lisp to Fundemental in that buffer... BOOM! It wipes >out the value of FOO. It's now set to nil. Changing modes kills all local variables. See the files *-mode.el and look for functions *-mode. You will notice all of them do a call to (kill-all-local-variables). Here is its docstring. kill-all-local-variables: Eliminate all the buffer-local variable values of the current buffer. This buffer will then see the default values of all variables. If you *really* want to keep local variables across mode switches, you can try removing these calls. -- Wolfgang Rupprecht ARPA: wolfgang@mgm.mit.edu (IP 18.82.0.114) Freelance Consultant UUCP: mit-eddie!mgm.mit.edu!wolfgang Boston, Ma. VOICE: Hey_Wolfgang!_(617)_267-4365