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

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

Re: replacing a function with another one


From: lee
Subject: Re: replacing a function with another one
Date: Sat, 15 Mar 2014 21:02:32 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> lee <lee@yun.yagibdah.de> writes:
>
>> > "mode:" is for *major* modes, i.e. not for hi-lock-mode.
>> > You want to use "eval: (hi-lock-mode)" instead.
>>
>> Does this create the variable before the mode is enabled?
>
> AFAIK, yes, as long as the variable is mentioned before the
> "eval:(hi-lock-mode)".

I tried that, and it didn`t work.

>> What if someone edits the buffer and changes the value of this
>> variable?  Will it be updated automatically?
>
> No, you would have to do this explicitly.

I have made it so that by default, the variable is read from the
buffer.  So either way, it is being set before it`s needed, unless you
customise it differently.

That also has the advantage that when its value changes, it can  be
re-read from the buffer.

I think I`ll give it a try to add this to hi-lock-mode --- it would make
sense to have it as part of it ...


-- 
Knowledge is volatile and fluid.  Software is power.



reply via email to

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