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: Eli Zaretskii
Subject: Re: Unbalanced change hooks (part 2)
Date: Wed, 03 Aug 2016 05:36:09 +0300

> Date: Tue, 2 Aug 2016 19:38:35 +0000
> Cc: address@hidden, address@hidden, address@hidden, address@hidden
> From: Alan Mackenzie <address@hidden>
> 
> > Btw, I'm slowly but surely arriving to the conclusion that the
> > problems we are discussing can only happen when insert-file-contents
> > is called with VISIT and REPLACE non-nil, i.e. when reverting a
> > buffer.  Do we have any evidence to the contrary?
> 
> As long as C-x C-f on a file changed outside of Emacs is included in
> "reverting", then no.

You will see in files.el that C-x C-f on such a file calls
revert-buffer.

> > If we do, can someone show or point to such contradicting evidence?
> 
> You haven't said how you reached this conclusion.

By reading the code, of course.

> I've grepped for calls of the five functions (insert_1_both,
> replace_range, del_range_\(1\|byte\|both\)) which have `prepare'
> parameters, and noted where the argument is false.  I see 15
> occurrences.  They are in callproc.c, coding.c, editfns.c, fileio.c,
> fns.c, insdel.c, print.c, and xdisp.c.
> 
> Can you persuade me that it wouldn't be a good use of my time to look at
> each of these 15 occurrences?  :-)

You can if you want to, of course.  The above is my conclusion from
looking at all those places: the only one that counts is in
insert-file-contents.



reply via email to

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