GNU bug report logs -
#25111
How modification-hooks let-bind inhibit-modification-hooks?
Previous Next
Full log
View this message in rfc822 format
Hello, Noam.
On Sat, May 25, 2019 at 08:39:39 -0400, Noam Postavsky wrote:
> Alan Mackenzie <acm <at> muc.de> writes:
> > @@ -1743,9 +1743,17 @@ Overlay Properties
> > However, doing this can sometimes confuse the internal
> > +mechanism that calls all these hooks, leading, for example, to calling
> > +them recursively, which is usually unwanted.
> > @@ -3621,9 +3621,14 @@ Special Properties
> > +When Emacs calls these functions, @code{inhibit-modification-hooks} is
> > +set to @code{nil}.
> As Phillip mentioned in the OP, Emacs in fact binds it to t.
Are you sure? We're talking here about the text property (in which I
think inhibit-modification-hooks IS at nil) as opposed to the overlay
property (where inhibit-modification-hooks is bound to t).
I admit just to having examined the source code rather than actually
trying it out. But in verify_interval_modification in textprop.c, near
the end, we have:
if (!inhibit_modification_hooks)
{
hooks = Fnreverse (hooks);
while (! NILP (hooks))
{
call_mod_hooks (Fcar (hooks), make_fixnum (start),
make_fixnum (end));
hooks = Fcdr (hooks);
}
}
. Here, mod_hooks is a list of modification-hooks combined with
positions. call_mod_hooks only gets called when
inhibit-modification-hooks is nil. call_mod_hooks just calls the hooks,
without binding i-m-h.
Are you really sure?
I'll answer the rest of your post later, I've got a lot on in Real Life
at the moment.
[ .... ]
--
Alan Mackenzie (Nuremberg, Germany).
This bug report was last modified 6 years and 29 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.