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

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

Re: Font-lock: Major mode should be able to specify region to fontify.


From: Kim F. Storm
Subject: Re: Font-lock: Major mode should be able to specify region to fontify.
Date: 11 May 2002 00:40:05 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2.50

none@example.invalid (Alan Mackenzie) writes:

> I have implemented this feature in font-lock.el (and friends) by creating
> a new abnormal hook variable which, if set, is called by one of the
> font-lock after-change functions.  Here is the patch.  The context-diff
> is based on the source files from Emacs 21.1.  

>         * font-lock.el
>         New abnormal hook before-font-lock-after-change-function,
>         New function font-lock-run-before-after-change-hook.
>         Changed font-lock-after-change-function.

I think your patch is ok as such, but I found the naming of the
font-lock-run-before-after-change-hook function rather confusing
(ending in -hook).

Maybe font-lock-get-buffer-specific-region is a better name?

Also, the name of the hook function variable should start with font-lock-,
and it's name really doesn't tell anything about what it does.

IMO, a better name would be font-lock-buffer-specific-region-function.


As a proof of concept, do you have code (using this) for awk-mode to fix the
problem you wanted to solve?

-- 
Kim F. Storm  http://www.cua.dk



reply via email to

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