[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-25 6cdd8f7: Ensure undo-boundary after insert-file-c
From: |
Phillip Lord |
Subject: |
[Emacs-diffs] emacs-25 6cdd8f7: Ensure undo-boundary after insert-file-contents. |
Date: |
Tue, 21 Jun 2016 20:35:13 +0000 (UTC) |
branch: emacs-25
commit 6cdd8f7153b553c6dc02be47e04a2e75117b6fe4
Author: Phillip Lord <address@hidden>
Commit: Phillip Lord <address@hidden>
Ensure undo-boundary after insert-file-contents.
* src/fileio.c: Record undoable change during insert-file-contents.
Addresses Bug #23785.
---
src/fileio.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/fileio.c b/src/fileio.c
index b11f923..746aac4 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -4047,8 +4047,14 @@ by calling `format-decode', which see. */)
being called in insert_from_buffer (via in
prepare_to_modify_buffer). */
specbind (intern ("buffer-file-name"), Qnil);
+
+ /* Temporarily enable the undo-buffer to ensure that the change
+ is marked as an undoable one. Bug #23785. */
+ bset_undo_list(current_buffer,Qnil);
insert_from_buffer (XBUFFER (conversion_buffer),
same_at_start_charpos, inserted_chars, 0);
+ bset_undo_list(current_buffer,Qt);
+
/* Set `inserted' to the number of inserted characters. */
inserted = PT - temp;
/* Set point before the inserted characters. */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-25 6cdd8f7: Ensure undo-boundary after insert-file-contents.,
Phillip Lord <=