Mercurial > emacs
changeset 111144:f349e65969e5
Use recursive-trash feature for eshell deletion (Bug#7011).
* lisp/eshell/em-unix.el (eshell-remove-entries): Use the TRASH
argument of delete-file and delete-directory (Bug#7011).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Sun, 24 Oct 2010 13:24:24 -0400 |
parents | 42dfe6f887b0 |
children | 127f4f5efa50 |
files | lisp/ChangeLog lisp/eshell/em-unix.el |
diffstat | 2 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Sun Oct 24 12:00:57 2010 -0400 +++ b/lisp/ChangeLog Sun Oct 24 13:24:24 2010 -0400 @@ -1,5 +1,11 @@ +2010-10-24 Leo <sdl.web@gmail.com> + + * eshell/em-unix.el (eshell-remove-entries): Use the TRASH + argument of delete-file and delete-directory (Bug#7011). + 2010-10-24 Chong Yidong <cyd@stupidchicken.com> + * emacs-lisp/package.el (package-menu-mode-map): Inherit from button-buffer-map.
--- a/lisp/eshell/em-unix.el Sun Oct 24 12:00:57 2010 -0400 +++ b/lisp/eshell/em-unix.el Sun Oct 24 13:24:24 2010 -0400 @@ -203,13 +203,7 @@ (eshell-error "rm: cannot remove `.' or `..'\n")) (if (and (file-directory-p (car files)) (not (file-symlink-p (car files)))) - (let ((dir (file-name-as-directory (car files)))) - (eshell-remove-entries dir - (mapcar - (function - (lambda (file) - (concat dir file))) - (directory-files dir))) + (progn (if verbose (eshell-printn (format "rm: removing directory `%s'" (car files)))) @@ -219,7 +213,7 @@ (not (y-or-n-p (format "rm: remove directory `%s'? " (car files)))))) - (eshell-funcalln 'delete-directory (car files)))) + (eshell-funcalln 'delete-directory (car files) t t))) (if verbose (eshell-printn (format "rm: removing file `%s'" (car files)))) @@ -228,7 +222,7 @@ (not (y-or-n-p (format "rm: remove `%s'? " (car files)))))) - (eshell-funcalln 'delete-file (car files))))) + (eshell-funcalln 'delete-file (car files) t)))) (setq files (cdr files)))) (defun eshell/rm (&rest args)