From: Stefan Kangas Date: Mon, 24 Aug 2020 00:17:52 +0000 (+0200) Subject: Add "Delete" submenu to Dired "Operate" menu X-Git-Tag: emacs-28.0.90~6405 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a17ad0b212330fd6a196fef55721195f281b205d;p=emacs.git Add "Delete" submenu to Dired "Operate" menu * lisp/dired.el (dired-mode-map): Add "Delete" submenu to "Operate" menu with an entry for 'dired-do-flagged-delete'. (Bug#41524) --- diff --git a/lisp/dired.el b/lisp/dired.el index 94d3befda85..08d04688519 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2244,8 +2244,15 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." '(menu-item "Shell Command..." dired-do-shell-command :help "Run a shell command on current or marked files")) (define-key map [menu-bar operate delete] - '(menu-item "Delete" dired-do-delete - :help "Delete current file or all marked files")) + `(menu-item "Delete" + ,(let ((menu (make-sparse-keymap "Delete"))) + (define-key menu [delete-flagged] + '(menu-item "Delete Flagged Files" dired-do-flagged-delete + :help "Delete all files flagged for deletion (D)")) + (define-key menu [delete-marked] + '(menu-item "Delete Marked (Not Flagged) Files" dired-do-delete + :help "Delete current file or all marked files (excluding flagged files)")) + menu))) (define-key map [menu-bar operate rename] '(menu-item "Rename to..." dired-do-rename :help "Rename current file or move marked files"))