From: Thiago Melo <tmdmelo@gmail.com>
To: emacs-devel@gnu.org
Subject: Reversed tmm-prompt items when tmm-mid-prompt is nil
Date: Sun, 28 May 2023 14:59:37 +0000 [thread overview]
Message-ID: <CABpoeKhcfd5X5N1GE5ZmrcC8VpcGH-hZaBtwE45XU5=i6_Zn3w@mail.gmail.com> (raw)
Commit #5d844e1 fixed `tmm-prompt' for Emacs 29 (Bug#63754. Thanks,
Eli!) and even made the `tmm-mid-prompt' = nil option work again.
The fix also surfaced one inconsistency between nil and non-nil
`tmm-mid-prompt'. When nil, the items shown by `tmm-prompt' are
reversed.
Compare these two cases:
(let ((tmm-mid-prompt "==>")
(test-menu '("top" ("menu" ("foo" . 1) ("bar" . 2) ("baz" . 3)))))
(tmm-prompt test-menu))
(let ((tmm-mid-prompt nil)
(test-menu '("top" ("menu" ("foo" . 1) ("bar" . 2) ("baz" . 3)))))
(tmm-prompt test-menu))
It seems innocuous and not worth a bug report. Still, here's a way to
make this behavior more consistent:
--- a/lisp/tmm.el 2023-05-27 21:26:44.594743965 +0200
+++ b/lisp/tmm.el 2023-05-28 01:44:53.850880002 +0200
@@ -172,7 +172,7 @@ (defun tmm-prompt (menu &optional in-pop
(let ((index-of-default 0))
(if tmm-mid-prompt
(setq tmm-km-list (tmm-add-shortcuts tmm-km-list))
- t)
+ (setq tmm-km-list (reverse tmm-km-list)))
;; Find the default item's index within the menu bar.
;; We use this to decide the initial minibuffer contents
;; and initial history position.
next reply other threads:[~2023-05-28 14:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-28 14:59 Thiago Melo [this message]
2023-05-29 12:33 ` Reversed tmm-prompt items when tmm-mid-prompt is nil Eli Zaretskii
2023-05-29 14:40 ` Thiago Melo
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='CABpoeKhcfd5X5N1GE5ZmrcC8VpcGH-hZaBtwE45XU5=i6_Zn3w@mail.gmail.com' \
--to=tmdmelo@gmail.com \
--cc=emacs-devel@gnu.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).