emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 78f93d92b2: * lisp/vc/vc-dir.el: Make keys ‘% m’ and ‘* %’ com


From: Juri Linkov
Subject: emacs-29 78f93d92b2: * lisp/vc/vc-dir.el: Make keys ‘% m’ and ‘* %’ compatible with Dired
Date: Wed, 18 Jan 2023 12:55:56 -0500 (EST)

branch: emacs-29
commit 78f93d92b2871cc05f5293c7344fe5fe188a763c
Author: Juri Linkov <juri@linkov.net>
Commit: Juri Linkov <juri@linkov.net>

    * lisp/vc/vc-dir.el: Make keys ‘% m’ and ‘* %’ compatible with Dired
    
    (vc-dir-mode-map): Replace ‘%’ for vc-dir-mark-by-regexp
    with ‘% m’ in regexp-map and ‘* %’ in mark-map (bug#60887).
    
    * doc/emacs/maintaining.texi (VC Directory Commands): Replace ‘%’
    with ‘% m’ and ‘* %’.  Mention vc-dir-mark-registered-files.
---
 doc/emacs/maintaining.texi | 9 ++++++++-
 etc/NEWS                   | 2 +-
 lisp/vc/vc-dir.el          | 8 ++++++--
 3 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index 8c77ded55d..5191bb2918 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -1331,11 +1331,18 @@ point is on a directory entry, mark all files in that 
directory tree
 listed files and directories.
 
 @findex vc-dir-mark-by-regexp
-@item %
+@item % m
+@itemx * %
 You can use this command to mark files by regexp
 (@code{vc-dir-mark-by-regexp}).  If given a prefix, unmark files
 instead.
 
+@findex vc-dir-mark-registered-files
+@item * r
+You can use this command to mark files that are in one of registered
+states, including edited, added or removed.
+(@code{vc-dir-mark-registered-files}).
+
 @item G
 Add the file under point to the list of files that the VC should
 ignore (@code{vc-dir-ignore}).  For instance, if the VC is Git, it
diff --git a/etc/NEWS b/etc/NEWS
index 95dd4a24ec..14941b906e 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -2079,7 +2079,7 @@ The VC Directory buffer now uses the prefix 'b' for these 
branch-related
 commands.
 
 +++
-*** New command '%' ('vc-dir-mark-by-regexp').
+*** New command 'vc-dir-mark-by-regexp' bound to '% m' and '* %'.
 This command marks files based on a regexp.  If given a prefix
 argument, unmark instead.
 
diff --git a/lisp/vc/vc-dir.el b/lisp/vc/vc-dir.el
index 312556f644..53d58870b3 100644
--- a/lisp/vc/vc-dir.el
+++ b/lisp/vc/vc-dir.el
@@ -325,7 +325,6 @@ See `run-hooks'."
     (define-key map "U" #'vc-dir-unmark-all-files)
     (define-key map "\C-?" #'vc-dir-unmark-file-up)
     (define-key map "\M-\C-?" #'vc-dir-unmark-all-files)
-    (define-key map "%" #'vc-dir-mark-by-regexp)
     ;; Movement.
     (define-key map "n" #'vc-dir-next-line)
     (define-key map " " #'vc-dir-next-line)
@@ -361,8 +360,13 @@ See `run-hooks'."
       (define-key branch-map "l" #'vc-print-branch-log)
       (define-key branch-map "s" #'vc-switch-branch))
 
+    (let ((regexp-map (make-sparse-keymap)))
+      (define-key map "%" regexp-map)
+      (define-key regexp-map "m" #'vc-dir-mark-by-regexp))
+
     (let ((mark-map (make-sparse-keymap)))
       (define-key map "*" mark-map)
+      (define-key mark-map "%" #'vc-dir-mark-by-regexp)
       (define-key mark-map "r" #'vc-dir-mark-registered-files))
 
     ;; Hook up the menu.
@@ -791,7 +795,7 @@ MARK-FILES should be a list of absolute filenames."
    vc-ewoc))
 
 (defun vc-dir-mark-registered-files ()
-  "Mark files that are in one of registered state: edited, added or removed."
+  "Mark files that are in one of registered states: edited, added or removed."
   (interactive)
   (vc-dir-mark-state-files '(edited added removed)))
 



reply via email to

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