all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Andreas Schwab <schwab@suse.de>
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: Fri, 10 May 2002 15:32:08 +0200	[thread overview]
Message-ID: <je8z6s5dt3.fsf@sykes.suse.de> (raw)
In-Reply-To: <5xy9esxewc.fsf@kfs2.cua.dk> (storm@cua.dk's message of "10 May 2002 16:21:07 +0200")

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::).

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

  parent reply	other threads:[~2002-05-10 13:32 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 [this message]
2002-05-10 15:31   ` Kim F. Storm
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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=je8z6s5dt3.fsf@sykes.suse.de \
    --to=schwab@suse.de \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.