From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: martin rudalics Newsgroups: gmane.emacs.bugs Subject: bug#16526: 24.3.50; scroll-conservatively & c-mode regression Date: Fri, 24 Jan 2014 16:45:39 +0100 Message-ID: <52E28AA3.3020509@gmx.at> References: <52E0D87D.2070200@gmx.at> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1390578384 10656 80.91.229.3 (24 Jan 2014 15:46:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jan 2014 15:46:24 +0000 (UTC) Cc: Alan Mackenzie To: 16526@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 24 16:46:30 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W6ixh-0002Gm-UO for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jan 2014 16:46:30 +0100 Original-Received: from localhost ([::1]:47357 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6ixh-0004cz-Ke for geb-bug-gnu-emacs@m.gmane.org; Fri, 24 Jan 2014 10:46:29 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58611) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6ixW-0004YT-97 for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2014 10:46:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W6ixO-0001wF-Od for bug-gnu-emacs@gnu.org; Fri, 24 Jan 2014 10:46:18 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48908) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W6ixG-0001v2-VA; Fri, 24 Jan 2014 10:46:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1W6ixG-0001vP-NX; Fri, 24 Jan 2014 10:46:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: martin rudalics Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, bug-cc-mode@gnu.org Resent-Date: Fri, 24 Jan 2014 15:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 16526 X-GNU-PR-Package: emacs,cc-mode X-GNU-PR-Keywords: Original-Received: via spool by 16526-submit@debbugs.gnu.org id=B16526.13905783487347 (code B ref 16526); Fri, 24 Jan 2014 15:46:02 +0000 Original-Received: (at 16526) by debbugs.gnu.org; 24 Jan 2014 15:45:48 +0000 Original-Received: from localhost ([127.0.0.1]:34690 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W6ix2-0001uR-7V for submit@debbugs.gnu.org; Fri, 24 Jan 2014 10:45:48 -0500 Original-Received: from mout.gmx.net ([212.227.17.21]:61997) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1W6iwx-0001uF-UC for 16526@debbugs.gnu.org; Fri, 24 Jan 2014 10:45:45 -0500 Original-Received: from [62.47.46.45] ([62.47.46.45]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0LngNT-1VepBq1vup-00hrjO for <16526@debbugs.gnu.org>; Fri, 24 Jan 2014 16:45:41 +0100 In-Reply-To: <52E0D87D.2070200@gmx.at> X-Provags-ID: V03:K0:dsi/8tRf2ZbuIybks/CPm6oyGqdwB7fVmZTjNn80ZZ7sbUQQKki 30uXi7JAQipm/zMXxiSdAHCtZ54tmhSeQI/T9eYIVuXAJ1pqyG7MFDKwEgxRzTIdeD5+6Im yjY5JoK4DwfhlFOCPOv5CPK3WOKoZqQ3fxcNiaV9+blD7rJVMuXvA6xe3/ltjRlXITTilTm xbNUeud/uyBB3roG9b6Mw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:83940 Archived-At: 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,