diff options
author | Richard M. Stallman <rms@gnu.org> | 1997-04-01 04:25:04 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1997-04-01 04:25:04 +0000 |
commit | 8f9b45ff71e5f0e21ad5751109145fe780b4ce9f (patch) | |
tree | 56aef2ad9c7bb605aae3a53e287acc05f7ee6175 /src/fileio.c | |
parent | c4f4b3330b14971c62b6991051acf9d4eb1669da (diff) | |
download | emacs-8f9b45ff71e5f0e21ad5751109145fe780b4ce9f.tar.gz |
(Fcopy_file): Use Qfile_date_error if can't set file date.
(Qfile_date_error): New variable.
(syms_of_fileio): Set it up.
Diffstat (limited to 'src/fileio.c')
-rw-r--r-- | src/fileio.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c index b925c18c41b..cd8b0c19d0f 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -207,7 +207,7 @@ extern int minibuf_level; static Lisp_Object Vinhibit_file_name_handlers; static Lisp_Object Vinhibit_file_name_operation; -Lisp_Object Qfile_error, Qfile_already_exists; +Lisp_Object Qfile_error, Qfile_already_exists, Qfile_date_error; Lisp_Object Qfile_name_history; @@ -2129,7 +2129,9 @@ A prefix arg makes KEEP-TIME non-nil.") EMACS_SET_SECS_USECS (atime, st.st_atime, 0); EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0); if (set_file_times (XSTRING (newname)->data, atime, mtime)) - report_file_error ("I/O error", Fcons (newname, Qnil)); + Fsignal (Qfile_date_error, + Fcons (build_string ("File already exists"), + Fcons (absname, Qnil))); } #ifndef MSDOS chmod (XSTRING (newname)->data, st.st_mode & 07777); @@ -4789,6 +4791,8 @@ syms_of_fileio () staticpro (&Qfile_error); Qfile_already_exists = intern ("file-already-exists"); staticpro (&Qfile_already_exists); + Qfile_date_error = intern ("file-date-error"); + staticpro (&Qfile_date_error); #ifdef DOS_NT Qfind_buffer_file_type = intern ("find-buffer-file-type"); @@ -4821,6 +4825,12 @@ same format as a regular save would use."); Fput (Qfile_already_exists, Qerror_message, build_string ("File already exists")); + Fput (Qfile_date_error, Qerror_conditions, + Fcons (Qfile_date_error, + Fcons (Qfile_error, Fcons (Qerror, Qnil)))); + Fput (Qfile_date_error, Qerror_message, + build_string ("Cannot set file date")); + DEFVAR_BOOL ("insert-default-directory", &insert_default_directory, "*Non-nil means when reading a filename start with default dir in minibuffer."); insert_default_directory = 1; |