From 7fd5e929310a9310768a0b126968a481167c4a79 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 13 Jan 2022 16:18:50 +0200 Subject: [PATCH] Fix frame-undeletion menu items * lisp/menu-bar.el (menu-bar-file-menu): Fix wording of the new menu items and their help-echo. Don't show "Undelete Frame" in the menu unless there is a frame to undelete. --- lisp/menu-bar.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 3e00dca6f82..36cbd6a9c51 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -110,12 +110,13 @@ menu-bar-separator)) (bindings--define-key menu [enable-undelete-frame-mode] - '(menu-item "Enable Frame Undeletion" undelete-frame-mode + '(menu-item "Enable Undeleting Frames" undelete-frame-mode :visible (null undelete-frame-mode) - :help "Enable frame undeletion for this session")) + :help "Enable undeleting frames in this session")) (bindings--define-key menu [undelete-last-deleted-frame] '(menu-item "Undelete Frame" undelete-frame - :visible undelete-frame-mode + :visible (and undelete-frame-mode + (car undelete-frame--deleted-frames)) :help "Undelete the most recently deleted frame")) ;; Don't use delete-frame as event name because that is a special -- 2.39.2