aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
authorKim F. Storm <[email protected]>2006-07-18 13:27:48 +0000
committerKim F. Storm <[email protected]>2006-07-18 13:27:48 +0000
commit24b1ddad0b6c5a33b58057066dff750fe3567b33 (patch)
treedabcdb76146122542b3194d6bd3d86db1f20274e /src/fileio.c
parent734d55a2bd7fa9e9d122cf8aa1090adb52197763 (diff)
(report_file_error): Use xsignal.
(barf_or_query_if_file_exists, Fcopy_file, Fdelete_file) (Finsert_file_contents): Use xsignal2. (syms_of_fileio): Use list2, list3.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c48
1 files changed, 20 insertions, 28 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 21e6fd3a86..d26b280872 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -280,7 +280,7 @@ report_file_error (string, data)
switch (errorno)
{
case EEXIST:
- Fsignal (Qfile_already_exists, Fcons (errstring, data));
+ xsignal (Qfile_already_exists, Fcons (errstring, data));
break;
default:
/* System error messages are capitalized. Downcase the initial
@@ -288,7 +288,7 @@ report_file_error (string, data)
if (SREF (errstring, 1) != '/')
SSET (errstring, 0, DOWNCASE (SREF (errstring, 0)));
- Fsignal (Qfile_error,
+ xsignal (Qfile_error,
Fcons (build_string (string), Fcons (errstring, data)));
}
}
@@ -2384,9 +2384,8 @@ barf_or_query_if_file_exists (absname, querystring, interactive, statptr, quick)
if (lstat (SDATA (encoded_filename), &statbuf) >= 0)
{
if (! interactive)
- Fsignal (Qfile_already_exists,
- Fcons (build_string ("File already exists"),
- Fcons (absname, Qnil)));
+ xsignal2 (Qfile_already_exists,
+ build_string ("File already exists"), absname);
GCPRO1 (absname);
tem = format2 ("File %s already exists; %s anyway? ",
absname, build_string (querystring));
@@ -2396,9 +2395,8 @@ barf_or_query_if_file_exists (absname, querystring, interactive, statptr, quick)
tem = do_yes_or_no_p (tem);
UNGCPRO;
if (NILP (tem))
- Fsignal (Qfile_already_exists,
- Fcons (build_string ("File already exists"),
- Fcons (absname, Qnil)));
+ xsignal2 (Qfile_already_exists,
+ build_string ("File already exists"), absname);
if (statptr)
*statptr = statbuf;
}
@@ -2500,9 +2498,8 @@ uid and gid of FILE to NEWNAME. */)
{
/* Restore original attributes. */
SetFileAttributes (filename, attributes);
- Fsignal (Qfile_date_error,
- Fcons (build_string ("Cannot set file date"),
- Fcons (newname, Qnil)));
+ xsignal2 (Qfile_date_error,
+ build_string ("Cannot set file date"), newname);
}
/* Restore original attributes. */
SetFileAttributes (filename, attributes);
@@ -2598,9 +2595,8 @@ uid and gid of FILE to NEWNAME. */)
EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0);
if (set_file_times (SDATA (encoded_newname),
atime, mtime))
- Fsignal (Qfile_date_error,
- Fcons (build_string ("Cannot set file date"),
- Fcons (newname, Qnil)));
+ xsignal2 (Qfile_date_error,
+ build_string ("Cannot set file date"), newname);
}
}
@@ -2696,9 +2692,9 @@ If file has multiple names, it continues to exist with the other names. */)
GCPRO1 (filename);
if (!NILP (Ffile_directory_p (filename))
&& NILP (Ffile_symlink_p (filename)))
- Fsignal (Qfile_error,
- Fcons (build_string ("Removing old name: is a directory"),
- Fcons (filename, Qnil)));
+ xsignal2 (Qfile_error,
+ build_string ("Removing old name: is a directory"),
+ filename);
UNGCPRO;
filename = Fexpand_file_name (filename, Qnil);
@@ -3848,9 +3844,8 @@ actually used. */)
goto notfound;
if (! NILP (replace) || ! NILP (beg) || ! NILP (end))
- Fsignal (Qfile_error,
- Fcons (build_string ("not a regular file"),
- Fcons (orig_filename, Qnil)));
+ xsignal2 (Qfile_error,
+ build_string ("not a regular file"), orig_filename);
}
#endif
@@ -4723,9 +4718,8 @@ actually used. */)
}
#endif /* CLASH_DETECTION */
if (not_regular)
- Fsignal (Qfile_error,
- Fcons (build_string ("not a regular file"),
- Fcons (orig_filename, Qnil)));
+ xsignal2 (Qfile_error,
+ build_string ("not a regular file"), orig_filename);
}
if (set_coding_system)
@@ -6630,19 +6624,17 @@ of file names regardless of the current language environment. */);
staticpro (&Qcar_less_than_car);
Fput (Qfile_error, Qerror_conditions,
- Fcons (Qfile_error, Fcons (Qerror, Qnil)));
+ list2 (Qfile_error, Qerror));
Fput (Qfile_error, Qerror_message,
build_string ("File error"));
Fput (Qfile_already_exists, Qerror_conditions,
- Fcons (Qfile_already_exists,
- Fcons (Qfile_error, Fcons (Qerror, Qnil))));
+ list3 (Qfile_already_exists, Qfile_error, Qerror));
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))));
+ list3 (Qfile_date_error, Qfile_error, Qerror));
Fput (Qfile_date_error, Qerror_message,
build_string ("Cannot set file date"));