[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#38179: 26.1; clone-buffer globally unsets locally void variable
From: |
Noam Postavsky |
Subject: |
bug#38179: 26.1; clone-buffer globally unsets locally void variable |
Date: |
Wed, 13 Nov 2019 10:41:47 -0500 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/26.3 (windows-nt) |
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.