emacs-diffs
[Top][All Lists]
Advanced

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

master d74dad673b 3/5: Bind M-G unconditionally in Dired


From: Stefan Kangas
Subject: master d74dad673b 3/5: Bind M-G unconditionally in Dired
Date: Sat, 9 Jul 2022 05:50:21 -0400 (EDT)

branch: master
commit d74dad673b854b011b23853d298c9a8f86d2d6ad
Author: Stefan Kangas <stefan@marxist.se>
Commit: Stefan Kangas <stefan@marxist.se>

    Bind M-G unconditionally in Dired
    
    * lisp/dired-x.el: Move dired-goto-subdir binding from here...
    * lisp/dired.el (dired-mode-map): ...to here.  (Bug#21981)
    
    * doc/misc/dired-x.texi (Miscellaneous Commands): Move
    documentation of above command from here...
    * doc/emacs/dired.texi (Subdirectory Motion): ...to here.
---
 doc/emacs/dired.texi  | 6 ++++++
 doc/misc/dired-x.texi | 9 ---------
 etc/NEWS              | 5 +++++
 lisp/dired-x.el       | 1 -
 lisp/dired.el         | 1 +
 5 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi
index 69450c82d6..292c986c1c 100644
--- a/doc/emacs/dired.texi
+++ b/doc/emacs/dired.texi
@@ -1333,6 +1333,12 @@ parent directory.
 @kindex > @r{(Dired)}
 @item >
 Move down to the next directory-file line (@code{dired-next-dirline}).
+
+@findex dired-goto-subdir
+@kindex M-G @r{(Dired)}
+@item M-G
+Prompt for a directory and move to its directory-file line
+(@code{dired-goto-subdir}).
 @end table
 
 @node Hiding Subdirectories
diff --git a/doc/misc/dired-x.texi b/doc/misc/dired-x.texi
index 0e8f969b29..50d9914081 100644
--- a/doc/misc/dired-x.texi
+++ b/doc/misc/dired-x.texi
@@ -882,15 +882,6 @@ normal and a wildcard buffer for the same directory, 
@kbd{C-x d @key{RET}}
 will toggle between those two.
 @end table
 
-@table @kbd
-@findex dired-goto-subdir
-@kindex M-G
-@item M-G
-(@code{dired-goto-subdir}) Go to the header line of an inserted directory.
-This command reads its argument, with completion derived from the names of the
-inserted subdirectories.
-@end table
-
 @table @code
 
 @item dired-vm
diff --git a/etc/NEWS b/etc/NEWS
index 8c9a05775f..ef6e7216e2 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1065,6 +1065,11 @@ The corresponding key "Y" is now bound by default in 
Dired.
 *** 'dired-do-relsymlink-regexp' moved from dired-x to dired.
 The corresponding key "% Y" is now bound by default in Dired.
 
+---
+*** 'M-G' is now bound to 'dired-goto-subdir'.
+Before, that binding was only available if the 'dired-x' package was
+loaded.
+
 +++
 *** 'dired-info' and 'dired-man' moved from dired-x to dired.
 The 'dired-info' and 'dired-man' commands have been moved from the
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 4d66ab6f12..9edf837481 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -236,7 +236,6 @@ to nil: a pipe using `zcat' or `gunzip -c' will be used."
 (define-key dired-mode-map "\C-x\M-o" 'dired-omit-mode)
 (define-key dired-mode-map "\M-(" 'dired-mark-sexp)
 (define-key dired-mode-map "\M-!" 'dired-smart-shell-command)
-(define-key dired-mode-map "\M-G" 'dired-goto-subdir)
 (define-key dired-mode-map "F" 'dired-do-find-marked-files)
 (define-key dired-mode-map "V" 'dired-do-run-mail)
 
diff --git a/lisp/dired.el b/lisp/dired.el
index bdcfc36a0e..b9ab2a9b1e 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -2174,6 +2174,7 @@ Do so according to the former subdir alist 
OLD-SUBDIR-ALIST."
   "S-SPC"   #'dired-previous-line
   "<remap> <next-line>"        #'dired-next-line
   "<remap> <previous-line>"    #'dired-previous-line
+  "M-G"    #'dired-goto-subdir
   ;; hiding
   "$"       #'dired-hide-subdir
   "M-$"     #'dired-hide-all



reply via email to

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