diff options
author | Noam Postavsky <npostavs@gmail.com> | 2016-07-20 20:15:14 -0400 |
---|---|---|
committer | Noam Postavsky <npostavs@gmail.com> | 2016-07-22 23:55:23 -0400 |
commit | 66f95e0dabf750e9d2eff59b2bb6e593618cd48a (patch) | |
tree | a8cd27828bfef2459b70e446cdf1de346327fc3e /src/cmds.c | |
parent | 52cf0d5d98c51c3591ca5d376fd4e85cd9b72d7f (diff) | |
download | emacs-66f95e0dabf750e9d2eff59b2bb6e593618cd48a.tar.gz |
Adjust match data before calling after-change-funs
It's important to adjust the match data in between calling
before-change-functions and after-change-functions, so that buffer
change hooks will always see match-data consistent with buffer content.
(Bug #23917)
* src/insdel.c (replace_range): Add new parameter ADJUST_MATCH_DATA, if
true call update_search_regs. Update all callers (except
Freplace_match) to pass 0 for the new parameter.
* src/search.c (update_search_regs): New function, extracted from
Freplace_match.
(Freplace_match): Remove match data adjustment code, pass 1 for
ADJUST_MATCH_DATA to replace_range instead.
Diffstat (limited to 'src/cmds.c')
-rw-r--r-- | src/cmds.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmds.c b/src/cmds.c index 1e44dddfbf6..4003d8bfa47 100644 --- a/src/cmds.c +++ b/src/cmds.c @@ -447,7 +447,7 @@ internal_self_insert (int c, EMACS_INT n) string = concat2 (string, tem); } - replace_range (PT, PT + chars_to_delete, string, 1, 1, 1); + replace_range (PT, PT + chars_to_delete, string, 1, 1, 1, 0); Fforward_char (make_number (n)); } else if (n > 1) |