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: Tue, 11 Mar 2014 20:05:47 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

> You can specify the pattern save file in the local variables
> section at the end of a file, but before a hi-lock mode specification,
> like here:
>
> Local Variables:
> hi-lock-patterns-file: "patterns.txt"
> mode: hi-lock
> End:

Apparently this doesn´t work because hi-lock-mode is called before the
variable is getting a value assigned.  See `hack-one-local-variable´ in
files.el --- IIUC, it calls the mode before it makes the variable.  It´s
hilarious ...

Since now I learned that a function is called for this, I can experiment
with a function defined in the mode I´m working on to read the patterns
and to set them.  This should be possible without using an advice.


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



reply via email to

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