🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.emacs.vm.bug
Article #9492

Re: inhibit-local-variables on mailboxes again

#9492
From: Joe Wells
Date: Wed, 03 Jul 1991 21:18
38 lines
2498 bytes
In article <9106252056.AA09412@cs14b.cs.aukuni.ac.nz> mike-w@cs.aukuni.ac.nz writes:

   >>> "Kyle" == kyle@uunet.uu.net writes:

   Kyle> I'll make the next release of VM check to see if the value is nil
   Kyle> before rebinding.  If the value of inhibit-local-variables is
   Kyle> non-nil, then VM will not change it.

     I've encountered an interesting bug in conjunction with this.  It goes
     something like this ...

     * In my ~/.emacs, I 
	 (set-default 'inhibit-local-variables 'query-other)

     * In my vm-mode-hook, I
	 (make-local-variable 'inhibit-local-variables)
	 (setq inhibit-local-variables 'always)

       Now, whenever I call vm, I discover that the *global* value of
     inhibit-local-variables is set to 't !!!  I don''t understand how this
     could be happening -- the only place where it is set to 't is the
     let-binding in vm and vm-gobble-crash-box!!

This is the infamous specbind bug.  If you exit the scope of a binding of
a buffer-local variable with a different current buffer from the current
buffer at the time of entering the scope of the binding, kaboom!

When a variable is bound (either as the parameter of a function or with
"let") the old value is stored on a stack.  When the scope of the binding
is exited, the equivalent of (set 'variable old-value) is done.
Obviously, this can cause a problem with buffer-local variables if the
current buffer was changed within the scope of the binding.

This isn't a complete explanation.  Feel free to inspect the code of
"specbind" and friends for the gory details.

-- 
Joe Wells <jbw@uswest.com>
Technical Details
Message-ID: <JBW.91Jul3141836@maverick.uswest.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!elroy.jpl.nasa.gov!ncar!csn!cherokee!newsat!jbw
References: <DANJ1.91Jun20212507@ihlpz.ATT.COM> <MIKE-W.91Jun24101007@cs17.cs.aukuni.ac.nz> <9106251407.AA17975@rodan.UU.NET> <9106252056.AA09412@cs14b.cs.aukuni.ac.nz>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6829,b7687d7ff193f1ce
X-Google-Attributes: gidf6829,public
X-Google-ArrivalTime: 1991-07-03 16:41:02 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!mcsun!uunet!elroy.jpl.nasa.gov!ncar!csn!cherokee!newsat!jbw
From: jbw@maverick.uswest.com (Joe Wells)
Newsgroups: gnu.emacs.vm.bug
Subject: Re: inhibit-local-variables on mailboxes again
Message-ID: <JBW.91Jul3141836@maverick.uswest.com>
Date: 3 Jul 91 21:18:36 GMT
References: <DANJ1.91Jun20212507@ihlpz.ATT.COM>
 <MIKE-W.91Jun24101007@cs17.cs.aukuni.ac.nz>
 <9106251407.AA17975@rodan.UU.NET>
 <9106252056.AA09412@cs14b.cs.aukuni.ac.nz>
Sender: news@cherokee.uswest.com (Telegraph Row)
Organization: U S West Advanced Technologies
Lines: 38
In-Reply-To: mike-w@cs.aukuni.ac.nz's message of Wed, 26 Jun 91 08: 56:59 +1200
Nntp-Posting-Host: maverick.uswest.com