]> git.eshelyaron.com Git - emacs.git/commit
Update tree-sitter subroutine in Fsubst_char_in_region
authorYuan Fu <casouri@gmail.com>
Sat, 15 Mar 2025 05:56:18 +0000 (22:56 -0700)
committerEshel Yaron <me@eshelyaron.com>
Tue, 29 Apr 2025 07:34:30 +0000 (09:34 +0200)
commit4f4515c8d044c43d46f980a99994857d8e418ed4
tree8bfcfe30b86b812d6022910575fd15bad30b9d7b
parent8e011202d4702d61555e6089355686dabe70f323
Update tree-sitter subroutine in Fsubst_char_in_region

Some explanation: Fsubst_char_in_region used to have a branch,
one branch path calls replace_range, one branch path modifies
the buffer directly.  replace_range already calls
treesit_record_change within it, so we needed to make sure we
only call treesit_record_change in the other branch path.

After I added the call to treesit_record_change, some changes
are made to Fsubst_char_in_region, and the branch was removed.
So no wonder Stefan had the confusion and wrote the FIXME note.

Now that the branch is gone, we can indeed call
treesit_record_change in the end like signal_after_change.

* src/editfns.c (Fsubst_char_in_region): Move to end.

(cherry picked from commit 3c47139b8f602286a8c5c5ca72431b933b4f2a23)
src/editfns.c