comparison 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
comparison
equal deleted inserted replaced
18080:55e03c524041 18081:300068b4fcef
1420 int some_uppercase; 1420 int some_uppercase;
1421 int some_nonuppercase_initial; 1421 int some_nonuppercase_initial;
1422 register int c, prevc; 1422 register int c, prevc;
1423 int inslen; 1423 int inslen;
1424 int sub; 1424 int sub;
1425 int opoint; 1425 int opoint, newpoint;
1426 1426
1427 CHECK_STRING (newtext, 0); 1427 CHECK_STRING (newtext, 0);
1428 1428
1429 if (! NILP (string)) 1429 if (! NILP (string))
1430 CHECK_STRING (string, 4); 1430 CHECK_STRING (string, 4);
1673 if (case_action == all_caps) 1673 if (case_action == all_caps)
1674 Fupcase_region (make_number (PT - inslen), make_number (PT)); 1674 Fupcase_region (make_number (PT - inslen), make_number (PT));
1675 else if (case_action == cap_initial) 1675 else if (case_action == cap_initial)
1676 Fupcase_initials_region (make_number (PT - inslen), make_number (PT)); 1676 Fupcase_initials_region (make_number (PT - inslen), make_number (PT));
1677 1677
1678 newpoint = PT;
1679
1678 /* Put point back where it was in the text. */ 1680 /* Put point back where it was in the text. */
1679 if (opoint < 0) 1681 if (opoint < 0)
1680 temp_set_point (opoint + ZV, current_buffer); 1682 temp_set_point (opoint + ZV, current_buffer);
1681 else 1683 else
1682 temp_set_point (opoint, current_buffer); 1684 temp_set_point (opoint, current_buffer);
1683 1685
1684 /* Now move point "officially" to the start of the inserted replacement. */ 1686 /* Now move point "officially" to the start of the inserted replacement. */
1685 move_if_not_intangible (search_regs.start[sub]); 1687 move_if_not_intangible (newpoint);
1686 1688
1687 return Qnil; 1689 return Qnil;
1688 } 1690 }
1689 1691
1690 static Lisp_Object 1692 static Lisp_Object