aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c45
1 files changed, 8 insertions, 37 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 8ac528cafb9..62d539dcfca 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -2650,7 +2650,7 @@ DEFUN ("make-directory-internal", Fmake_directory_internal,
2650#else 2650#else
2651 if (mkdir (dir, 0777) != 0) 2651 if (mkdir (dir, 0777) != 0)
2652#endif 2652#endif
2653 report_file_error ("Creating directory", Flist (1, &directory)); 2653 report_file_error ("Creating directory", list1 (directory));
2654 2654
2655 return Qnil; 2655 return Qnil;
2656} 2656}
@@ -2676,7 +2676,7 @@ DEFUN ("delete-directory", Fdelete_directory, Sdelete_directory, 1, 1, "FDelete
2676 dir = SDATA (encoded_dir); 2676 dir = SDATA (encoded_dir);
2677 2677
2678 if (rmdir (dir) != 0) 2678 if (rmdir (dir) != 0)
2679 report_file_error ("Removing directory", Flist (1, &directory)); 2679 report_file_error ("Removing directory", list1 (directory));
2680 2680
2681 return Qnil; 2681 return Qnil;
2682} 2682}
@@ -2707,7 +2707,7 @@ If file has multiple names, it continues to exist with the other names. */)
2707 encoded_file = ENCODE_FILE (filename); 2707 encoded_file = ENCODE_FILE (filename);
2708 2708
2709 if (0 > unlink (SDATA (encoded_file))) 2709 if (0 > unlink (SDATA (encoded_file)))
2710 report_file_error ("Removing old name", Flist (1, &filename)); 2710 report_file_error ("Removing old name", list1 (filename));
2711 return Qnil; 2711 return Qnil;
2712} 2712}
2713 2713
@@ -2741,9 +2741,6 @@ This is what happens in interactive use with M-x. */)
2741 (file, newname, ok_if_already_exists) 2741 (file, newname, ok_if_already_exists)
2742 Lisp_Object file, newname, ok_if_already_exists; 2742 Lisp_Object file, newname, ok_if_already_exists;
2743{ 2743{
2744#ifdef NO_ARG_ARRAY
2745 Lisp_Object args[2];
2746#endif
2747 Lisp_Object handler; 2744 Lisp_Object handler;
2748 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5; 2745 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5;
2749 Lisp_Object encoded_file, encoded_newname, symlink_target; 2746 Lisp_Object encoded_file, encoded_newname, symlink_target;
@@ -2812,15 +2809,7 @@ This is what happens in interactive use with M-x. */)
2812 Fdelete_file (file); 2809 Fdelete_file (file);
2813 } 2810 }
2814 else 2811 else
2815#ifdef NO_ARG_ARRAY 2812 report_file_error ("Renaming", list2 (file, newname));
2816 {
2817 args[0] = file;
2818 args[1] = newname;
2819 report_file_error ("Renaming", Flist (2, args));
2820 }
2821#else
2822 report_file_error ("Renaming", Flist (2, &file));
2823#endif
2824 } 2813 }
2825 UNGCPRO; 2814 UNGCPRO;
2826 return Qnil; 2815 return Qnil;
@@ -2836,9 +2825,6 @@ This is what happens in interactive use with M-x. */)
2836 (file, newname, ok_if_already_exists) 2825 (file, newname, ok_if_already_exists)
2837 Lisp_Object file, newname, ok_if_already_exists; 2826 Lisp_Object file, newname, ok_if_already_exists;
2838{ 2827{
2839#ifdef NO_ARG_ARRAY
2840 Lisp_Object args[2];
2841#endif
2842 Lisp_Object handler; 2828 Lisp_Object handler;
2843 Lisp_Object encoded_file, encoded_newname; 2829 Lisp_Object encoded_file, encoded_newname;
2844 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 2830 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
@@ -2878,15 +2864,7 @@ This is what happens in interactive use with M-x. */)
2878 2864
2879 unlink (SDATA (newname)); 2865 unlink (SDATA (newname));
2880 if (0 > link (SDATA (encoded_file), SDATA (encoded_newname))) 2866 if (0 > link (SDATA (encoded_file), SDATA (encoded_newname)))
2881 { 2867 report_file_error ("Adding new name", list2 (file, newname));
2882#ifdef NO_ARG_ARRAY
2883 args[0] = file;
2884 args[1] = newname;
2885 report_file_error ("Adding new name", Flist (2, args));
2886#else
2887 report_file_error ("Adding new name", Flist (2, &file));
2888#endif
2889 }
2890 2868
2891 UNGCPRO; 2869 UNGCPRO;
2892 return Qnil; 2870 return Qnil;
@@ -2904,9 +2882,6 @@ This happens for interactive use with M-x. */)
2904 (filename, linkname, ok_if_already_exists) 2882 (filename, linkname, ok_if_already_exists)
2905 Lisp_Object filename, linkname, ok_if_already_exists; 2883 Lisp_Object filename, linkname, ok_if_already_exists;
2906{ 2884{
2907#ifdef NO_ARG_ARRAY
2908 Lisp_Object args[2];
2909#endif
2910 Lisp_Object handler; 2885 Lisp_Object handler;
2911 Lisp_Object encoded_filename, encoded_linkname; 2886 Lisp_Object encoded_filename, encoded_linkname;
2912 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; 2887 struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
@@ -2962,13 +2937,7 @@ This happens for interactive use with M-x. */)
2962 } 2937 }
2963 } 2938 }
2964 2939
2965#ifdef NO_ARG_ARRAY 2940 report_file_error ("Making symbolic link", list2 (filename, linkname));
2966 args[0] = filename;
2967 args[1] = linkname;
2968 report_file_error ("Making symbolic link", Flist (2, args));
2969#else
2970 report_file_error ("Making symbolic link", Flist (2, &filename));
2971#endif
2972 } 2941 }
2973 UNGCPRO; 2942 UNGCPRO;
2974 return Qnil; 2943 return Qnil;
@@ -4847,6 +4816,8 @@ choose_write_coding_system (start, end, filename,
4847 /* ... but with the special flag to indicate not to strip off 4816 /* ... but with the special flag to indicate not to strip off
4848 leading code of eight-bit-control chars. */ 4817 leading code of eight-bit-control chars. */
4849 coding->flags = 1; 4818 coding->flags = 1;
4819 /* We force LF for end-of-line because that is faster. */
4820 coding->eol_type = CODING_EOL_LF;
4850 goto done_setup_coding; 4821 goto done_setup_coding;
4851 } 4822 }
4852 else if (!NILP (Vcoding_system_for_write)) 4823 else if (!NILP (Vcoding_system_for_write))