Mercurial > emacs
comparison src/fileio.c @ 9170:1d95c81487a3
(Fdelete_file): Undo Sep 16 change.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Wed, 28 Sep 1994 20:45:08 +0000 |
parents | 2190d1e7a69f |
children | c17b2a49b6ec |
comparison
equal
deleted
inserted
replaced
9169:edc1c9086c5c | 9170:1d95c81487a3 |
---|---|
147 Vinhibit_file_name_operation is the operation being handled. | 147 Vinhibit_file_name_operation is the operation being handled. |
148 If we try to handle that operation, we ignore those handlers. */ | 148 If we try to handle that operation, we ignore those handlers. */ |
149 | 149 |
150 static Lisp_Object Vinhibit_file_name_handlers; | 150 static Lisp_Object Vinhibit_file_name_handlers; |
151 static Lisp_Object Vinhibit_file_name_operation; | 151 static Lisp_Object Vinhibit_file_name_operation; |
152 | |
153 extern Lisp_Object Qcompletion_ignored_extensions; | |
154 | 152 |
155 Lisp_Object Qfile_error, Qfile_already_exists; | 153 Lisp_Object Qfile_error, Qfile_already_exists; |
156 | 154 |
157 Lisp_Object Qfile_name_history; | 155 Lisp_Object Qfile_name_history; |
158 | 156 |
1903 "Delete specified file. One argument, a file name string.\n\ | 1901 "Delete specified file. One argument, a file name string.\n\ |
1904 If file has multiple names, it continues to exist with the other names.") | 1902 If file has multiple names, it continues to exist with the other names.") |
1905 (filename) | 1903 (filename) |
1906 Lisp_Object filename; | 1904 Lisp_Object filename; |
1907 { | 1905 { |
1908 int count = specpdl_ptr - specpdl; | |
1909 Lisp_Object handler; | 1906 Lisp_Object handler; |
1910 CHECK_STRING (filename, 0); | 1907 CHECK_STRING (filename, 0); |
1911 filename = Fexpand_file_name (filename, Qnil); | 1908 filename = Fexpand_file_name (filename, Qnil); |
1912 | 1909 |
1913 specbind (Qcompletion_ignored_extensions, Qnil); | |
1914 handler = Ffind_file_name_handler (filename, Qdelete_file); | 1910 handler = Ffind_file_name_handler (filename, Qdelete_file); |
1915 if (!NILP (handler)) | 1911 if (!NILP (handler)) |
1916 return unbind_to (count, call2 (handler, Qdelete_file, filename)); | 1912 return call2 (handler, Qdelete_file, filename); |
1917 | 1913 |
1918 if (0 > unlink (XSTRING (filename)->data)) | 1914 if (0 > unlink (XSTRING (filename)->data)) |
1919 report_file_error ("Removing old name", Flist (1, &filename)); | 1915 report_file_error ("Removing old name", Flist (1, &filename)); |
1920 return unbind_to (count, Qnil); | 1916 return Qnil; |
1921 } | 1917 } |
1922 | 1918 |
1923 DEFUN ("rename-file", Frename_file, Srename_file, 2, 3, | 1919 DEFUN ("rename-file", Frename_file, Srename_file, 2, 3, |
1924 "fRename file: \nFRename %s to file: \np", | 1920 "fRename file: \nFRename %s to file: \np", |
1925 "Rename FILE as NEWNAME. Both args strings.\n\ | 1921 "Rename FILE as NEWNAME. Both args strings.\n\ |