[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Extensive changes during pretest
From: |
Alan Mackenzie |
Subject: |
Re: Extensive changes during pretest |
Date: |
Sun, 24 Feb 2008 20:11:23 +0000 |
User-agent: |
Mutt/1.5.9i |
Hi, Juri!
On Sun, Feb 24, 2008 at 09:31:00PM +0200, Juri Linkov wrote:
> >> The bug was in incorrect fontification, right?
> > Incorrect fontification over the entire buffer after the #warning
> > line (or at least until the next apostrophe within a comment). It
> > also made M-[ae] (statement/sentence movement) and C-M-[ae]
> > (function movement) and probably quite a lot else (anything
> > involving the syntax table) go haywire.
> There are many other modes that often cause incorrect fontification
> after a quote or some other special character. Is there a way to
> prevent such incorrect fontification (other than a hack of modifying
> the source file and putting the closing character in the comments)?
> Maybe there should be a limit on the maximum length of a string to
> fontify as a string?
The way I did it was by putting a 'punctuation syntax-table property on
each umatched string quote (and also each unmatched brace/bracket/paren).
The meat of this is in `c-neutralize-CPP-line' in cc-mode.el.
The essential precondition here is that C preprocessor lines live,
logically, in a different world from other statements, a bit like in
chess there are white-squared bishops and black-squared bishops.
> Juri Linkov
--
Alan Mackenzie (Nuremberg, Germany).
- Re: Extensive changes during pretest, (continued)
- Re: Extensive changes during pretest, Alan Mackenzie, 2008/02/23
- Re: Extensive changes during pretest, Eli Zaretskii, 2008/02/23
- Re: Extensive changes during pretest, Alan Mackenzie, 2008/02/24
- Re: Extensive changes during pretest, Eli Zaretskii, 2008/02/24
- Re: Extensive changes during pretest, Alan Mackenzie, 2008/02/24
- Re: Extensive changes during pretest, Eli Zaretskii, 2008/02/24
- Re: Extensive changes during pretest, Alan Mackenzie, 2008/02/24
- Re: Extensive changes during pretest, Eli Zaretskii, 2008/02/24
- Re: Extensive changes during pretest, Alan Mackenzie, 2008/02/24
- Re: Extensive changes during pretest, Juri Linkov, 2008/02/24
- Re: Extensive changes during pretest,
Alan Mackenzie <=
Re: Extensive changes during pretest, Richard Stallman, 2008/02/23
Re: Extensive changes during pretest, Michael McNamara, 2008/02/25