emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

emacs-29 d8ba28fa394: Fix order of tmm-menubar when 'tmm-mid-prompt' is


From: Eli Zaretskii
Subject: emacs-29 d8ba28fa394: Fix order of tmm-menubar when 'tmm-mid-prompt' is nil
Date: Mon, 29 May 2023 08:33:14 -0400 (EDT)

branch: emacs-29
commit d8ba28fa3943b73b748b3f50853031139f23ef9b
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Fix order of tmm-menubar when 'tmm-mid-prompt' is nil
    
    * lisp/tmm.el (tmm-prompt): Reverse 'tmm-km-list' when
    'tmm-mid-prompt' is nil, to present the menu in the correct order.
    Suggested by Thiago Melo <tmdmelo@gmail.com>.
---
 lisp/tmm.el | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lisp/tmm.el b/lisp/tmm.el
index 6088961fa4c..88254f0d1b8 100644
--- a/lisp/tmm.el
+++ b/lisp/tmm.el
@@ -170,9 +170,11 @@ instead of executing it."
        (error "Empty menu reached"))
       (and tmm-km-list
           (let ((index-of-default 0))
-            (if tmm-mid-prompt
-                (setq tmm-km-list (tmm-add-shortcuts tmm-km-list))
-              t)
+             (setq tmm-km-list
+                  (if tmm-mid-prompt
+                       (tmm-add-shortcuts tmm-km-list)
+                     ;; tmm-add-shortcuts reverses tmm-km-list internally.
+                     (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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]