From: Lars Ingebrigtsen <larsi@gnus.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 5264@debbugs.gnu.org
Subject: bug#5264: 23.1; `repeat' should not hard-code the set of affected commands
Date: Wed, 27 Apr 2016 23:17:43 +0200 [thread overview]
Message-ID: <87a8keu4y0.fsf@gnus.org> (raw)
In-Reply-To: <829F48EB8E68453A956D490A63FD97CB@us.oracle.com> (Drew Adams's message of "Thu, 24 Dec 2009 07:30:20 -0800")
"Drew Adams" <drew.adams@oracle.com> writes:
> In the definition of command `repeat':
>
> (if (memq last-repeatable-command
> '(exit-minibuffer
> minibuffer-complete-and-exit
> self-insert-and-exit))
>
> This list of affected commands should not be hard-coded. If user code
> uses different functions from `exit-minibuffer' and
> `minibuffer-complete-and-exit', then users must redefine `repeat' to
> accommodate this command difference. The `repeat' definition should
> be more flexible than that.
>
> This list of commands should be treated the same way we treat the list
> of dangerous commands (`repeat-too-dangerous'): define a variable
> whose value is the list of commands - do not hard-code the list.
But what it is this does? If `last-repeatable-command' is any of these
commands, then we... repeat the first command in `command-history'
instead? What does that do, exactly?
(if (memq last-repeatable-command '(exit-minibuffer
minibuffer-complete-and-exit
self-insert-and-exit))
(let ((repeat-command (car command-history)))
(repeat-message "Repeating %S" repeat-command)
(eval repeat-command))
(if (null repeat-arg)
(repeat-message "Repeating command %S" last-repeatable-command)
(setq current-prefix-arg repeat-arg)
(repeat-message
"Repeating command %S %S" repeat-arg last-repeatable-command))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2016-04-27 21:17 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-24 15:30 bug#5264: 23.1; `repeat' should not hard-code the set of affected commands Drew Adams
2014-02-10 3:28 ` Lars Ingebrigtsen
2016-04-27 21:17 ` Lars Ingebrigtsen [this message]
2021-07-18 14:39 ` Lars Ingebrigtsen
2021-07-18 15:40 ` bug#5264: [External] : " Drew Adams
2021-07-18 19:03 ` Eli Zaretskii
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87a8keu4y0.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=5264@debbugs.gnu.org \
--cc=drew.adams@oracle.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.