mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-23 05:17:35 +00:00
Make transpose-regions invoke before-change-functions only once.
In the case of two non-contiguous regions the same size, transpose-regions has been calling before-change-functions twice, once for each region. It now calls it just once, for the minimal region spanning both single regions. * src/editfns.c (Ftranspose_regions): Combine two calls of modify_text into one.
This commit is contained in:
parent
fc31788beb
commit
5fd2297353
1 changed files with 1 additions and 2 deletions
|
|
@ -5293,8 +5293,7 @@ Transposing beyond buffer boundaries is an error. */)
|
|||
{
|
||||
USE_SAFE_ALLOCA;
|
||||
|
||||
modify_text (start1, end1);
|
||||
modify_text (start2, end2);
|
||||
modify_text (start1, end2);
|
||||
record_change (start1, len1);
|
||||
record_change (start2, len2);
|
||||
tmp_interval1 = copy_intervals (cur_intv, start1, len1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue