summaryrefslogtreecommitdiff
path: root/doc/emacs/basic.texi
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2021-02-17 20:04:42 +0200
committerJuri Linkov <juri@linkov.net>2021-02-17 20:04:42 +0200
commit12409c9064c386a496dcbdca76b790108f6c1cad (patch)
tree6b10d190e518cb2e69a3dfc729dff7767d5ab3e3 /doc/emacs/basic.texi
parent734396aa04cd57173f1a604397244ed84f3f56a8 (diff)
downloademacs-12409c9064c386a496dcbdca76b790108f6c1cad.tar.gz
New transient mode 'repeat-mode' to allow shorter key sequences (bug#46515)
* doc/emacs/basic.texi (Repeating): Document repeat-mode. * lisp/repeat.el (repeat-exit-key): New defcustom. (repeat-mode): New global minor mode. (repeat-post-hook): New function. * lisp/bindings.el (undo-repeat-map): New variable. (undo): Put 'repeat-map' property with 'undo-repeat-map'. (next-error-repeat-map): New variable. (next-error, previous-error): Put 'repeat-map' property with 'next-error-repeat-map'. * lisp/window.el (other-window-repeat-map): New variable. (other-window): Put 'repeat-map' property with 'other-window-repeat-map'. (resize-window-repeat-map): New variable. (enlarge-window, enlarge-window-horizontally) (shrink-window-horizontally, shrink-window): Put 'repeat-map' property with 'resize-window-repeat-map'.
Diffstat (limited to 'doc/emacs/basic.texi')
-rw-r--r--doc/emacs/basic.texi11
1 files changed, 11 insertions, 0 deletions
diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi
index 444b28f24be..8bf52d5dd30 100644
--- a/doc/emacs/basic.texi
+++ b/doc/emacs/basic.texi
@@ -880,3 +880,14 @@ characters. You can repeat that command (including its argument) three
additional times, to delete a total of 80 characters, by typing @kbd{C-x
z z z}. The first @kbd{C-x z} repeats the command once, and each
subsequent @kbd{z} repeats it once again.
+
+@findex repeat-mode
+ Also you can activate @code{repeat-mode} that temporarily enables
+a transient mode with short keys after a limited number of commands.
+Currently supported shorter key sequences are @kbd{C-x u u} instead of
+@kbd{C-x u C-x u} to undo many changes, @kbd{C-x o o} instead of
+@kbd{C-x o C-x o} to switch several windows, @kbd{C-x @{ @{ @} @} ^ ^
+v v} to resize the selected window interactively, @kbd{M-g n n p p} to
+navigate @code{next-error} matches. Any other key exits transient mode
+and then is executed normally. The user option @code{repeat-exit-key}
+defines an additional key to exit this transient mode.