emacs-devel
[Top][All Lists]
Advanced

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

Re: Unbalanced change hooks (part 2)


From: Noam Postavsky
Subject: Re: Unbalanced change hooks (part 2)
Date: Sun, 31 Jul 2016 09:58:50 -0400

On Sun, Jul 31, 2016 at 8:16 AM, Alan Mackenzie <address@hidden> wrote:
>
> The pertinent functions are insert_1_both, replace_range, del_range_1,
> del_range_byte, and del_range_both.  These functions fall into two
> groups, the first two in group 1 and the rest in group 2.  Those in group
> 2 always call signal_after_change, those in group 1 never do.

replace_range should be in group 2 as well, no?

>
> There are invocations of group 2 functions with `prepare' false.  This
> wrongly invokes after-change-functions without having invoked
> before-change-functions.

replace_range has one call with prepare = false, it's in
Fsubst_char_in_region. I think the idea is that the caller takes care
of calling both before (by calling modify_text) and after (by explicit
call and/or(??) by replace_range) change functions, though the code is
sufficiently convuluted that I can't really say whether it works
correctly or not.



reply via email to

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