Add repeat-map for Python indentation commands

* lisp/progmodes/python.el (python-indent-repeat-map): New
keymap for repeating Python indentation commands when using
'repeat-mode' (bug#77417).
This commit is contained in:
Paul Nelson 2025-03-31 12:12:01 +02:00 committed by Juri Linkov
parent 839ef39a5e
commit 67c89a675d
2 changed files with 13 additions and 0 deletions

View file

@ -1347,6 +1347,12 @@ mode. Now, one needs to say '(midnight-mode +1)' instead.
** Python mode
*** New repeat-map for Python indentation commands.
The commands 'python-indent-shift-left' and 'python-indent-shift-right'
can now be repeated using 'repeat-mode'. With 'repeat-mode' enabled,
after invoking one of these commands via 'C-c <' or 'C-c >', you can
press '<' or '>' to repeat the command.
---
*** Prefer "python" for 'python-interpreter' and 'python-shell-interpreter'.
On recent versions of mainstream GNU/Linux distributions, "python"

View file

@ -373,6 +373,13 @@ effect."
;; Utilities
"<remap> <complete-symbol>" #'completion-at-point)
(defvar-keymap python-indent-repeat-map
:doc "Keymap to repeat Python indentation commands.
Used in `repeat-mode'."
:repeat t
"<" #'python-indent-shift-left
">" #'python-indent-shift-right)
(defvar subword-mode nil)
(easy-menu-define python-menu python-base-mode-map