aboutsummaryrefslogtreecommitdiff
path: root/emacs/.emacs.d/lisp/my
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/.emacs.d/lisp/my')
-rw-r--r--emacs/.emacs.d/lisp/my/my-dired.el20
1 files changed, 16 insertions, 4 deletions
diff --git a/emacs/.emacs.d/lisp/my/my-dired.el b/emacs/.emacs.d/lisp/my/my-dired.el
index a2485ab..d80c1c8 100644
--- a/emacs/.emacs.d/lisp/my/my-dired.el
+++ b/emacs/.emacs.d/lisp/my/my-dired.el
@@ -118,14 +118,26 @@ With a prefix arg, toggle `my-dired-reverse-sorting' instead."
(delete-directory trash-files-dir t)
(delete-directory trash-info-dir t)))
-(defun my-dired-do-delete (&arg)
- "Trash or (with a prefix arg) delete files."
+(defun my-dired-do-delete (delete-fun &optional arg)
+ "Wrapper of `dired-do-delete'.
+
+With a prefix-arg, delete without moving to trash."
(interactive "P")
(if arg
(let ((delete-by-moving-to-trash nil))
- (call-interactively 'dired-do-delete))
- (call-interactively 'dired-do-delete))
+ (funcall delete-fun))
+ (delete-fun))
)
+(defun my-dired-do-rename (rename-fun &optional arg)
+ "Wrapper on `dired-do-rename'
+
+With a prefix-arg, call it without using `vc-rename-file'."
+ (interactive "P")
+ (if arg
+ (let ((dired-vc-rename-file nil))
+ (funcall rename-fun))
+ (funcall rename-fun)))
+
(provide 'my-dired)
;;; my-dired.el ends here