Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
18a9f8d9
Commit
18a9f8d9
authored
Feb 27, 2008
by
Stefan Monnier
Browse files
(Finsert_file_contents): Don't reset undo_list if no change
is made to the buffer.
parent
d379ff01
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
src/ChangeLog
src/ChangeLog
+5
-0
src/fileio.c
src/fileio.c
+6
-2
No files found.
src/ChangeLog
View file @
18a9f8d9
2008-02-27 Stefan Monnier <monnier@iro.umontreal.ca>
* fileio.c (Finsert_file_contents): Don't reset undo_list if no change
is made to the buffer.
2008-02-26 Stefan Monnier <monnier@iro.umontreal.ca>
* dispextern.h (face_at_buffer_position, face_for_overlay_string)
...
...
src/fileio.c
View file @
18a9f8d9
...
...
@@ -3716,6 +3716,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
struct
stat
st
;
register
int
fd
;
int
inserted
=
0
;
int
nochange
=
0
;
register
int
how_much
;
register
int
unprocessed
;
int
count
=
SPECPDL_INDEX
();
...
...
@@ -4281,7 +4282,10 @@ variable `last-coding-system-used' to the coding system actually used. */)
{
specpdl_ptr
--
;
/* Truncate the buffer to the size of the file. */
del_range_byte (same_at_start, same_at_end, 0);
if
(
same_at_start
==
same_at_end
)
nochange
=
1
;
else
del_range_byte
(
same_at_start
,
same_at_end
,
0
);
inserted
=
0
;
unbind_to
(
this_count
,
Qnil
);
...
...
@@ -4628,7 +4632,7 @@ variable `last-coding-system-used' to the coding system actually used. */)
if
(
!
NILP
(
visit
))
{
if (!EQ (current_buffer->undo_list, Qt))
if
(
!
EQ
(
current_buffer
->
undo_list
,
Qt
)
&&
!
nochange
)
current_buffer
->
undo_list
=
Qnil
;
if
(
NILP
(
handler
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment