help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Confused about buffer-local variables


From: Nicolas Richard
Subject: Re: Confused about buffer-local variables
Date: Tue, 01 Apr 2014 12:11:50 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Thorsten Jolitz <tjolitz@gmail.com> writes:
> Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:
>> Thorsten Jolitz <tjolitz@gmail.com> writes:
>>> assume function `foo' is defined in library A and uses variable `bar'
>>> defined in that library with value "X". Now I call function `foo' from a
>>> buffer where variable `bar' is set as a buffer-local variable to a
>>> different value "Y".
>>>
>>> Which value is `foo' going to use - "X" or "Y"? I would have said "Y"
>>> but feel a bit confused right now ...
>>
>> I'd say 'Y' also, but maybe I'm confused and I do not know it. Do you
>> have any code sample that doesn't do what you expected ?

> with point in buffer local-var-test.org:
>
> ,----
> | "Y"
> `----

Sorry, I don't see how that is unexpected : it matches both your and my
expectation. I tried your recipe to check and I also get "Y".

-- 
Nico.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]