[Top][All Lists]

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

Re: Mysterious fontification/C++ context issue

From: Alan Mackenzie
Subject: Re: Mysterious fontification/C++ context issue
Date: 10 Dec 2006 10:12:35 +0100
Date: Sun, 10 Dec 2006 10:22:49 +0000
User-agent: Mutt/1.5.9i

Hi, Chong!

(By the way, apologies if I should be calling you "Yidong".  Please tell
me if I've made a mistake.)

On Sat, Dec 09, 2006 at 08:11:11PM -0500, Chong Yidong wrote:
> Alan Mackenzie <address@hidden> writes:

> > I think I now agree with Martin R: opic0ids should become a fully user
> > settable option, and CC Mode should respect it.  However, I think it
> > needs more than two values, t and nil; it should have three values,
> > "definitely nil", "definitely t" and "don't really care".  The last of
> > these would be an instruction to the major mode to use a
> > mode-dependent default value, the latter defaulting to non-nil.
> > Should it not also become a buffer local variable?

> If there is bad fontification for only one file in Emacs, out of the
> universe of C files, why not set open-paren-in-column-0-is-defun-start
> to be nil for that file, using a file-local variable?

There will be bad fontification in lots of files.  Setting opic0ids to
nil makes Emacs analyse a CC Mode buffer rigorously, correctly and a bit
slowly.  Setting it to t does a rough and ready job which sometimes gives
wierd results.

With Martin Rudalics's optimisation to c-beginning-of-defun-raw, I don't
feel that the slowness is too bad any more (though he does ;-).  In the
extreme case xdisp.c, scrolling to EOB and M-v is mildly sluggish (about
half a second), on my 5 year old Athlon 1.2 GHz machine.  A typical new
PC now is, say, 3 GHZ.  In the time Emacs 22 is the current release, a
typical new PC will come to be around 20 GHz, and this slowness will not


reply via email to

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