[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reversed tmm-prompt items when tmm-mid-prompt is nil
From: |
Thiago Melo |
Subject: |
Reversed tmm-prompt items when tmm-mid-prompt is nil |
Date: |
Sun, 28 May 2023 14:59:37 +0000 |
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.
- Reversed tmm-prompt items when tmm-mid-prompt is nil,
Thiago Melo <=