aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
authorKaroly Lorentey2006-07-29 09:59:12 +0000
committerKaroly Lorentey2006-07-29 09:59:12 +0000
commit251bc578cc636223d618d06cf2a2bb7d07db9cce (patch)
tree58e1c6b0a35bb4a77e6cb77876e4bc6a9d3f2ab2 /src/fileio.c
parent99715bbc447eb633e45ffa23b87284771ce3ac74 (diff)
parent0ed0527cb02180a50f6744086ce3a487740c73e4 (diff)
downloademacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.tar.gz
emacs-251bc578cc636223d618d06cf2a2bb7d07db9cce.zip
Merged from emacs@sv.gnu.org
Patches applied: * emacs@sv.gnu.org/emacs--devo--0--patch-351 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-352 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-353 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-354 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-355 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-356 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-357 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-358 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-359 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-360 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-361 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-362 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-363 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-364 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-365 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-366 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-367 Merge from gnus--rel--5.10 * emacs@sv.gnu.org/emacs--devo--0--patch-368 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-369 Update from CVS * emacs@sv.gnu.org/emacs--devo--0--patch-370 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-115 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-116 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-117 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-118 Merge from emacs--devo--0 * emacs@sv.gnu.org/gnus--rel--5.10--patch-119 Update from CVS * emacs@sv.gnu.org/gnus--rel--5.10--patch-120 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-573
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 58b1863f225..8ac528cafb9 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -282,7 +282,7 @@ report_file_error (string, data)
282 switch (errorno) 282 switch (errorno)
283 { 283 {
284 case EEXIST: 284 case EEXIST:
285 Fsignal (Qfile_already_exists, Fcons (errstring, data)); 285 xsignal (Qfile_already_exists, Fcons (errstring, data));
286 break; 286 break;
287 default: 287 default:
288 /* System error messages are capitalized. Downcase the initial 288 /* System error messages are capitalized. Downcase the initial
@@ -290,7 +290,7 @@ report_file_error (string, data)
290 if (SREF (errstring, 1) != '/') 290 if (SREF (errstring, 1) != '/')
291 SSET (errstring, 0, DOWNCASE (SREF (errstring, 0))); 291 SSET (errstring, 0, DOWNCASE (SREF (errstring, 0)));
292 292
293 Fsignal (Qfile_error, 293 xsignal (Qfile_error,
294 Fcons (build_string (string), Fcons (errstring, data))); 294 Fcons (build_string (string), Fcons (errstring, data)));
295 } 295 }
296} 296}
@@ -2386,9 +2386,8 @@ barf_or_query_if_file_exists (absname, querystring, interactive, statptr, quick)
2386 if (lstat (SDATA (encoded_filename), &statbuf) >= 0) 2386 if (lstat (SDATA (encoded_filename), &statbuf) >= 0)
2387 { 2387 {
2388 if (! interactive) 2388 if (! interactive)
2389 Fsignal (Qfile_already_exists, 2389 xsignal2 (Qfile_already_exists,
2390 Fcons (build_string ("File already exists"), 2390 build_string ("File already exists"), absname);
2391 Fcons (absname, Qnil)));
2392 GCPRO1 (absname); 2391 GCPRO1 (absname);
2393 tem = format2 ("File %s already exists; %s anyway? ", 2392 tem = format2 ("File %s already exists; %s anyway? ",
2394 absname, build_string (querystring)); 2393 absname, build_string (querystring));
@@ -2398,9 +2397,8 @@ barf_or_query_if_file_exists (absname, querystring, interactive, statptr, quick)
2398 tem = do_yes_or_no_p (tem); 2397 tem = do_yes_or_no_p (tem);
2399 UNGCPRO; 2398 UNGCPRO;
2400 if (NILP (tem)) 2399 if (NILP (tem))
2401 Fsignal (Qfile_already_exists, 2400 xsignal2 (Qfile_already_exists,
2402 Fcons (build_string ("File already exists"), 2401 build_string ("File already exists"), absname);
2403 Fcons (absname, Qnil)));
2404 if (statptr) 2402 if (statptr)
2405 *statptr = statbuf; 2403 *statptr = statbuf;
2406 } 2404 }
@@ -2502,9 +2500,8 @@ uid and gid of FILE to NEWNAME. */)
2502 { 2500 {
2503 /* Restore original attributes. */ 2501 /* Restore original attributes. */
2504 SetFileAttributes (filename, attributes); 2502 SetFileAttributes (filename, attributes);
2505 Fsignal (Qfile_date_error, 2503 xsignal2 (Qfile_date_error,
2506 Fcons (build_string ("Cannot set file date"), 2504 build_string ("Cannot set file date"), newname);
2507 Fcons (newname, Qnil)));
2508 } 2505 }
2509 /* Restore original attributes. */ 2506 /* Restore original attributes. */
2510 SetFileAttributes (filename, attributes); 2507 SetFileAttributes (filename, attributes);
@@ -2600,9 +2597,8 @@ uid and gid of FILE to NEWNAME. */)
2600 EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0); 2597 EMACS_SET_SECS_USECS (mtime, st.st_mtime, 0);
2601 if (set_file_times (SDATA (encoded_newname), 2598 if (set_file_times (SDATA (encoded_newname),
2602 atime, mtime)) 2599 atime, mtime))
2603 Fsignal (Qfile_date_error, 2600 xsignal2 (Qfile_date_error,
2604 Fcons (build_string ("Cannot set file date"), 2601 build_string ("Cannot set file date"), newname);
2605 Fcons (newname, Qnil)));
2606 } 2602 }
2607 } 2603 }
2608 2604
@@ -2698,9 +2694,9 @@ If file has multiple names, it continues to exist with the other names. */)
2698 GCPRO1 (filename); 2694 GCPRO1 (filename);
2699 if (!NILP (Ffile_directory_p (filename)) 2695 if (!NILP (Ffile_directory_p (filename))
2700 && NILP (Ffile_symlink_p (filename))) 2696 && NILP (Ffile_symlink_p (filename)))
2701 Fsignal (Qfile_error, 2697 xsignal2 (Qfile_error,
2702 Fcons (build_string ("Removing old name: is a directory"), 2698 build_string ("Removing old name: is a directory"),
2703 Fcons (filename, Qnil))); 2699 filename);
2704 UNGCPRO; 2700 UNGCPRO;
2705 filename = Fexpand_file_name (filename, Qnil); 2701 filename = Fexpand_file_name (filename, Qnil);
2706 2702
@@ -3850,9 +3846,8 @@ actually used. */)
3850 goto notfound; 3846 goto notfound;
3851 3847
3852 if (! NILP (replace) || ! NILP (beg) || ! NILP (end)) 3848 if (! NILP (replace) || ! NILP (beg) || ! NILP (end))
3853 Fsignal (Qfile_error, 3849 xsignal2 (Qfile_error,
3854 Fcons (build_string ("not a regular file"), 3850 build_string ("not a regular file"), orig_filename);
3855 Fcons (orig_filename, Qnil)));
3856 } 3851 }
3857#endif 3852#endif
3858 3853
@@ -4725,9 +4720,8 @@ actually used. */)
4725 } 4720 }
4726#endif /* CLASH_DETECTION */ 4721#endif /* CLASH_DETECTION */
4727 if (not_regular) 4722 if (not_regular)
4728 Fsignal (Qfile_error, 4723 xsignal2 (Qfile_error,
4729 Fcons (build_string ("not a regular file"), 4724 build_string ("not a regular file"), orig_filename);
4730 Fcons (orig_filename, Qnil)));
4731 } 4725 }
4732 4726
4733 if (set_coding_system) 4727 if (set_coding_system)
@@ -6632,19 +6626,17 @@ of file names regardless of the current language environment. */);
6632 staticpro (&Qcar_less_than_car); 6626 staticpro (&Qcar_less_than_car);
6633 6627
6634 Fput (Qfile_error, Qerror_conditions, 6628 Fput (Qfile_error, Qerror_conditions,
6635 Fcons (Qfile_error, Fcons (Qerror, Qnil))); 6629 list2 (Qfile_error, Qerror));
6636 Fput (Qfile_error, Qerror_message, 6630 Fput (Qfile_error, Qerror_message,
6637 build_string ("File error")); 6631 build_string ("File error"));
6638 6632
6639 Fput (Qfile_already_exists, Qerror_conditions, 6633 Fput (Qfile_already_exists, Qerror_conditions,
6640 Fcons (Qfile_already_exists, 6634 list3 (Qfile_already_exists, Qfile_error, Qerror));
6641 Fcons (Qfile_error, Fcons (Qerror, Qnil))));
6642 Fput (Qfile_already_exists, Qerror_message, 6635 Fput (Qfile_already_exists, Qerror_message,
6643 build_string ("File already exists")); 6636 build_string ("File already exists"));
6644 6637
6645 Fput (Qfile_date_error, Qerror_conditions, 6638 Fput (Qfile_date_error, Qerror_conditions,
6646 Fcons (Qfile_date_error, 6639 list3 (Qfile_date_error, Qfile_error, Qerror));
6647 Fcons (Qfile_error, Fcons (Qerror, Qnil))));
6648 Fput (Qfile_date_error, Qerror_message, 6640 Fput (Qfile_date_error, Qerror_message,
6649 build_string ("Cannot set file date")); 6641 build_string ("Cannot set file date"));
6650 6642