[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102081: Use recursive-trash feature
From: |
Chong Yidong |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102081: Use recursive-trash feature for eshell deletion (Bug#7011). |
Date: |
Sun, 24 Oct 2010 13:24:24 -0400 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102081
author: Leo <address@hidden>
committer: Chong Yidong <address@hidden>
branch nick: trunk
timestamp: Sun 2010-10-24 13:24:24 -0400
message:
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).
modified:
lisp/ChangeLog
lisp/eshell/em-unix.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-10-24 15:46:21 +0000
+++ b/lisp/ChangeLog 2010-10-24 17:24:24 +0000
@@ -1,5 +1,11 @@
+2010-10-24 Leo <address@hidden>
+
+ * eshell/em-unix.el (eshell-remove-entries): Use the TRASH
+ argument of delete-file and delete-directory (Bug#7011).
+
2010-10-24 Chong Yidong <address@hidden>
+
* emacs-lisp/package.el (package-menu-mode-map): Inherit from
button-buffer-map.
=== modified file 'lisp/eshell/em-unix.el'
--- a/lisp/eshell/em-unix.el 2010-09-25 21:51:55 +0000
+++ b/lisp/eshell/em-unix.el 2010-10-24 17:24:24 +0000
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102081: Use recursive-trash feature for eshell deletion (Bug#7011).,
Chong Yidong <=