[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: |
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.
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., (continued)
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., Alan Mackenzie, 2006/12/17
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., David Kastrup, 2006/12/17
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., Stefan Monnier, 2006/12/17
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., martin rudalics, 2006/12/16
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., Stefan Monnier, 2006/12/16
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., martin rudalics, 2006/12/16
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., David Kastrup, 2006/12/16
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw.,
martin rudalics <=
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., Chong Yidong, 2006/12/14
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., David Kastrup, 2006/12/14
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., Alan Mackenzie, 2006/12/14
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., Stefan Monnier, 2006/12/15
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., David Kastrup, 2006/12/15
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., martin rudalics, 2006/12/14
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., Alan Mackenzie, 2006/12/14
- Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw., Stefan Monnier, 2006/12/15
- Re: Mysterious fontification/C++ context issue, Stefan Monnier, 2006/12/10
- Re: Mysterious fontification/C++ context issue, Kim F. Storm, 2006/12/10