aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPhillip Lord2016-06-20 14:26:02 +0100
committerPhillip Lord2016-06-21 21:34:08 +0100
commit6cdd8f7153b553c6dc02be47e04a2e75117b6fe4 (patch)
tree671ce7e9a84faac705a5872fd15200e07537d016 /src
parent4793f5fc417ae687e609ba5591353a3a9185d635 (diff)
downloademacs-6cdd8f7153b553c6dc02be47e04a2e75117b6fe4.tar.gz
emacs-6cdd8f7153b553c6dc02be47e04a2e75117b6fe4.zip
Ensure undo-boundary after insert-file-contents.
* src/fileio.c: Record undoable change during insert-file-contents. Addresses Bug #23785.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c
index b11f9233ab4..746aac42a9c 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4047,8 +4047,14 @@ by calling `format-decode', which see. */)
4047 being called in insert_from_buffer (via in 4047 being called in insert_from_buffer (via in
4048 prepare_to_modify_buffer). */ 4048 prepare_to_modify_buffer). */
4049 specbind (intern ("buffer-file-name"), Qnil); 4049 specbind (intern ("buffer-file-name"), Qnil);
4050
4051 /* Temporarily enable the undo-buffer to ensure that the change
4052 is marked as an undoable one. Bug #23785. */
4053 bset_undo_list(current_buffer,Qnil);
4050 insert_from_buffer (XBUFFER (conversion_buffer), 4054 insert_from_buffer (XBUFFER (conversion_buffer),
4051 same_at_start_charpos, inserted_chars, 0); 4055 same_at_start_charpos, inserted_chars, 0);
4056 bset_undo_list(current_buffer,Qt);
4057
4052 /* Set `inserted' to the number of inserted characters. */ 4058 /* Set `inserted' to the number of inserted characters. */
4053 inserted = PT - temp; 4059 inserted = PT - temp;
4054 /* Set point before the inserted characters. */ 4060 /* Set point before the inserted characters. */