Ensure undo-boundary after insert-file-contents.
* src/fileio.c: Record undoable change during insert-file-contents. Addresses Bug #23785.
This commit is contained in:
parent
4793f5fc41
commit
6cdd8f7153
1 changed files with 6 additions and 0 deletions
|
@ -4047,8 +4047,14 @@ by calling `format-decode', which see. */)
|
||||||
being called in insert_from_buffer (via in
|
being called in insert_from_buffer (via in
|
||||||
prepare_to_modify_buffer). */
|
prepare_to_modify_buffer). */
|
||||||
specbind (intern ("buffer-file-name"), Qnil);
|
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),
|
insert_from_buffer (XBUFFER (conversion_buffer),
|
||||||
same_at_start_charpos, inserted_chars, 0);
|
same_at_start_charpos, inserted_chars, 0);
|
||||||
|
bset_undo_list(current_buffer,Qt);
|
||||||
|
|
||||||
/* Set `inserted' to the number of inserted characters. */
|
/* Set `inserted' to the number of inserted characters. */
|
||||||
inserted = PT - temp;
|
inserted = PT - temp;
|
||||||
/* Set point before the inserted characters. */
|
/* Set point before the inserted characters. */
|
||||||
|
|
Loading…
Add table
Reference in a new issue