summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLeo Liu <sdl.web@gmail.com>2010-10-24 13:24:24 -0400
committerChong Yidong <cyd@stupidchicken.com>2010-10-24 13:24:24 -0400
commit59dd6f738c165a6808a924f0628764af70a898a1 (patch)
treef058c421e6f71e206dc083687e7d9ac3d86e4320 /lisp
parent947f5e0162195e6503ca8e769f113f310cde6deb (diff)
downloademacs-59dd6f738c165a6808a924f0628764af70a898a1.tar.gz
emacs-59dd6f738c165a6808a924f0628764af70a898a1.tar.bz2
emacs-59dd6f738c165a6808a924f0628764af70a898a1.zip
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).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/eshell/em-unix.el12
2 files changed, 9 insertions, 9 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8e9400b6c12..7d45513f853 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -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.
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 7d0ff22ceb6..365f765433b 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -203,13 +203,7 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
(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 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
(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 @@ Otherwise, Emacs will attempt to use rsh to invoke du on the remote machine."
(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)