From: Stefan Kangas Date: Sat, 9 Jul 2022 08:21:31 +0000 (+0200) Subject: Bind M-G unconditionally in Dired X-Git-Tag: emacs-29.0.90~1447^2~1074 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d74dad673b854b011b23853d298c9a8f86d2d6ad;p=emacs.git 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. --- diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index 69450c82d67..292c986c1c6 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 0e8f969b299..50d9914081c 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 8c9a05775f2..ef6e7216e24 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 4d66ab6f128..9edf8374815 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 bdcfc36a0e0..b9ab2a9b1e6 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 " " #'dired-next-line " " #'dired-previous-line + "M-G" #'dired-goto-subdir ;; hiding "$" #'dired-hide-subdir "M-$" #'dired-hide-all