bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#18022: 24.3; Emacs hard locks when attempting to do a replacement wi


From: Alan Mackenzie
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
User-agent: Mutt/1.5.21 (2010-09-15)

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 via email to

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