[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#25111: (Inaccurate documentation of inhibit-modification-hooks)
From: |
Alan Mackenzie |
Subject: |
bug#25111: (Inaccurate documentation of inhibit-modification-hooks) |
Date: |
Mon, 27 May 2019 14:31:09 +0000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
Hello, Noam.
On Sat, May 25, 2019 at 10:36:55 -0400, Noam Postavsky wrote:
> Alan Mackenzie <acm@muc.de> writes:
> >>> @@ -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).
> Oh, you're quite right. Here's some test code:
[ .... ]
> Which produces this:
> mod-hook-text-prop (1 4), inhibit? nil
> mod-hook-change-fun (1 4), inhibit? t
> mod-hook-ov-prop (#<overlay from 1 to 5 in *test*> nil 1 4), inhibit? t
> mod-hook-change-fun (1 1 3), inhibit? t
> mod-hook-ov-prop (#<overlay from 1 to 2 in *test*> t 1 1 3), inhibit? t
> mod-hook-change-fun (1 1), inhibit? t
> mod-hook-change-fun (1 4 0), inhibit? t
> I think we need to emphasize the difference in this case, it's rather
> confusing.
Alternatively, we could perhaps regard the first of these results (for
modification-hooks) as a bug in the code, which seems like it ought to be
binding inhibit-modification-hooks to non-nil like the others. Maybe we
should amend the code, even though this would be a jarring
incompatibility with previous Emacs versions. Eli?
[ .... ]
> I've updated the patch based on your and Eli's feedback.
Yes, I agree that "confusing the internal mechanism" is unhelpful here.
Thanks for getting rid of it.
[ .... ]
--
Alan Mackenzie (Nuremberg, Germany).