diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 4 | ||||
| -rw-r--r-- | src/fileio.c | 5 |
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 | ||
| 6 | 2008-09-20 Glenn Morris <rgm@gnu.org> | 6 | 2008-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 | ||
| 11 | 2008-09-20 Eli Zaretskii <eliz@gnu.org> | 13 | 2008-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. */ |
| 202 | int delete_by_moving_to_trash; | 202 | int delete_by_moving_to_trash; |
| 203 | 203 | ||
| 204 | Lisp_Object Qdelete_by_moving_to_trash; | ||
| 205 | |||
| 204 | /* Lisp function for moving files to trash. */ | 206 | /* Lisp function for moving files to trash. */ |
| 205 | Lisp_Object Qmove_file_to_trash; | 207 | Lisp_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! */); | |||
| 5669 | When non-nil, the function `move-file-to-trash' will be used by | 5671 | When 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 | ||