Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
9d611ffe
Commit
9d611ffe
authored
Jul 25, 2013
by
Paul Eggert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* fileio.c (Finsert_file_contents): Avoid double-close.
Fixes: debbugs:14936
parent
6ccb9cab
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
src/ChangeLog
src/ChangeLog
+4
-0
src/fileio.c
src/fileio.c
+5
-1
No files found.
src/ChangeLog
View file @
9d611ffe
2013-07-25 Paul Eggert <eggert@cs.ucla.edu>
* fileio.c (Finsert_file_contents): Avoid double-close (Bug#14936).
2013-07-24 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (redisplay_window): Instead of moving point out of
...
...
src/fileio.c
View file @
9d611ffe
...
...
@@ -3860,7 +3860,11 @@ by calling `format-decode', which see. */)
if
(
same_at_start
-
BEGV_BYTE
==
end_offset
-
beg_offset
)
{
emacs_close
(
fd
);
specpdl_ptr
--
;
/* Discard the unwind protect for closing the file, and any
unwind protect for restoring point. */
specpdl_ptr
=
specpdl
+
fd_index
;
/* Truncate the buffer to the size of the file. */
del_range_1
(
same_at_start
,
same_at_end
,
0
,
0
);
goto
handled
;
...
...
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