Mercurial > emacs
comparison src/fileio.c @ 8799:e48d66b056fd
(Fdelete_file): Bind completion-ignored-extensions to nil.
author | Karl Heuer <kwzh@gnu.org> |
---|---|
date | Fri, 16 Sep 1994 22:17:40 +0000 |
parents | 56c445a92c4c |
children | 75316e76905c |
comparison
equal
deleted
inserted
replaced
8798:e10362de8eba | 8799:e48d66b056fd |
---|---|
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; | |
152 | 154 |
153 Lisp_Object Qfile_error, Qfile_already_exists; | 155 Lisp_Object Qfile_error, Qfile_already_exists; |
154 | 156 |
155 Lisp_Object Qfile_name_history; | 157 Lisp_Object Qfile_name_history; |
156 | 158 |
1900 "Delete specified file. One argument, a file name string.\n\ | 1902 "Delete specified file. One argument, a file name string.\n\ |
1901 If file has multiple names, it continues to exist with the other names.") | 1903 If file has multiple names, it continues to exist with the other names.") |
1902 (filename) | 1904 (filename) |
1903 Lisp_Object filename; | 1905 Lisp_Object filename; |
1904 { | 1906 { |
1907 int count = specpdl_ptr - specpdl; | |
1905 Lisp_Object handler; | 1908 Lisp_Object handler; |
1906 CHECK_STRING (filename, 0); | 1909 CHECK_STRING (filename, 0); |
1907 filename = Fexpand_file_name (filename, Qnil); | 1910 filename = Fexpand_file_name (filename, Qnil); |
1908 | 1911 |
1912 specbind (Qcompletion_ignored_extensions, Qnil); | |
1909 handler = Ffind_file_name_handler (filename, Qdelete_file); | 1913 handler = Ffind_file_name_handler (filename, Qdelete_file); |
1910 if (!NILP (handler)) | 1914 if (!NILP (handler)) |
1911 return call2 (handler, Qdelete_file, filename); | 1915 return unbind_to (count, call2 (handler, Qdelete_file, filename)); |
1912 | 1916 |
1913 if (0 > unlink (XSTRING (filename)->data)) | 1917 if (0 > unlink (XSTRING (filename)->data)) |
1914 report_file_error ("Removing old name", Flist (1, &filename)); | 1918 report_file_error ("Removing old name", Flist (1, &filename)); |
1915 return Qnil; | 1919 return unbind_to (count, Qnil); |
1916 } | 1920 } |
1917 | 1921 |
1918 DEFUN ("rename-file", Frename_file, Srename_file, 2, 3, | 1922 DEFUN ("rename-file", Frename_file, Srename_file, 2, 3, |
1919 "fRename file: \nFRename %s to file: \np", | 1923 "fRename file: \nFRename %s to file: \np", |
1920 "Rename FILE as NEWNAME. Both args strings.\n\ | 1924 "Rename FILE as NEWNAME. Both args strings.\n\ |