Article View: gnu.emacs.bug
Article #98315Re: stack unwinding bug?
From: Joe Wells
Date: Sat, 12 Oct 1991 02:57
Date: Sat, 12 Oct 1991 02:57
31 lines
1722 bytes
1722 bytes
In article <9110072035.AA08747@maltex> pwu@ai.mit.edu (Peng Wu) writes:
Note that *scratch* is turned into read-only.
The command TEST is defined as the following:
(defun TEST ()
(interactive)
(set-buffer (get-buffer-create "*test*"))
(make-local-variable 'buffer-read-only)
(setq buffer-read-only t)
(let ((buffer-read-only nil))
(kill-buffer "*test*")))
It seems that after the buffer *test* is killed, its local
variables are restore in another buffer. ftp-write-file
has a similar problem when it kills the process i/o buffer.
This is a well-known problem with specbind/unbind_to. Basically, for
buffer-local values, it needs to save the buffer that the value was local
to and only restore the value in that buffer (or none if the buffer is
killed), even if the current-buffer has changed.
Feel free to write the fix. :-)
The workaround is to use let, setq, unwind-protect, set-buffer, and
several auxiliary variables.
--
Enjoy,
Joe Wells <jbw@cs.bu.edu>
Technical Details
Message-ID:
<JBW.91Oct11225750@bigbird.bu.edu>Path:
arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!bigbird.bu.edu!jbwReferences:
<9110072035.AA08747@maltex>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fb2f1,bd8f643f1fd01396 X-Google-Attributes: gidfb2f1,public X-Google-ArrivalTime: 1991-10-11 19:57:50 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!bigbird.bu.edu!jbw From: jbw@bigbird.bu.edu (Joe Wells) Newsgroups: gnu.emacs.bug Subject: Re: stack unwinding bug? Message-ID: <JBW.91Oct11225750@bigbird.bu.edu> Date: 12 Oct 91 02:57:50 GMT References: <9110072035.AA08747@maltex> Sender: gnulists@ai.mit.edu Distribution: gnu Organization: Boston University Computer Science Department Lines: 31 Approved: bug-gnu-emacs@prep.ai.mit.edu