comparison src/fileio.c @ 83302:5ae8a8b0a308

Merged from miles@gnu.org--gnu-2005 (patch 292-295) Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-292 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-293 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-294 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-295 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-342
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 09 May 2005 16:13:15 +0000
parents effe22690419 a89a98d0bb8c
children 8b66fddd72c5
comparison
equal deleted inserted replaced
83301:b151ec53c504 83302:5ae8a8b0a308
1020 1020
1021 DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0, 1021 DEFUN ("expand-file-name", Fexpand_file_name, Sexpand_file_name, 1, 2, 0,
1022 doc: /* Convert filename NAME to absolute, and canonicalize it. 1022 doc: /* Convert filename NAME to absolute, and canonicalize it.
1023 Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative 1023 Second arg DEFAULT-DIRECTORY is directory to start with if NAME is relative
1024 \(does not start with slash); if DEFAULT-DIRECTORY is nil or missing, 1024 \(does not start with slash); if DEFAULT-DIRECTORY is nil or missing,
1025 the current buffer's value of default-directory is used. 1025 the current buffer's value of `default-directory' is used.
1026 File name components that are `.' are removed, and 1026 File name components that are `.' are removed, and
1027 so are file name components followed by `..', along with the `..' itself; 1027 so are file name components followed by `..', along with the `..' itself;
1028 note that these simplifications are done without checking the resulting 1028 note that these simplifications are done without checking the resulting
1029 file names in the file system. 1029 file names in the file system.
1030 An initial `~/' expands to your home directory. 1030 An initial `~/' expands to your home directory.
2706 Qt, internal_delete_file_1)); 2706 Qt, internal_delete_file_1));
2707 } 2707 }
2708 2708
2709 DEFUN ("rename-file", Frename_file, Srename_file, 2, 3, 2709 DEFUN ("rename-file", Frename_file, Srename_file, 2, 3,
2710 "fRename file: \nGRename %s to file: \np", 2710 "fRename file: \nGRename %s to file: \np",
2711 doc: /* Rename FILE as NEWNAME. Both args strings. 2711 doc: /* Rename FILE as NEWNAME. Both args must be strings.
2712 If file has names other than FILE, it continues to have those names. 2712 If file has names other than FILE, it continues to have those names.
2713 Signals a `file-already-exists' error if a file NEWNAME already exists 2713 Signals a `file-already-exists' error if a file NEWNAME already exists
2714 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. 2714 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
2715 A number as third arg means request confirmation if NEWNAME already exists. 2715 A number as third arg means request confirmation if NEWNAME already exists.
2716 This is what happens in interactive use with M-x. */) 2716 This is what happens in interactive use with M-x. */)
2795 return Qnil; 2795 return Qnil;
2796 } 2796 }
2797 2797
2798 DEFUN ("add-name-to-file", Fadd_name_to_file, Sadd_name_to_file, 2, 3, 2798 DEFUN ("add-name-to-file", Fadd_name_to_file, Sadd_name_to_file, 2, 3,
2799 "fAdd name to file: \nGName to add to %s: \np", 2799 "fAdd name to file: \nGName to add to %s: \np",
2800 doc: /* Give FILE additional name NEWNAME. Both args strings. 2800 doc: /* Give FILE additional name NEWNAME. Both args must be strings.
2801 Signals a `file-already-exists' error if a file NEWNAME already exists 2801 Signals a `file-already-exists' error if a file NEWNAME already exists
2802 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. 2802 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
2803 A number as third arg means request confirmation if NEWNAME already exists. 2803 A number as third arg means request confirmation if NEWNAME already exists.
2804 This is what happens in interactive use with M-x. */) 2804 This is what happens in interactive use with M-x. */)
2805 (file, newname, ok_if_already_exists) 2805 (file, newname, ok_if_already_exists)
2862 } 2862 }
2863 2863
2864 #ifdef S_IFLNK 2864 #ifdef S_IFLNK
2865 DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3, 2865 DEFUN ("make-symbolic-link", Fmake_symbolic_link, Smake_symbolic_link, 2, 3,
2866 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np", 2866 "FMake symbolic link to file: \nGMake symbolic link to file %s: \np",
2867 doc: /* Make a symbolic link to FILENAME, named LINKNAME. Both args strings. 2867 doc: /* Make a symbolic link to FILENAME, named LINKNAME. Both args must be strings.
2868 Signals a `file-already-exists' error if a file LINKNAME already exists 2868 Signals a `file-already-exists' error if a file LINKNAME already exists
2869 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil. 2869 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
2870 A number as third arg means request confirmation if LINKNAME already exists. 2870 A number as third arg means request confirmation if LINKNAME already exists.
2871 This happens for interactive use with M-x. */) 2871 This happens for interactive use with M-x. */)
2872 (filename, linkname, ok_if_already_exists) 2872 (filename, linkname, ok_if_already_exists)
3207 } 3207 }
3208 3208
3209 DEFUN ("access-file", Faccess_file, Saccess_file, 2, 2, 0, 3209 DEFUN ("access-file", Faccess_file, Saccess_file, 2, 2, 0,
3210 doc: /* Access file FILENAME, and get an error if that does not work. 3210 doc: /* Access file FILENAME, and get an error if that does not work.
3211 The second argument STRING is used in the error message. 3211 The second argument STRING is used in the error message.
3212 If there is no error, we return nil. */) 3212 If there is no error, returns nil. */)
3213 (filename, string) 3213 (filename, string)
3214 Lisp_Object filename, string; 3214 Lisp_Object filename, string;
3215 { 3215 {
3216 Lisp_Object handler, encoded_filename, absname; 3216 Lisp_Object handler, encoded_filename, absname;
3217 int fd; 3217 int fd;
6036 return Qnil; 6036 return Qnil;
6037 } 6037 }
6038 6038
6039 DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p, 6039 DEFUN ("recent-auto-save-p", Frecent_auto_save_p, Srecent_auto_save_p,
6040 0, 0, 0, 6040 0, 0, 0,
6041 doc: /* Return t if buffer has been auto-saved since last read in or saved. */) 6041 doc: /* Return t if current buffer has been auto-saved since last read in or saved. */)
6042 () 6042 ()
6043 { 6043 {
6044 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil; 6044 return (SAVE_MODIFF < current_buffer->auto_save_modified) ? Qt : Qnil;
6045 } 6045 }
6046 6046