Mercurial > emacs
comparison src/fileio.c @ 108818:6515310887ec
* fileio.c (Fdelete_file): Pass TRASH arg to handler call.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Fri, 28 May 2010 16:57:11 +0200 |
parents | 511da81b16c5 |
children | c2ac5cece5ea |
comparison
equal
deleted
inserted
replaced
108817:a90103f99eea | 108818:6515310887ec |
---|---|
1923 A prefix arg makes KEEP-TIME non-nil. | 1923 A prefix arg makes KEEP-TIME non-nil. |
1924 | 1924 |
1925 If PRESERVE-UID-GID is non-nil, we try to transfer the | 1925 If PRESERVE-UID-GID is non-nil, we try to transfer the |
1926 uid and gid of FILE to NEWNAME. | 1926 uid and gid of FILE to NEWNAME. |
1927 | 1927 |
1928 If PRESERVE-SELINUX-CONTEXT is non-nil and SELinux is enabled | 1928 If PRESERVE-SELINUX-CONTEXT is non-nil and SELinux is enabled |
1929 on the system, we copy the SELinux context of FILE to NEWNAME. */) | 1929 on the system, we copy the SELinux context of FILE to NEWNAME. */) |
1930 (file, newname, ok_if_already_exists, keep_time, preserve_uid_gid, preserve_selinux_context) | 1930 (file, newname, ok_if_already_exists, keep_time, preserve_uid_gid, preserve_selinux_context) |
1931 Lisp_Object file, newname, ok_if_already_exists, keep_time; | 1931 Lisp_Object file, newname, ok_if_already_exists, keep_time; |
1932 Lisp_Object preserve_uid_gid, preserve_selinux_context; | 1932 Lisp_Object preserve_uid_gid, preserve_selinux_context; |
1933 { | 1933 { |
2219 UNGCPRO; | 2219 UNGCPRO; |
2220 filename = Fexpand_file_name (filename, Qnil); | 2220 filename = Fexpand_file_name (filename, Qnil); |
2221 | 2221 |
2222 handler = Ffind_file_name_handler (filename, Qdelete_file); | 2222 handler = Ffind_file_name_handler (filename, Qdelete_file); |
2223 if (!NILP (handler)) | 2223 if (!NILP (handler)) |
2224 return call2 (handler, Qdelete_file, filename); | 2224 return call3 (handler, Qdelete_file, filename, trash); |
2225 | 2225 |
2226 if (delete_by_moving_to_trash && !NILP (trash)) | 2226 if (delete_by_moving_to_trash && !NILP (trash)) |
2227 return call1 (Qmove_file_to_trash, filename); | 2227 return call1 (Qmove_file_to_trash, filename); |
2228 | 2228 |
2229 encoded_file = ENCODE_FILE (filename); | 2229 encoded_file = ENCODE_FILE (filename); |