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

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

Re: cperl-mode and fontlock


From: Ilya Zakharevich
Subject: Re: cperl-mode and fontlock
Date: Fri, 25 Sep 2009 10:08:50 +0000 (UTC)
User-agent: slrn/0.9.8.1pl1 (Linux)

On 2009-09-17, Harry Putnam <reader@newsguy.com> wrote:
> As I enter code... syn-hilite appears to be working just as expected
> but as time wears on and some of the code scrolls off the screen,
> Eventually when viewed later syn-hilite has disappeared in all but a
> few items.
>
> Just scrolling code off visible area and back doesn't appear to do it
> ... I'm not sure exactly what does.
>
> If I return to edit some already entered code that has lost its
> syn-hilite, the hilite returns the instant I make any
> modification. But then later I see its left again.
>
> Calling M-x `font-lock-fontify-buffer' does not seem to re-instate the
> syntax highlight where it has already gone away either.
                   ^^^^^

What is this "where"?  Region of buffers, or buffers as a whole?

Just 2 pieces of how I view similar problems:

  a) cperl-mode distributed with RMS Emacs is completely borken.  See
     "my" versions;

  b) I think I have seen things similar to what you describe - about
     5-7 years ago.

     IIRC, font-locking code is designed (?) to make things as hard to
     debug as possible.  Everything is run inside try/catch blocks,
     and all error messages are thrown away.  However, some problems
     accumulate; when too many are accumulated, font-locking stops
     working in the buffer - until you do something like M-x
     normal-mode, which would reset font-locking state.

     So the net result was that bugs in cperl-mode would be invisible
     until they damage font-lock internal state enough to stop it from
     working.  (But this was long time ago, and THESE bugs are long gone...)

Hope this helps,
Ilya


reply via email to

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