From: Noam Postavsky <npostavs@gmail.com>
To: "Braun Gábor" <braungb88@gmail.com>
Cc: 38179@debbugs.gnu.org
Subject: bug#38179: 26.1; clone-buffer globally unsets locally void variable
Date: Wed, 13 Nov 2019 10:41:47 -0500 [thread overview]
Message-ID: <85h837kclg.fsf@gmail.com> (raw)
In-Reply-To: <1978574.4cfOVRSGya@gabor> ("Braun \=\?iso-8859-1\?Q\?G\=E1bor\=22'\?\= \=\?iso-8859-1\?Q\?s\?\= message of "Wed, 13 Nov 2019 11:17:27 +0100")
Braun Gábor <braungb88@gmail.com> writes:
>> > (with-temp-buffer
>> > (makunbound (make-local-variable var))
>>
>> That will unbind the global value and local values, not just the local
>> one.
>
> My Emacs 26.1 does not seem to behave that way.
> For example, evaluating the following form returns 2:
Oh, you're right. I was confused because describe-variable doesn't see
the global value when the local value is void.
> Neither the info documentation nor the docstring of makunbound say how
> makunbound behaves for buffer-local variables, so my assumption was that
> like other Lisp forms it acts on the buffer-local value of local
> variables.
Yeah, I think the current behaviour is a bit strange, but changing it is
probably too risky with regards to backwards compatibility.
So I think your patch is correct.
next prev parent reply other threads:[~2019-11-13 15:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-12 15:16 bug#38179: 26.1; clone-buffer globally unsets locally void variable Braun Gábor
2019-11-12 15:38 ` Noam Postavsky
2019-11-13 10:17 ` Braun Gábor
2019-11-13 15:41 ` Noam Postavsky [this message]
2019-11-14 5:45 ` Lars Ingebrigtsen
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=85h837kclg.fsf@gmail.com \
--to=npostavs@gmail.com \
--cc=38179@debbugs.gnu.org \
--cc=braungb88@gmail.com \
/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).