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: Thorsten Jolitz
Subject: Re: Confused about buffer-local variables
Date: Tue, 01 Apr 2014 12:33:17 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

> 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".

It is as expected, I meant I should have just tried it instead of asking
a question. Sorry for being unclear ...

-- 
cheers,
Thorsten




reply via email to

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