[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#78042: Improper sequence of `before/after-change-functions` calls
From: |
Stefan Monnier |
Subject: |
bug#78042: Improper sequence of `before/after-change-functions` calls |
Date: |
Fri, 25 Apr 2025 13:39:28 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
>> diff --git a/src/coding.c b/src/coding.c
>> index 63b0dbeb18b..b4209986918 100644
>> --- a/src/coding.c
>> +++ b/src/coding.c
>> @@ -7363,6 +7363,7 @@ decode_coding (struct coding_system *coding)
>> struct ccl_spec cclspec;
>> int carryover;
>> int i;
>> + specpdl_ref count = SPECPDL_INDEX ();
>>
>> USE_SAFE_ALLOCA;
>>
>> @@ -7389,6 +7390,8 @@ decode_coding (struct coding_system *coding)
>>
>> undo_list = BVAR (current_buffer, undo_list);
>> bset_undo_list (current_buffer, Qt);
>> + /* The caller should run *-change-functions over the whole region. */
>> + specbind (Qinhibit_modification_hooks, Qt);
>> }
>
> How do we make sure this requirement is heeded to?
The rest of the code in this function modifies the buffer without
running any `before/after-change-functions` (except for things like
charset properties, which is what I'm trying to suppress), so if a caller
fails to run those hooks we'd know (and the above patch wouldn't make
it worse).
> And how do we document this incompatible change in NEWS?
It's a bug fix, not an incompatible change.
Stefan
- bug#78042: 31.0.50; Improper sequence of `before/after-change-functions` calls, Stefan Monnier, 2025/04/24
- Message not available
- bug#78042: Improper sequence of `before/after-change-functions` calls, Stefan Monnier, 2025/04/24
- bug#78042: Improper sequence of `before/after-change-functions` calls, Eli Zaretskii, 2025/04/25
- bug#78042: Improper sequence of `before/after-change-functions` calls,
Stefan Monnier <=
- bug#78042: Improper sequence of `before/after-change-functions` calls, Eli Zaretskii, 2025/04/25
- bug#78042: Improper sequence of `before/after-change-functions` calls, Stefan Monnier, 2025/04/25
- bug#78042: Improper sequence of `before/after-change-functions` calls, Eli Zaretskii, 2025/04/26
- bug#78042: Improper sequence of `before/after-change-functions` calls, Stefan Monnier, 2025/04/26
- bug#78042: Improper sequence of `before/after-change-functions` calls, Eli Zaretskii, 2025/04/26
bug#78042: 31.0.50; Improper sequence of `before/after-change-functions` calls, Eli Zaretskii, 2025/04/25