[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#65451: 30.0.50; `after-change-functions' are not triggered in the sa
From: |
Stefan Monnier |
Subject: |
bug#65451: 30.0.50; `after-change-functions' are not triggered in the same order the changes are made |
Date: |
Sun, 31 Mar 2024 09:57:55 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> > I suspect the best option in the above case is to inhibit the inner
>> > calls to before/after (assuming we're sure they change only the "new
>> > text"), so we'd be down to:
>> >
>> > ⛔ Warning (emacs): Before: 1278 1281
>> > ⛔ Warning (emacs): After: 1278 1288 delta: 7
>>
>> A simpler option is the patch below.
>
> Doesn't that miss the changes done by upcase-region?
No: `upcase-region` runs its own `before/after-change-functions`
(indeed, these were the problematic nested ones which break the order).
> Also, what about point not being after the inserted replacement at
> that place?
`*-change-functions` can't rely on the position of point so that's not
an issue.
Stefan