]> git.eshelyaron.com Git - emacs.git/commitdiff
Make dired-jump repeatable in repeat-mode
authorStefan Kangas <stefan@marxist.se>
Sat, 2 Jul 2022 14:56:39 +0000 (16:56 +0200)
committerStefan Kangas <stefan@marxist.se>
Sat, 2 Jul 2022 15:09:22 +0000 (17:09 +0200)
* lisp/dired.el (dired-jump-map): New variable.
(dired-jump): Put 'repeat-map' property with 'dired-jump-map'.

lisp/dired.el

index dc7400d46e0ef0dfbb5b9ecc06e23380ba29cac3..d7bf6316882d74213475d986ca26ce94dd406ce7 100644 (file)
@@ -4797,6 +4797,11 @@ Interactively with prefix argument, read FILE-NAME."
              (read-file-name "Jump to Dired file: "))))
   (dired-jump t file-name))
 
+(defvar-keymap dired-jump-map
+  :doc "Keymap to repeat `dired-jump'.  Used in `repeat-mode'."
+  "C-j" #'dired-jump)
+(put 'dired-jump 'repeat-map 'dired-jump-map)
+
 \f
 ;;; Miscellaneous commands