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.
This commit is contained in:
Eli Zaretskii 2022-01-13 16:18:50 +02:00
parent 1ee9275c1b
commit 7fd5e92931

View file

@ -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