diff options
author | Juri Linkov <juri@linkov.net> | 2022-01-16 22:58:30 +0200 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2022-01-16 22:58:30 +0200 |
commit | 714e11d53534416b6519396a9df5d62054731810 (patch) | |
tree | 48e8f0c0f5d9ea800346609e83bf4d1865052f3a /lisp/menu-bar.el | |
parent | 5c30c8778dffb647528d2144e00a48eaf723416e (diff) | |
download | emacs-714e11d53534416b6519396a9df5d62054731810.tar.gz |
Add undelete-frame-max instead of undelete-frame-mode (bug#51883)
* doc/emacs/frames.texi (Frame Commands): Replace
undelete-frame-mode with undelete-frame-max.
* lisp/frame.el (undelete-frame-max): New defcustom, by default 1.
(undelete-frame--handle-delete-frame): Use undelete-frame-max
instead of hard-coded 16.
(undelete-frame-mode): Remove function.
(after-init-hook): Add hook undelete-frame--handle-delete-frame to
delete-frame-functions using after-init-hook to not store the
initial frame.
(undelete-frame): Remove undelete-frame-mode. Use undelete-frame-max
instead of hard-coded 16.
* lisp/menu-bar.el (menu-bar-file-menu): Remove menu item undelete-frame-mode.
* src/frame.c (Fdelete_frame): Replace `undelete-frame-mode' with
`undelete-frame-max' in the docstring.
Diffstat (limited to 'lisp/menu-bar.el')
-rw-r--r-- | lisp/menu-bar.el | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 36cbd6a9c51..e5a070b24ad 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -109,14 +109,9 @@ (bindings--define-key menu [separator-tab] menu-bar-separator)) - (bindings--define-key menu [enable-undelete-frame-mode] - '(menu-item "Enable Undeleting Frames" undelete-frame-mode - :visible (null undelete-frame-mode) - :help "Enable undeleting frames in this session")) (bindings--define-key menu [undelete-last-deleted-frame] '(menu-item "Undelete Frame" undelete-frame - :visible (and undelete-frame-mode - (car undelete-frame--deleted-frames)) + :visible (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 |