diff src/search.c @ 18081:300068b4fcef

(Freplace_match): Fix previous change.
author Richard M. Stallman <rms@gnu.org>
date Sat, 31 May 1997 19:20:26 +0000
parents 27a0ced43e7e
children fa7208c8ac02
line wrap: on
line diff
--- a/src/search.c	Sat May 31 18:30:56 1997 +0000
+++ b/src/search.c	Sat May 31 19:20:26 1997 +0000
@@ -1422,7 +1422,7 @@
   register int c, prevc;
   int inslen;
   int sub;
-  int opoint;
+  int opoint, newpoint;
 
   CHECK_STRING (newtext, 0);
 
@@ -1675,6 +1675,8 @@
   else if (case_action == cap_initial)
     Fupcase_initials_region (make_number (PT - inslen), make_number (PT));
 
+  newpoint = PT;
+
   /* Put point back where it was in the text.  */
   if (opoint < 0)
     temp_set_point (opoint + ZV, current_buffer);
@@ -1682,7 +1684,7 @@
     temp_set_point (opoint, current_buffer);
 
   /* Now move point "officially" to the start of the inserted replacement.  */
-  move_if_not_intangible (search_regs.start[sub]);
+  move_if_not_intangible (newpoint);
   
   return Qnil;
 }