[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r106570: * src/fileio.c (Finsert_file
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r106570: * src/fileio.c (Finsert_file_contents): Move after-change-function call |
Date: |
Thu, 01 Dec 2011 15:19:38 -0500 |
User-agent: |
Bazaar (2.3.1) |
------------------------------------------------------------
revno: 106570
fixes bug(s): http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10117
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Thu 2011-12-01 15:19:38 -0500
message:
* 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.
modified:
src/ChangeLog
src/fileio.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2011-12-01 18:27:52 +0000
+++ b/src/ChangeLog 2011-12-01 20:19:38 +0000
@@ -1,3 +1,10 @@
+2011-12-01 Stefan Monnier <address@hidden>
+
+ * 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 <address@hidden>
* keyboard.c (interrupt_signal): Don't call kill-emacs when
=== modified file 'src/fileio.c'
--- a/src/fileio.c 2011-11-26 21:40:41 +0000
+++ b/src/fileio.c 2011-12-01 20:19:38 +0000
@@ -4100,6 +4100,16 @@
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 @@
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)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r106570: * src/fileio.c (Finsert_file_contents): Move after-change-function call,
Stefan Monnier <=