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:44:03 -0400

Because looking_at_1 sets search_regs and last_thing_searched by differing criteria. This patch makes them consistent in my test case.

diff --git a/src/insdel.c b/src/insdel.c
index 8029291..db2147f 100644
--- a/src/insdel.c
+++ b/src/insdel.c

diff --git a/src/search.c b/src/search.c
index ea36133..60658c8 100644
--- a/src/search.c
+++ b/src/search.c
@@ -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]