From: jack-mac <duthen.mac@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: Help needed with defadvice
Date: Sat, 23 Nov 2013 00:35:03 -0800 (PST) [thread overview]
Message-ID: <916aff62-b5dc-4d46-9688-fc5811d75813@googlegroups.com> (raw)
In-Reply-To: <mailman.6834.1385135422.10748.help-gnu-emacs@gnu.org>
Le vendredi 22 novembre 2013 16:50:02 UTC+1, Perry Smith a écrit :
> On perhaps a side note, the documentation for make-variable-buffer-local
> has this curious sentence:
>
>> Note that binding the variable with `let',
>> does not make the variable buffer-local.
>
> I think I'm doing the 2nd phrase -- right?
I don't think so!
They probably mean:
>> or setting it while a `let'-style binding OF THIS SAME VARIABLE
>> made in this buffer is in effect,
Something like:
(with-current-buffer (current-buffer)
(let ((my-var 'foo))
(set (make-local-variable 'my-var) 'bar)
(message "inside let, my-var is %s" my-var))
(message "outside let, my-var is %s" (if (boundp 'my-var) my-var '_undef_)))
> But then I get confused and
> I don't understand why my other example works because it is inside
> a let binding a well. Even if I remove my let, I am likely going to be
> inside a let but whoever is calling down to the function I am advising.
HTH
)jack(
next prev parent reply other threads:[~2013-11-23 8:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-22 2:45 Help needed with defadvice Perry Smith
2013-11-22 6:27 ` Eric Abrahamsen
2013-11-22 7:09 ` Alex Kost
2013-11-22 15:50 ` Perry Smith
2013-11-22 21:56 ` Alex Kost
2013-11-23 1:41 ` Perry Smith
2013-11-23 7:00 ` Alex Kost
2013-11-23 14:48 ` Stefan Monnier
2013-11-23 15:22 ` Perry Smith
2013-11-23 15:38 ` Stefan Monnier
2013-11-23 16:24 ` Perry Smith
2013-11-24 18:21 ` Stefan Monnier
2013-11-23 15:43 ` Alex Kost
[not found] ` <mailman.6834.1385135422.10748.help-gnu-emacs@gnu.org>
2013-11-23 8:35 ` jack-mac [this message]
2013-11-22 14:44 ` Stefan Monnier
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=916aff62-b5dc-4d46-9688-fc5811d75813@googlegroups.com \
--to=duthen.mac@gmail.com \
--cc=help-gnu-emacs@gnu.org \
/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.
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).