From dde313151d32bbea358b0c019104035582710a5e Mon Sep 17 00:00:00 2001 From: Juri Linkov Date: Mon, 20 Jan 2020 02:14:24 +0200 Subject: [PATCH] * lisp/menu-bar.el (menu-bar-options-menu): Add desktop-save-mode (bug#37594) --- lisp/menu-bar.el | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 8f825a19adc..731da193ef1 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -1476,6 +1476,18 @@ mail status in mode line")) (bindings--define-key menu [cursor-separator] menu-bar-separator) + (bindings--define-key menu [save-desktop] + (menu-bar-make-toggle + toggle-save-desktop-globally desktop-save-mode + "Save State between Sessions" + "Saving desktop state %s" + "Visit desktop of previous session when restarting Emacs" + (require 'desktop) + ;; Do it by name, to avoid a free-variable + ;; warning during byte compilation. + (set-default + 'desktop-save-mode (not (symbol-value 'desktop-save-mode))))) + (bindings--define-key menu [save-place] (menu-bar-make-toggle toggle-save-place-globally save-place-mode -- 2.39.2