Commit 0068070e authored by Stefan Monnier's avatar Stefan Monnier

* src/fileio.c (Finsert_file_contents): Move after-change-function call

to before the "handled:" label, since all "goto handled" appear in
cases where the *-change-functions have already been properly called.

Fixes: debbugs:10117
parent 9505c3c7
2011-12-01 Stefan Monnier <monnier@iro.umontreal.ca>
* fileio.c (Finsert_file_contents): Move after-change-function call
to before the "handled:" label, since all "goto handled" appear in
cases where the *-change-functions have already been properly called
(bug#10117).
2011-12-01 Andreas Schwab <schwab@linux-m68k.org>
* keyboard.c (interrupt_signal): Don't call kill-emacs when
......
......@@ -4100,6 +4100,16 @@ variable `last-coding-system-used' to the coding system actually used. */)
adjust_after_insert (PT, PT_BYTE, PT + inserted, PT_BYTE + inserted,
inserted);
/* Call after-change hooks for the inserted text, aside from the case
of normal visiting (not with REPLACE), which is done in a new buffer
"before" the buffer is changed. */
if (inserted > 0 && total > 0
&& (NILP (visit) || !NILP (replace)))
{
signal_after_change (PT, 0, inserted);
update_compositions (PT, PT, CHECK_BORDER);
}
/* Now INSERTED is measured in characters. */
handled:
......@@ -4270,16 +4280,6 @@ variable `last-coding-system-used' to the coding system actually used. */)
unbind_to (count1, Qnil);
}
/* Call after-change hooks for the inserted text, aside from the case
of normal visiting (not with REPLACE), which is done in a new buffer
"before" the buffer is changed. */
if (inserted > 0 && total > 0
&& (NILP (visit) || !NILP (replace)))
{
signal_after_change (PT, 0, inserted);
update_compositions (PT, PT, CHECK_BORDER);
}
if (!NILP (visit)
&& current_buffer->modtime == -1)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment