]> git.eshelyaron.com Git - emacs.git/commit
buffer.c: evaporate overlays in all indirect buffers
authorStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Nov 2022 21:22:37 +0000 (17:22 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Sat, 5 Nov 2022 21:22:37 +0000 (17:22 -0400)
commit6e5ec085510ccf52ac6cb07c3a1a2778324a1d89
tree0ad67bf3aa5a7a6c9eb9e01754e5f57da19dd4b6
parent5c9895fffe4e34b7a31b0a8e4bce0b59a4bc0326
buffer.c: evaporate overlays in all indirect buffers

This fixes bug#58928.  The patch works by moving the
`evaporate_overlays` check closer to `itree_delete_gap`.

* src/buffer.c (adjust_overlays_for_delete_in_buffer): New function,
integrating the functionality of `evaporate_overlays`.
(adjust_overlays_for_delete): Use it.
(evaporate_overlays): Delete function.

* src/buffer.h (evaporate_overlays): Delete declaration.

* src/insdel.c (adjust_markers_for_replace): Minor optimization.
(adjust_after_replace, replace_range, replace_range_2, del_range_2):
Don't call `evaporate_overlays`.

* test/src/buffer-tests.el (buffer-tests--overlays-indirect-evaporate):
Remove the `:expected-result :failed` attribute.
src/buffer.c
src/buffer.h
src/insdel.c
test/src/buffer-tests.el