emacs-devel
[Top][All Lists]
Advanced

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

Re: CC Mode 5.31.3 (C/l); defined not emphasised


From: Stefan Monnier
Subject: Re: CC Mode 5.31.3 (C/l); defined not emphasised
Date: Mon, 13 Mar 2006 12:08:53 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> In this example only the first seven 'defined' (up to and including
> defined(pyr)) are emphasised with font-lock-preprocessor-face, then  again
> those in the '#  if defined(hp300)' line. Alan Mackenzie  explained that
> this is due to "problem with jit-lock-mode, which  doesn't cope very well
> with language constructs which extend over  several lines.  You can see
> this by disabling jit-lock-mode with (setq font-lock-support-mode nil),
> after  which the entire file fontifies properly." The last observation

Even without jit-lock, the same problem manifests itself if you go to the
4th `defined' and change the line: only that lines gets refontified by
font-lock and cc-mode's font-lock patterns isn't careful to look back
far enough to rehighlight properly.

I.e. the problem is not in jit-lock but in cc-mode.
(or in font-lock's general lack of support for multiline patterns).

Maybe cc-mode could use the font-lock-multiline property to good
effect here.


        Stefan




reply via email to

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