emacs-devel
[Top][All Lists]
Advanced

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

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


From: Chong Yidong
Subject: Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw.
Date: Sat, 16 Dec 2006 15:10:56 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

martin rudalics <address@hidden> writes:

>> 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?

>From my understanding of the code, it will do it for every comment.
So this slowness is triggered by doing a backward scan_list over a
function which contains many comments and lives at the end of a long
file.

> Anyway, I'm afraid there's nothing we can do here at the moment.  I'm
> convinced that this bug is responsible for C mode being slow over the
> past year.  Eventually, Stefan will have to move syntax-ppss in here.
> So far let's avoid setting `open-paren-in-column-0-is-defun-start' to
> nil for _any_ mode.  Unless you have an idea ...

It might be possible to construct a "last known defun start position"
cache variable living in scan_list, so that back_comment can use that
instead of BOB.  But I don't know how desirable or general such a fix
is.




reply via email to

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