[Top][All Lists]

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

Re: font-lock-multiline for cc-awk.

From: Alan Mackenzie
Subject: Re: font-lock-multiline for cc-awk.
Date: Wed, 26 Apr 2006 07:37:54 +0000 (GMT)

Hi, Stefan!

On Tue, 25 Apr 2006, Stefan Monnier wrote:

>AFAICT the patch below converts cc-awk to use font-lock-multiline
>instead of an after-change-function.

You've rubbed out my after-change function!  Heeeellllllllllpppppppp!!

The after-change function is needed to set syntax-table text properties,
since this must be done regardless of whether font lock is enabled.  In
fact, it's a massive pain in the posterior that font lock erases these
text properties without getting permission from the major mode.  This is
the only reason that c-awk-set-syntax-table-properties is hooked into
font-lock-syntactic keywords - essentially, the syntax-table properties
are an after-change thing.

I don't want to mix up the syntax-table and f-l-multiline properties,
because they're very different things.  Doing so would weaken the
existing functions, which are strong single-purpose functions.  To do
things this sort of way, I'd put in a new function
c-awk-set-fl-multiline-properties (a sister function to
c-awk-set-syntax-table-properties, with the same calling conventions).
The existing function loops round string/regexp/division sign constructs,
whereas the new one would be looping round lines.  They don't mix very

But mainly, I don't want to be applying f-l-m properties throughout the
region[*].  They should be applied only at the region boundaries when
these need extending, and only when font lock is enabled, since they serve
no purpose otherwise.

[*] As you're aware, I don't want to use f-l-m properties at all.  But if
I must use them, I only want them where absolutely needed.

And you've rubbed out my before-change function!  Ruuuuuunnnnnnnn
awwwwwaaaayyyyyyy!!!!!!!  This is needed for other things besides
calculating font lock boundaries.

Why not leave things alone until Richard has settled the whole matter?

>        Stefan

[ Patch tentatively applied and examined. ]


reply via email to

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