diff options
| author | Joakim Verona | 2011-09-19 11:37:46 +0200 |
|---|---|---|
| committer | Joakim Verona | 2011-09-19 11:37:46 +0200 |
| commit | 4caed0bee59613be5d2a6c4afabcdc43222f953e (patch) | |
| tree | d0c1debf666ef2107492e6cdd2bc8d6bb17de8a2 /src/fileio.c | |
| parent | c139d20a0c582a2c8fe3766128092c32b692ac23 (diff) | |
| parent | c5b01d8c63cfd14c95a029540a6fb0da84537726 (diff) | |
| download | emacs-4caed0bee59613be5d2a6c4afabcdc43222f953e.tar.gz emacs-4caed0bee59613be5d2a6c4afabcdc43222f953e.zip | |
upstream
Diffstat (limited to 'src/fileio.c')
| -rw-r--r-- | src/fileio.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fileio.c b/src/fileio.c index 08be41f9fe4..e335dcf027f 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -3187,6 +3187,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3187 | Lisp_Object p; | 3187 | Lisp_Object p; |
| 3188 | EMACS_INT total = 0; | 3188 | EMACS_INT total = 0; |
| 3189 | int not_regular = 0; | 3189 | int not_regular = 0; |
| 3190 | int save_errno = 0; | ||
| 3190 | char read_buf[READ_BUF_SIZE]; | 3191 | char read_buf[READ_BUF_SIZE]; |
| 3191 | struct coding_system coding; | 3192 | struct coding_system coding; |
| 3192 | char buffer[1 << 14]; | 3193 | char buffer[1 << 14]; |
| @@ -3250,6 +3251,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 3250 | #endif /* WINDOWSNT */ | 3251 | #endif /* WINDOWSNT */ |
| 3251 | { | 3252 | { |
| 3252 | badopen: | 3253 | badopen: |
| 3254 | save_errno = errno; | ||
| 3253 | if (NILP (visit)) | 3255 | if (NILP (visit)) |
| 3254 | report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); | 3256 | report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); |
| 3255 | st.st_mtime = -1; | 3257 | st.st_mtime = -1; |
| @@ -4281,6 +4283,7 @@ variable `last-coding-system-used' to the coding system actually used. */) | |||
| 4281 | && current_buffer->modtime == -1) | 4283 | && current_buffer->modtime == -1) |
| 4282 | { | 4284 | { |
| 4283 | /* If visiting nonexistent file, return nil. */ | 4285 | /* If visiting nonexistent file, return nil. */ |
| 4286 | errno = save_errno; | ||
| 4284 | report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); | 4287 | report_file_error ("Opening input file", Fcons (orig_filename, Qnil)); |
| 4285 | } | 4288 | } |
| 4286 | 4289 | ||
| @@ -4618,7 +4621,9 @@ This calls `write-region-annotate-functions' at the start, and | |||
| 4618 | if (ret < 0) | 4621 | if (ret < 0) |
| 4619 | { | 4622 | { |
| 4620 | #ifdef CLASH_DETECTION | 4623 | #ifdef CLASH_DETECTION |
| 4624 | save_errno = errno; | ||
| 4621 | if (!auto_saving) unlock_file (lockname); | 4625 | if (!auto_saving) unlock_file (lockname); |
| 4626 | errno = save_errno; | ||
| 4622 | #endif /* CLASH_DETECTION */ | 4627 | #endif /* CLASH_DETECTION */ |
| 4623 | UNGCPRO; | 4628 | UNGCPRO; |
| 4624 | report_file_error ("Lseek error", Fcons (filename, Qnil)); | 4629 | report_file_error ("Lseek error", Fcons (filename, Qnil)); |