]> git.eshelyaron.com Git - emacs.git/commit
(en/decode_coding_object): Fix `after-change-functions`
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 10 Apr 2024 16:15:26 +0000 (12:15 -0400)
committerEshel Yaron <me@eshelyaron.com>
Wed, 10 Apr 2024 20:31:07 +0000 (22:31 +0200)
commit41b195fc08d8cac3caa5519580473d495e1f91d1
tree458621b04b7d1d9fdb93bd9392d606badd778299
parent9c060f9c3e48b69e44bc9d91c79f9a05d7e29410
(en/decode_coding_object): Fix `after-change-functions`

For `en/decode-coding-string/region`, `after-change-functions`
were either not run at all, or run only after deleting the text
but not after inserting it.

* src/coding.c (decode_coding_object, encode_coding_object): Run the
after-change-functions after inserting the result.

* test/src/editfns-tests.el (sanity-check-change-functions-with-op):
New macro.
(sanity-check-change-functions-errors): New function.
(editfns-tests--before/after-change-functions): Use them to add
cases for `en/decode-coding-string/region`.

(cherry picked from commit 36cb16556c60bf4e703764eefd4fb6668ccc37cc)
src/coding.c
test/src/editfns-tests.el