From: Juri Linkov Date: Wed, 20 Oct 2021 17:16:57 +0000 (+0300) Subject: Improve docstrings and NEWS item of 'repeat-mode' X-Git-Tag: emacs-28.0.90~233 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cb8b12b56d174e1a7b6e940debb8a9467285ab9e;p=emacs.git Improve docstrings and NEWS item of 'repeat-mode' * lisp/repeat.el (repeat-exit-timeout, repeat-echo-function) (repeat-in-progress, repeat-map): Update docstrings. --- diff --git a/etc/NEWS b/etc/NEWS index 7031be311e6..4caf81d1681 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3219,21 +3219,22 @@ batch mode. * New Modes and Packages in Emacs 28.1 +++ -** New transient mode 'repeat-mode' to allow shorter key sequences. +** New mode 'repeat-mode' to allow shorter key sequences. Type 'M-x repeat-mode RET' to enable this mode. You can then type 'C-x u u' instead of 'C-x u C-x u' to undo many changes, 'C-x o o' instead of 'C-x o C-x o' to switch windows, 'C-x { { } } ^ ^ v v' to resize the selected window interactively, 'M-g n n p p' to navigate -next-error matches. Any other key exits repeat mode and then is -executed normally. 'repeat-exit-key' defines an additional key to -exit mode like 'isearch-exit' ('RET'). The user option -'repeat-exit-timeout' specifies the number of seconds of idle time to -break the repetition chain automatically. With 'repeat-keep-prefix' -you can keep the prefix arg of the previous command. For example, -this can help to reverse the window navigation direction with -e.g. 'C-x o M-- o o'. Also it can help to set a new step with -e.g. 'C-x { C-5 { { {', which will set the window resizing step to 5 -columns. +next-error matches. Any other key exits this temporarily enabled +transient mode that supports shorter keys, and then after exiting +from this mode the default key binding is used for the last typed key. +'repeat-exit-key' defines an additional key to exit mode like +'isearch-exit' ('RET'). The user option 'repeat-exit-timeout' +specifies the number of seconds of idle time to break the repetition +chain automatically. With 'repeat-keep-prefix' you can keep the +prefix arg of the previous command. For example, this can help to +reverse the window navigation direction with e.g. 'C-x o M-- o o'. +Also it can help to set a new step with e.g. 'C-x { C-5 { { {', +which will set the window resizing step to 5 columns. --- ** New themes 'modus-vivendi' and 'modus-operandi'. diff --git a/lisp/repeat.el b/lisp/repeat.el index ee9e14b5155..42590b7e6d9 100644 --- a/lisp/repeat.el +++ b/lisp/repeat.el @@ -344,8 +344,8 @@ For example, you can set it to like `isearch-exit'." (defcustom repeat-exit-timeout nil "Break the repetition chain of keys after specified timeout. -When a number, exit the repeat mode after idle time of the specified -number of seconds." +When a number, exit the transient repeating mode after idle time +of the specified number of seconds." :type '(choice (const :tag "No timeout to exit repeating sequence" nil) (number :tag "Timeout in seconds to exit repeating")) :group 'convenience @@ -363,7 +363,7 @@ number of seconds." (defcustom repeat-echo-function #'repeat-echo-message "Function to display a hint about available keys. Function is called after every repeatable command with one argument: -a repeating map, or nil after deactivating the repeat mode." +a repeating map, or nil after deactivating the transient repeating mode." :type '(choice (const :tag "Show hints in the echo area" repeat-echo-message) (const :tag "Show indicator in the mode line" @@ -374,11 +374,11 @@ a repeating map, or nil after deactivating the repeat mode." :version "28.1") (defvar repeat-in-progress nil - "Non-nil when the repeating map is active.") + "Non-nil when the repeating transient map is active.") ;;;###autoload (defvar repeat-map nil - "The value of the repeating map for the next command. + "The value of the repeating transient map for the next command. A command called from the map can set it again to the same map when the map can't be set on the command symbol property `repeat-map'.")