all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: 16526@debbugs.gnu.org
Cc: Alan Mackenzie <acm@muc.de>
Subject: bug#16526: 24.3.50; scroll-conservatively & c-mode regression
Date: Fri, 24 Jan 2014 16:45:39 +0100	[thread overview]
Message-ID: <52E28AA3.3020509@gmx.at> (raw)
In-Reply-To: <52E0D87D.2070200@gmx.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,








  reply	other threads:[~2014-01-24 15:45 UTC|newest]

Thread overview: 93+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.12613.1390467262.10748.bug-gnu-emacs@gnu.org>
2014-01-23  8:53 ` bug#16526: 24.3.50; scroll-conservatively & c-mode regression martin rudalics
2014-01-24 15:45   ` martin rudalics [this message]
2014-01-24 20:48   ` Alan Mackenzie
     [not found]   ` <lbujij$1scv$1@colin.muc.de>
2014-01-25  3:50     ` Juanma Barranquero
2014-01-25  9:23     ` martin rudalics
     [not found]     ` <52E38286.1050306@gmx.at>
2014-01-25 10:30       ` Eli Zaretskii
2014-01-25 14:58         ` martin rudalics
     [not found]         ` <52E3D131.2090705@gmx.at>
2014-01-25 16:30           ` Eli Zaretskii
2014-01-25 16:48             ` martin rudalics
2014-01-25 17:29               ` Eli Zaretskii
2014-01-25 18:25                 ` martin rudalics
     [not found]                 ` <52E4019C.5080905@gmx.at>
2014-01-25 18:31                   ` Eli Zaretskii
2014-01-25 18:40                     ` Eli Zaretskii
2014-01-26 11:20                       ` martin rudalics
     [not found]                       ` <52E4EF61.3050404@gmx.at>
2014-01-26 17:20                         ` Eli Zaretskii
2014-01-26 20:43                           ` Alan Mackenzie
2014-01-27  8:21                             ` martin rudalics
     [not found]                             ` <52E61704.6050807@gmx.at>
2014-01-27 14:49                               ` Stefan Monnier
     [not found]                               ` <jwvvbx5fq2b.fsf-monnier+emacsbugs@gnu.org>
2014-01-27 17:25                                 ` martin rudalics
     [not found]                                 ` <52E69695.5040703@gmx.at>
2014-01-28  0:16                                   ` Stefan Monnier
2014-01-29 22:36                               ` Alan Mackenzie
     [not found]                               ` <20140129223626.GD3092@acm.acm>
2014-01-30  7:37                                 ` martin rudalics
2014-01-30 13:47                                   ` martin rudalics
     [not found]                                   ` <52EA57D6.5080403@gmx.at>
2014-01-30 17:15                                     ` Eli Zaretskii
2014-01-30 18:58                                       ` martin rudalics
     [not found]                                       ` <52EAA0C9.1090000@gmx.at>
2014-02-01 10:41                                         ` Eli Zaretskii
2014-02-02 13:18                                           ` martin rudalics
2014-02-02 17:40                                           ` Alan Mackenzie
     [not found]                                           ` <20140202174050.GA5365@acm.acm>
2014-02-02 18:07                                             ` Eli Zaretskii
2014-02-02 19:20                                               ` Alan Mackenzie
2014-02-02 20:53                                                 ` Eli Zaretskii
2014-02-05 23:00                                                   ` Alan Mackenzie
2014-02-06  6:01                                                     ` Eli Zaretskii
2014-06-22 16:49                                                       ` Eli Zaretskii
2014-06-22 19:32                                                         ` Alan Mackenzie
2014-06-22 20:04                                                           ` Eli Zaretskii
2014-06-25 21:32                                                         ` Alan Mackenzie
2014-06-26  2:51                                                           ` Stefan Monnier
2014-06-27 20:34                                                             ` Alan Mackenzie
2014-06-27 22:33                                                               ` Stefan Monnier
2014-06-27 22:54                                                                 ` Stefan Monnier
     [not found]                                                                 ` <jwv8uoim0bm.fsf-monnier+emacsbugs@gnu.org>
2014-06-28 13:00                                                                   ` Alan Mackenzie
2014-06-28 14:00                                                                     ` martin rudalics
2014-06-28 14:34                                                                     ` Stefan Monnier
     [not found]                                                                     ` <53AECA88.7010401@gmx.at>
