From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org, Dave Pearson <davep.news@davep.org>,
Gareth Owen <usenet@gwowen.freeserve.co.uk>
Subject: Re: let vs. buffer local bindings
Date: 10 May 2002 17:31:58 +0200 [thread overview]
Message-ID: <5xlmasxbm9.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <je8z6s5dt3.fsf@sykes.suse.de>
Andreas Schwab <schwab@suse.de> writes:
> storm@cua.dk (Kim F. Storm) writes:
>
> |> Gareth Owen <usenet@gwowen.freeserve.co.uk> has found a peculiar
> |> interference between let and buffer local bindings.
>
> *Note Introduction to Buffer-Local Variables: (elisp)Intro to
> Buffer-Local.
>
> *Warning:* When a variable has buffer-local values in one or more
> buffers, you can get Emacs very confused by binding the variable with
> `let', changing to a different current buffer in which a different
> binding is in effect, and then exiting the `let'. This can scramble
> the values of the buffer-local and default bindings.
>
> To preserve your sanity, avoid using a variable in that way. If you
> use `save-excursion' around each piece of code that changes to a
> different current buffer, you will not have this problem (*note
> Excursions::).
>
I see.
But I had got the impression that the following changes to specbind
were supposed to remove that limitation.... I'm obviously mistaken:
2001-07-05 Gerd Moellmann <gerd@gnu.org>
* eval.c (specbind): Additionally record the buffer that was
current when a buffer-local or frame-local variable was bound.
2001-07-03 Gerd Moellmann <gerd@gnu.org>
* eval.c (specbind): If SYMBOL has a frame-local binding, record
the frame on the binding stack. Change format of entries for
local bindings on the binding stack to '(SYMBOL . WHERE)'.
(unbind_to): Handle unbinding a frame-local variable.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2002-05-10 15:31 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-10 14:21 let vs. buffer local bindings Kim F. Storm
2002-05-10 13:22 ` Gareth Owen
2002-05-10 13:48 ` Dave Pearson
2002-05-10 14:53 ` Kim F. Storm
2002-05-10 13:32 ` Andreas Schwab
2002-05-10 15:31 ` Kim F. Storm [this message]
2002-05-10 19:15 ` Stefan Monnier
2002-05-10 22:14 ` Kim F. Storm
2002-05-12 16:34 ` Richard Stallman
2002-05-13 20:07 ` Kim F. Storm
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5xlmasxbm9.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
--cc=davep.news@davep.org \
--cc=emacs-devel@gnu.org \
--cc=usenet@gwowen.freeserve.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).