[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: Chong Yidong
Subject: Re: Mysterious fontification/C++ context issue - Patch for beginning-of-defun-raw.
Date: Sat, 16 Dec 2006 14:33:59 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux)

martin rudalics <address@hidden> writes:

> To elaborate on my last mail: I think the bug is in back_comment and may
> affect any mode setting `open-paren-in-column-0-is-defun-start' to nil.
> My gdb is currently on strike, so could someone please try to debug
> where back_comment spends its time when applying scan_lists to
> syms_of_xdisp?  Maybe there's an easy solution.
> Otherwise we'll have to set `open-paren-in-column-0-is-defun-start' to t
> in C mode until someone fixes this.

It's the part in syntax.c:701 which says

 /* If we did not already find the defun start, find it now.  */
 if (defun_start == 0)
     defun_start = find_defun_start (comment_end, comment_end_byte);
     defun_start_byte = find_start_value_byte;

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

 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;

reply via email to

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