From: Lennart Borgman <lennart.borgman@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 5371@debbugs.gnu.org
Subject: bug#5371: Priority of different kind of local variable bindings
Date: Wed, 13 Jan 2010 19:50:11 +0100 [thread overview]
Message-ID: <e01d8a51001131050i7e12f5c6x73ee24af084e4e6f@mail.gmail.com> (raw)
In-Reply-To: <jwvbpgxetis.fsf-monnier+emacs@gnu.org>
On Wed, Jan 13, 2010 at 7:45 PM, Stefan Monnier
<monnier@iro.umontreal.ca> wrote:
>>> What do you mean by "priority of different kind of local variables"?
>> I just meant which value is active at a certain point.
>
> It's not based on priorities.
>
>> (with-temp-buffer
>> (set (make-local-variable 'temp-var) "buffer-2")
>> (temp-var-display "cc")
>
>> (let ((temp-var "let"))
>> (temp-var-display "dd")
>
>> (kill-local-variable 'temp-var)
>> (temp-var-display "ff"))
>
> The `let' binding affects the currently "active" slot, so in this case
> it affects the buffer-local slot. So after kill-local-variable, this
> binding is lost.
Ok, I see.
> Note that mixing let-binding and buffer-local bindings is generally
> discouraged. The only known reasonably sane semantics for such a mix is
> when the variable is always buffer-local. If you mix `let' with
> make-local-variable and kill-local-variable you're really asking
> for trouble.
I know ;-)
Is this explained somewhere (except for the code)?
prev parent reply other threads:[~2010-01-13 18:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-13 9:20 bug#5371: Priority of different kind of local variable bindings Lennart Borgman
2010-01-13 14:41 ` Stefan Monnier
2010-01-13 15:50 ` Lennart Borgman
2010-01-13 18:45 ` Stefan Monnier
2010-01-13 18:50 ` Lennart Borgman [this message]
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=e01d8a51001131050i7e12f5c6x73ee24af084e4e6f@mail.gmail.com \
--to=lennart.borgman@gmail.com \
--cc=5371@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
/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).