unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alan Mackenzie <acm@muc.de>
To: Stefan Monnier <monnier@iro.umontreal.ca>, Eli Zaretskii <eliz@gnu.org>
Cc: Marty Rosenberg <marty.rosenberg@gmail.com>, 18022@debbugs.gnu.org
Subject: bug#18022: 24.3; Emacs hard locks when attempting to do a replacement with ^M in it.
Date: Wed, 23 Jul 2014 18:41:46 +0000	[thread overview]
Message-ID: <20140723184146.GA2969__10694.3049272106$1406141260$gmane$org@acm.acm> (raw)
In-Reply-To: <20140719203310.GA12706@acm.acm>

Hi, everybody!

On Sat, Jul 19, 2014 at 08:33:10PM +0000, Alan Mackenzie wrote:
> Hello, Stefan, Marty and Eli.

> Looking at back_comment, just after the main loop at L+205, we have the
> code which restores point and the current syntax table:

>   if (comstart_pos == 0)
>     {
>       from = comment_end;
>       from_byte = comment_end_byte;
> =>    UPDATE_SYNTAX_TABLE_FORWARD (comment_end - 1);
>     }

> It seems to me that that " - 1" is what is causing the syntax table to be
> restored to the value for ">", and shouldn't be there.  Stefan, am I
> right?

I should have included a patch.  Sorry!  Here it is, in case anybody
didn't feel like working through the textual description.  I think this
fixes the bug, if it's correct.


=== modified file 'src/syntax.c'
*** src/syntax.c	2014-07-09 23:39:58 +0000
--- src/syntax.c	2014-07-23 18:26:45 +0000
***************
*** 825,831 ****
      {
        from = comment_end;
        from_byte = comment_end_byte;
!       UPDATE_SYNTAX_TABLE_FORWARD (comment_end - 1);
      }
    /* If comstart_pos is set and we get here (ie. didn't jump to `lossage'
       or `done'), then we've found the beginning of the non-nested comment.  */
--- 825,831 ----
      {
        from = comment_end;
        from_byte = comment_end_byte;
!       UPDATE_SYNTAX_TABLE_FORWARD (comment_end);
      }
    /* If comstart_pos is set and we get here (ie. didn't jump to `lossage'
       or `done'), then we've found the beginning of the non-nested comment.  */


-- 
Alan Mackenzie (Nuremberg, Germany).





  reply	other threads:[~2014-07-23 18:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-15  3:13 bug#18022: 24.3; Emacs hard locks when attempting to do a replacement with ^M in it Marty Rosenberg
2014-07-15 14:19 ` Eli Zaretskii
     [not found]   ` <CAGv7PEAuRvfarf=Lumi-x-S2UCiK-29=DfET1On6jpyBX1y9=w@mail.gmail.com>
2014-07-15 16:46     ` Eli Zaretskii
2014-07-16 21:41       ` Alan Mackenzie
2014-07-19 20:33         ` Alan Mackenzie
2014-07-23 18:41           ` Alan Mackenzie [this message]
     [not found]           ` <20140723184146.GA2969@acm.acm>
2014-07-25 22:23             ` Stefan Monnier
2014-10-04 18:38             ` Alan Mackenzie
     [not found]             ` <20141004183822.GA3144@acm.acm>
2014-10-04 22:31               ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to='20140723184146.GA2969__10694.3049272106$1406141260$gmane$org@acm.acm' \
    --to=acm@muc.de \
    --cc=18022@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=marty.rosenberg@gmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).