From: Eli Zaretskii Date: Thu, 13 Jan 2022 14:18:50 +0000 (+0200) Subject: Fix frame-undeletion menu items X-Git-Tag: emacs-29.0.90~3090 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7fd5e929310a9310768a0b126968a481167c4a79;p=emacs.git 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. --- 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