From: Juri Linkov <juri@linkov.net>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 51281@debbugs.gnu.org
Subject: bug#51281: 28.0.60; repeat-mode issues
Date: Wed, 01 Dec 2021 19:58:49 +0200 [thread overview]
Message-ID: <86mtlk8aw6.fsf@mail.linkov.net> (raw)
In-Reply-To: <87pmrfo67f.fsf@gnus.org> (Lars Ingebrigtsen's message of "Fri, 05 Nov 2021 00:24:04 +0100")
[-- Attachment #1: Type: text/plain, Size: 763 bytes --]
>> Actually, this too confusing feature that allows changing prefix args
>> during the repeating sequence increases code complexity enormously.
>> For posterity I'll leave here the patch that completely supports it.
>> But this feature will be removed (unless someone will ask to leave it):
>>
>> C-x } } C-1 C-2 } } C-3 C-4 } }
>>
>> Only this will remain:
>>
>> C-x } } C-1 C-2 C-x } } C-3 C-4 C-x } }
>
> Well, it may be slightly on the confusing side, but it does feel
> natural, I think? So I think fixing it is better than removing it.
I hesitate to make such massive change in repeat.el on the release branch.
I have more patches for repeat.el that I'm unsure about to push.
One of them is a patch that allows kbd syntax for 'repeat-exit-key':
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: repeat-exit-key-kbd.patch --]
[-- Type: text/x-diff, Size: 1568 bytes --]
diff --git a/lisp/repeat.el b/lisp/repeat.el
index 7bbb398873..8199bd3287 100644
--- a/lisp/repeat.el
+++ b/lisp/repeat.el
@@ -338,6 +338,7 @@ repeat-exit-key
"Key that stops the modal repeating of keys in sequence.
For example, you can set it to <return> like `isearch-exit'."
:type '(choice (const :tag "No special key to exit repeating sequence" nil)
+ (string :tag "Kbd string that exits repeating sequence")
(key-sequence :tag "Key that exits repeating sequence"))
:group 'convenience
:version "28.1")
@@ -437,7 +455,10 @@ repeat-post-hook
;; Adding an exit key
(when repeat-exit-key
- (define-key map repeat-exit-key 'ignore))
+ (define-key map (if (stringp repeat-exit-key)
+ (kbd repeat-exit-key)
+ repeat-exit-key)
+ 'ignore))
(when (and repeat-keep-prefix (not prefix-arg))
(setq prefix-arg current-prefix-arg))
@@ -476,7 +497,9 @@ repeat-echo-message-string
keys ", ")
(if repeat-exit-key
(format ", or exit with %s"
- (key-description repeat-exit-key))
+ (if (stringp repeat-exit-key)
+ repeat-exit-key
+ (key-description repeat-exit-key)))
""))))
(defun repeat-echo-message (keymap)
next prev parent reply other threads:[~2021-12-01 17:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 7:12 bug#51281: 28.0.60; repeat-mode issues Juri Linkov
2021-10-20 17:30 ` Juri Linkov
2021-10-20 18:59 ` bug#51281: [External] : " Drew Adams
2021-10-21 16:51 ` Juri Linkov
2021-10-21 17:09 ` Drew Adams
2021-11-04 23:24 ` Lars Ingebrigtsen
2021-12-01 17:58 ` Juri Linkov [this message]
2021-12-01 18:15 ` Eli Zaretskii
2022-09-05 19:40 ` bug#55986: 28.1; (setq repeat-keep-prefix t) breaks repeat-mode Lars Ingebrigtsen
2022-10-03 19:58 ` Juri Linkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86mtlk8aw6.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=51281@debbugs.gnu.org \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).