diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/search.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/search.c b/src/search.c index 720012dfc5a..5e86e1cab54 100644 --- a/src/search.c +++ b/src/search.c | |||
| @@ -1422,7 +1422,7 @@ since only regular expressions have distinguished subexpressions.") | |||
| 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 | ||
| @@ -1675,6 +1675,8 @@ since only regular expressions have distinguished subexpressions.") | |||
| 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); |
| @@ -1682,7 +1684,7 @@ since only regular expressions have distinguished subexpressions.") | |||
| 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 | } |