[Top][All Lists]

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

Re: Mysterious fontification/C++ context issue - Patch for beginning-of-

From: Stefan Monnier
Subject: Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw.
Date: Sat, 16 Dec 2006 18:29:20 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

>> The trouble is that find_defun_start will scan from bob if
>> open_paren... is 0:

> I see.  Does it do that for every single comment in `syms_of_xdisp' or
> is there something particular which triggers it in certain comments
> only?

The back_comment code tries to only use it when it can't detect the
beginning-of-comment on its own.  Problem is that in C modes this is the
case very often.  IIRC this is the case at least every time a /*..*/ comment
spans two or more lines (because it means it contains a \n which is
a comment marker for the other style of commenting, which makes it
particularly tricky to reliably figure out what's going on).

> convinced that this bug is responsible for C mode being slow over the
> past year.

Sounds credible.

> Eventually, Stefan will have to move syntax-ppss in here.

Anybody's free to take a crack at it.  But I really hope nobody tries to
port syntax-ppss to C code.  The saner approach is to make sure that
elisp code (in this case syntax-ppss) can be called from find_defun_start.


reply via email to

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