emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: Mysterious fontification/C++ context issue


From: Chong Yidong
Subject: Re: Mysterious fontification/C++ context issue
Date: Sun, 10 Dec 2006 15:30:49 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

Alan Mackenzie <address@hidden> writes:

>> 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 [t] 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 ;-).

The slowdown has been a big distraction for me.

As I understand, in CC mode the o-p-i-c-0-i-d-s variable is only
relevant for Emacs hackers.  Now:

- If o-p-i-c-0-i-d-s is t, some Emacs source files may get
  misfontified.  But as Martin has pointed out, we can tweak these
  files to follow the o-p-i-c-0-i-d-s standard.  Thus no problem.

- If o-p-i-c-0-i-d-s is nil, there's just no way to avoid a noticeable
  slowdown in the bigger Emacs source file.

So let's make o-p-i-c-0-i-d-s default to t for the release.  If
someone later comes up with a clever c-beginning-of-defun function, we
can switch it back.

In any case, could someone check in Martin's optimization to
c-beginning-of-defun-raw, or send me the patch with a changelog so
that I can check it in?




reply via email to

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