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: martin rudalics
Subject: Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw.
Date: Sat, 16 Dec 2006 23:21:44 +0100
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

>> static int
>> find_defun_start (pos, pos_byte)
>>      int pos, pos_byte;
>> {
>>   ...
>>   if (!open_paren_in_column_0_is_defun_start)
>>     {
>>       find_start_value_byte = BEGV_BYTE;
>>       return BEGV;
>>     }
>
>
> Well, it is not like an accident: this is defective by design.

Indeed.

> Short
> of having a column-0 heuristic, there is no way at all to find the
> current nest level (and thus the function beginning) without counting
> all braces from the start of the buffer.

We could, in principle, cache defun starts in a buffer and invalidate
the cached positions following a buffer change.  Stefan does that with
the syntax-ppss cache.





reply via email to

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