GNU bug report logs -
#16526
24.3.50; scroll-conservatively & c-mode regression
Previous Next
Reported by: martin rudalics <rudalics <at> gmx.at>
Date: Thu, 23 Jan 2014 08:54:02 UTC
Severity: important
Found in version 24.3.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #10 received at 16526 <at> debbugs.gnu.org (full text, mbox):
What happens is that apparently back_comment 530 times scans the buffer
from the beginning of the buffer to the first comment before the current
position where the list of current positions goes like this:
(780 14143 15852 18026 20032 20480 21464 21846 22845 23484 25453 26968
...
942907 943099 944334 948653 948830 948653 948830 948653 948830 948653
948830 780 12)
The bug makes working with c-mode virtually impossible here. So until a
correct solution to the problem is found I intend to install the patch
below in order to get back a working environment.
martin
=== modified file 'src/syntax.c'
--- src/syntax.c 2014-01-01 07:43:34 +0000
+++ src/syntax.c 2014-01-24 15:24:00 +0000
@@ -530,7 +530,8 @@
{
ptrdiff_t opoint = PT, opoint_byte = PT_BYTE;
- if (!open_paren_in_column_0_is_defun_start)
+ if (!open_paren_in_column_0_is_defun_start
+ && !open_paren_in_column_0_is_hard_defun_start)
{
find_start_value = BEGV;
find_start_value_byte = BEGV_BYTE;
@@ -538,6 +539,7 @@
find_start_modiff = MODIFF;
find_start_begv = BEGV;
find_start_pos = pos;
+
return BEGV;
}
@@ -808,7 +810,8 @@
case Sopen:
/* Assume a defun-start point is outside of strings. */
- if (open_paren_in_column_0_is_defun_start
+ if ((open_paren_in_column_0_is_defun_start
+ || open_paren_in_column_0_is_hard_defun_start)
&& (from == stop
|| (temp_byte = dec_bytepos (from_byte),
FETCH_CHAR (temp_byte) == '\n')))
@@ -3608,6 +3611,10 @@
doc: /* Non-nil means an open paren in column 0 denotes the start of a defun. */);
open_paren_in_column_0_is_defun_start = 1;
+ DEFVAR_BOOL ("open-paren-in-column-0-is-hard-defun-start",
+ open_paren_in_column_0_is_hard_defun_start,
+ doc: /* Non-nil means an open paren in column 0 does denote the start of a defun. */);
+ open_paren_in_column_0_is_hard_defun_start = 0;
DEFVAR_LISP ("find-word-boundary-function-table",
Vfind_word_boundary_function_table,
This bug report was last modified 11 years and 17 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.