emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is it safe to use the combine-after-change-calls like this?


From: Stefan Monnier
Subject: Re: Is it safe to use the combine-after-change-calls like this?
Date: Fri, 26 Apr 2019 08:09:22 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

>> I don’t understand this well. I see that when iedit-mode is on, it
>> calls after-change-functions on change around every active cursors for
>> every char inputing.
>
> One thing which might help in the future is the macro
> combine-change-calls, which is a bit like combine-after-change-calls,
> but also works when before-change-functions isn't nil.

I think in the case of iedit this is problematic, because
combine-change-calls can't be used around code which internally depends
on those before/after functions (e.g. in the present case, it could
misbehave if its behavior depends on the text-properties that are
updated via before/after-change-functions, like syntax-table).

For comment-combine-change-calls, we think it's OK because we hope that
(un)comment-region will not be affected by those stale data, but with
iedit there's much less knowledge/control of the range of code that would
be run within the combine-change-calls, making it more problematic.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]