2014-06-28 14:55                                                                       ` Alan Mackenzie
2014-06-28 15:12                                                                         ` Eli Zaretskii
2014-06-28 16:30                                                                           ` Alan Mackenzie
2014-06-29  8:44                                                                         ` martin rudalics
2014-06-29  9:17                                                                           ` Alan Mackenzie
2014-06-29 10:06                                                                             ` martin rudalics
     [not found]                                                                             ` <53AFE536.7010407@gmx.at>
2014-06-29 12:48                                                                               ` Alan Mackenzie
2014-06-29 14:18                                                                                 ` martin rudalics
2014-06-29 14:41                                                                                   ` Alan Mackenzie
     [not found]                                                                                   ` <20140629144151.GD2948@acm.acm>
2014-06-29 16:01                                                                                     ` martin rudalics
     [not found]                                                                                     ` <53B03876.9070307@gmx.at>
2014-06-29 17:49                                                                                       ` Alan Mackenzie
2014-06-30  7:55                                                                                         ` martin rudalics
2014-06-30 13:48                                                                                         ` Stefan Monnier
     [not found]                                                                                         ` <53B117D6.1050306@gmx.at>
2014-07-02 20:05                                                                                           ` Alan Mackenzie
     [not found]                                                                                           ` <20140702200522.GB3823@acm.acm>
2014-07-03  1:57                                                                                             ` Stefan Monnier
2014-07-03  8:40                                                                                             ` martin rudalics
     [not found]                                                                                             ` <jwv61jf2owy.fsf-monnier+emacsbugs@gnu.org>
2014-07-03 14:59                                                                                               ` Stefan Monnier
2014-07-04 18:27                                                                                                 ` Alan Mackenzie
2014-07-04 19:11                                                                                                   ` Stefan Monnier
2014-07-04 19:43                                                                                                   ` Stefan Monnier
2014-07-05  2:23                                                                                                     ` Stefan Monnier
2014-07-06 13:48                                                                                                       ` Alan Mackenzie
2014-07-07  1:52                                                                                                         ` Stefan Monnier
2014-07-07  7:07                                                                                                         ` martin rudalics
     [not found]                                                                                                         ` <jwvsimevsvz.fsf-monnier+emacsbugs@gnu.org>
2014-07-07  7:07                                                                                                           ` martin rudalics
2014-07-05 20:25                                                                                                     ` Alan Mackenzie
2014-07-05 23:06                                                                                                       ` Stefan Monnier
2014-07-04 19:29                                                                                               ` Alan Mackenzie
2014-07-05  1:52                                                                                                 ` Stefan Monnier
2014-07-05  7:47                                                                                                   ` Alan Mackenzie
2014-06-29 22:14                                                                                     ` Stefan Monnier
     [not found]                                                                                     ` <jwvionjjrn7.fsf-monnier+emacsbugs@gnu.org>
2014-07-02 18:40                                                                                       ` Alan Mackenzie
     [not found]                                                                                       ` <20140702184013.GA3823@acm.acm>
2014-07-02 19:40                                                                                         ` Stefan Monnier
     [not found]                                                                     ` <jwvsimpksv1.fsf-monnier+emacsbugs@gnu.org>
2014-06-28 17:33                                                                       ` Alan Mackenzie
     [not found]                                                                       ` <20140628173334.GB2632@acm.acm>
2014-06-29 21:39                                                                         ` Stefan Monnier
2014-01-29 21:52                             ` Alan Mackenzie
2014-01-30 17:16                               ` Eli Zaretskii
2014-01-31 20:00                                 ` Alan Mackenzie
2014-01-31 20:16                                   ` Eli Zaretskii
2014-01-27  8:20                           ` martin rudalics
2014-01-27 16:23                             ` Eli Zaretskii
2014-01-27 17:26                               ` martin rudalics
2014-01-26 11:19                     ` martin rudalics
2014-01-25 20:27           ` bug#16526: 24.3.50; scroll-conservatively & c-mode regression. The purpose of revision 116070 Alan Mackenzie
     [not found]           ` <20140125202721.GA3630@acm.acm>
2014-01-25 23:02             ` Stefan Monnier
2014-01-26  3:41             ` Eli Zaretskii
2014-01-26  9:54               ` Alan Mackenzie
2014-01-26 16:33                 ` Eli Zaretskii
2014-01-26 17:35             ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E28AA3.3020509@gmx.at \
    --to=rudalics@gmx.at \
    --cc=16526@debbugs.gnu.org \
    --cc=acm@muc.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.