GNU bug report logs - #25111
How modification-hooks let-bind inhibit-modification-hooks?

Previous Next

Package: emacs;

Reported by: "Phillip Lord" <phillip.lord <at> russet.org.uk>

Date: Sun, 4 Dec 2016 20:55:01 UTC

Severity: minor

Done: Alan Mackenzie <acm <at> muc.de>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 25111 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: "Phillip Lord" <phillip.lord <at> russet.org.uk>
Cc: 25111 <at> debbugs.gnu.org
Subject: Re: bug#25111:
Date: Mon, 05 Dec 2016 17:33:25 +0200
> Date: Sun, 4 Dec 2016 20:53:24 -0000
> From: "Phillip Lord" <phillip.lord <at> russet.org.uk>
> 
> The documentation for "modification-hooks" on overlays says:
> 
>      If these functions modify the buffer, they should bind
>      ‘inhibit-modification-hooks’ to ‘t’ around doing so, to avoid
>      confusing the internal mechanism that calls these hooks.
> 
> But as far as I can see, the only place these gets called
> "signal_after_change"
> and "signal_before_change", inhibit-modification-hooks is already specbound
> to t, so this advice is unnecessary.
> 
> Also, the documentation for inhibit-modification-hooks says:
> 
>      If you do want modification hooks to be run in a particular
>      piece of code that is itself run from a modification hook, then
>      rebind locally ‘inhibit-modification-hooks’ to ‘nil’.
> 
> which suggests that, in fact, it is possible to call the modification
> hooks from inside another call to these functions.

Given these two excerpts, it seems to me that there's no inaccuracies
in the manual, perhaps we just need to tell both stories in the same
place or something?  Or do you still think there's something incorrect
in these two fragments?

Thanks.




This bug report was last modified 6 years and 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.