From: Eli Zaretskii <eliz@gnu.org>
To: Noam Postavsky <npostavs@users.sourceforge.net>
Cc: 25111@debbugs.gnu.org, phillip.lord@russet.org.uk
Subject: bug#25111: How modification-hooks let-bind inhibit-modification-hooks?
Date: Mon, 05 Dec 2016 20:37:09 +0200 [thread overview]
Message-ID: <83oa0qjk8a.fsf@gnu.org> (raw)
In-Reply-To: <CAM-tV--B_g_LDRPi00gTqGxxBFvtiyERsw10__XxDu5HbTDORA@mail.gmail.com> (message from Noam Postavsky on Mon, 5 Dec 2016 12:39:29 -0500)
> From: Noam Postavsky <npostavs@users.sourceforge.net>
> Date: Mon, 5 Dec 2016 12:39:29 -0500
> Cc: Phillip Lord <phillip.lord@russet.org.uk>, 25111@debbugs.gnu.org
>
> >> 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?
>
> Would following the advice in the second fragment confuse the
> "internal mechanism" (as suggested in the first fragment) or not?
Only if the other hooks that modify buffer, and do NOT want hooks to
be run, don't bind inhibit-modification-hooks to t. AFAIU, at least.
next prev parent reply other threads:[~2016-12-05 18:37 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-04 20:53 bug#25111: Phillip Lord
2016-12-05 15:33 ` bug#25111: Eli Zaretskii
[not found] ` <87wpfbpual.fsf@russet.org.uk>
2016-12-07 16:40 ` bug#25111: Phillip Lord
[not found] ` <WM!2f8d5bad87de09a0621b1f025704a97dd719ed1ae7d08e03f6b419e215cd51bc54917b522795d7421de3533c07950608!@mailhub-mx1>
2016-12-08 15:55 ` bug#25111: Eli Zaretskii
2016-12-09 17:17 ` bug#25111: Phillip Lord
2016-12-09 17:26 ` bug#25111: Eli Zaretskii
2016-12-11 22:11 ` bug#25111: Phillip Lord
2016-12-12 16:06 ` bug#25111: Eli Zaretskii
2019-05-19 20:31 ` bug#25111: (Inaccurate documentation of inhibit-modification-hooks) Alan Mackenzie
2019-05-25 12:39 ` Noam Postavsky
2019-05-25 13:44 ` Alan Mackenzie
2019-05-25 14:36 ` Noam Postavsky
2019-05-27 14:31 ` Alan Mackenzie
2019-06-03 19:15 ` Alan Mackenzie
2019-06-03 19:26 ` npostavs
2019-06-04 9:32 ` Alan Mackenzie
2019-06-04 14:36 ` Eli Zaretskii
2019-06-09 12:00 ` Eli Zaretskii
2019-06-09 20:45 ` Alan Mackenzie
2019-06-24 12:52 ` Alan Mackenzie
2019-06-24 22:48 ` Noam Postavsky
2019-06-25 9:17 ` Alan Mackenzie
2019-05-25 13:49 ` Eli Zaretskii
2016-12-05 17:39 ` bug#25111: How modification-hooks let-bind inhibit-modification-hooks? Noam Postavsky
2016-12-05 18:37 ` Eli Zaretskii [this message]
2017-03-09 19:34 ` Noam Postavsky
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83oa0qjk8a.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=25111@debbugs.gnu.org \
--cc=npostavs@users.sourceforge.net \
--cc=phillip.lord@russet.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.