aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2008-09-20 23:37:47 +0000
committerGlenn Morris2008-09-20 23:37:47 +0000
commitd2b66acf531883c8805683ce893e5dbf9ad50fc0 (patch)
treea6eaa720b4698448586502446efad25d0118565f
parent11041c992f7bb7c82c609fc244caa5e0aaa19729 (diff)
downloademacs-d2b66acf531883c8805683ce893e5dbf9ad50fc0.tar.gz
emacs-d2b66acf531883c8805683ce893e5dbf9ad50fc0.zip
(Qdelete_by_moving_to_trash): New Lisp_Object.
(syms_of_fileio): Add Qdelete_by_moving_to_trash.
-rw-r--r--src/ChangeLog4
-rw-r--r--src/fileio.c5
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index abea2c4a2dc..9e855a4898b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -5,7 +5,9 @@
5 5
62008-09-20 Glenn Morris <rgm@gnu.org> 62008-09-20 Glenn Morris <rgm@gnu.org>
7 7
8 * fileio.c (Frename_file): Avoid copying to trash if a rename involves 8 * fileio.c (Qdelete_by_moving_to_trash): New Lisp_Object.
9 (syms_of_fileio): Add Qdelete_by_moving_to_trash.
10 (Frename_file): Avoid copying to trash if a rename involves
9 a delete. (Bug#964). 11 a delete. (Bug#964).
10 12
112008-09-20 Eli Zaretskii <eliz@gnu.org> 132008-09-20 Eli Zaretskii <eliz@gnu.org>
diff --git a/src/fileio.c b/src/fileio.c
index 6a9364d37bc..cf3ec5bc44f 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -201,6 +201,8 @@ int write_region_inhibit_fsync;
201 Fdelete_directory. */ 201 Fdelete_directory. */
202int delete_by_moving_to_trash; 202int delete_by_moving_to_trash;
203 203
204Lisp_Object Qdelete_by_moving_to_trash;
205
204/* Lisp function for moving files to trash. */ 206/* Lisp function for moving files to trash. */
205Lisp_Object Qmove_file_to_trash; 207Lisp_Object Qmove_file_to_trash;
206 208
@@ -2246,7 +2248,7 @@ This is what happens in interactive use with M-x. */)
2246 Qt, Qt); 2248 Qt, Qt);
2247 2249
2248 count = SPECPDL_INDEX (); 2250 count = SPECPDL_INDEX ();
2249 specbind (intern ("delete-by-moving-to-trash"), Qnil); 2251 specbind (Qdelete_by_moving_to_trash, Qnil);
2250 Fdelete_file (file); 2252 Fdelete_file (file);
2251 unbind_to (count, Qnil); 2253 unbind_to (count, Qnil);
2252 } 2254 }
@@ -5669,6 +5671,7 @@ A non-nil value may result in data loss! */);
5669When non-nil, the function `move-file-to-trash' will be used by 5671When non-nil, the function `move-file-to-trash' will be used by
5670`delete-file' and `delete-directory'. */); 5672`delete-file' and `delete-directory'. */);
5671 delete_by_moving_to_trash = 0; 5673 delete_by_moving_to_trash = 0;
5674 Qdelete_by_moving_to_trash = intern ("delete-by-moving-to-trash");
5672 Qmove_file_to_trash = intern ("move-file-to-trash"); 5675 Qmove_file_to_trash = intern ("move-file-to-trash");
5673 staticpro (&Qmove_file_to_trash); 5676 staticpro (&Qmove_file_to_trash);
5674 5677