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

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

bug#14281: 24.3; replace-match leaves point at wrong place


From: Barry OReilly
Subject: bug#14281: 24.3; replace-match leaves point at wrong place
Date: Wed, 15 May 2013 16:58:45 -0400

Sorry, didn't edit out the unrelated changes correctly.

diff --git a/src/search.c b/src/search.c
index ea36133..60658c8 100644
--- a/src/search.c
+++ b/src/search.c
@@ -328,6 +314,7 @@ looking_at_1 (Lisp_Object string, bool posix)
 
   val = (i >= 0 ? Qt : Qnil);
   if (NILP (Vinhibit_changing_match_data) && i >= 0)
+  {
     for (i = 0; i < search_regs.num_regs; i++)
       if (search_regs.start[i] >= 0)
        {
@@ -336,10 +323,9 @@ looking_at_1 (Lisp_Object string, bool posix)
          search_regs.end[i]
            = BYTE_TO_CHAR (search_regs.end[i] + BEGV_BYTE);
        }
-
-  /* Set last_thing_searched only when match data is changed.  */
-  if (NILP (Vinhibit_changing_match_data))
+    /* Set last_thing_searched only when match data is changed.  */
     XSETBUFFER (last_thing_searched, current_buffer);
+  }
 
   return val;
 }


reply via email to

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