diff options
author | Eli Zaretskii <eliz@gnu.org> | 2011-09-11 01:52:07 -0400 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2011-09-11 01:52:07 -0400 |
commit | b885bf36cf2c7f79517a1c797fd09e7adc3358c6 (patch) | |
tree | 7318a11f0659121c5d9c5a92a6f7133b66647902 /src | |
parent | ee0e9f11ea2823550c4593d0d339b972911358b8 (diff) | |
download | emacs-b885bf36cf2c7f79517a1c797fd09e7adc3358c6.tar.gz |
Fix bug #9139 with revisiting non-existent files.
src/fileio.c (Finsert_file_contents): If the file cannot be opened,
set its "size" to -1. This will set the modtime_size field of
the corresponding buffer to -1, which is what
verify-visited-file-modtime expects for files that do not exist.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 8 | ||||
-rw-r--r-- | src/fileio.c | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index da0576fdb46..d9891e457ac 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,11 @@ +2011-09-11 Eli Zaretskii <eliz@gnu.org> + + * fileio.c (Finsert_file_contents): If the file cannot be opened, + set its "size" to -1. This will set the modtime_size field of + the corresponding buffer to -1, which is what + verify-visited-file-modtime expects for files that do not exist. + (Bug#9139) + 2011-09-11 Paul Eggert <eggert@cs.ucla.edu> * keymap.h (KEY_DESCRIPTION_SIZE, push_key_description): Move decls diff --git a/src/fileio.c b/src/fileio.c index 2b31e18442b..2c478bac98f 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -3253,6 +3253,7 @@ variable `last-coding-system-used' to the coding system actually used. */) if (NILP (visit)) report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); st.st_mtime = -1; + st.st_size = -1; how_much = 0; if (!NILP (Vcoding_system_for_read)) Fset (Qbuffer_file_coding_system, Vcoding_system_for_read); |