emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bugfix eshell/rm


From: Thierry Volpiatto
Subject: bugfix eshell/rm
Date: Fri, 11 Mar 2011 09:04:07 +0100
User-agent: Gnus/5.110014 (No Gnus v0.14) Emacs/23.3 (gnu/linux)

Hi all,
`eshell-remove-entries' use a not bound 'verbose' variable, and fail.
To reproduce bug, try "rm -rf /some/directory" in eshell.
 

This patch fix it.
however there is maybe other calls to `eshell-remove-entries' to fix.

This is on emacs-23.3

--8<---------------cut here---------------start------------->8---
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index 8f61270..0a79e80 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -194,7 +194,7 @@ Otherwise, Emacs will attempt to use rsh to invoke du on 
the remote machine."
       (Info-menu (car args))
       (setq args (cdr args)))))
 
-(defun eshell-remove-entries (path files &optional top-level)
+(defun eshell-remove-entries (path files &optional top-level verbose)
   "From PATH, remove all of the given FILES, perhaps interactively."
   (while files
     (if (string-match "\\`\\.\\.?\\'"
@@ -298,7 +298,7 @@ Remove (unlink) the FILE(s).")
                         (y-or-n-p
                          (format "rm: descend into directory `%s'? "
                                  entry)))
-                    (eshell-remove-entries nil (list entry) t))
+                    (eshell-remove-entries nil (list entry) t nil))
               (eshell-error (format "rm: %s: is a directory\n" entry)))
           (eshell-remove-entries nil (list entry) t)))))
      (setq args (cdr args)))
--8<---------------cut here---------------end--------------->8---

-- 
A+ Thierry
Get my Gnupg key:
gpg --keyserver pgp.mit.edu --recv-keys 59F29997 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]