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: Wed, 12 Mar 2014 22:43:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> encountered, what is in "mode:" will be called as a function if it ends
>> in "-mode".  Calling such function always seems to happen before the
>> variable is created.
>
> "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?  If so, it
would save me searching for the name of the file to read the patterns
from.


What if someone edits the buffer and changes the value of this variable?
Will it be updated automatically?

Currently, the functions I have search for the file name in the buffer
every time it´s needed because it could have been modified.


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



reply via email to

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