Variable: desktop-save-mode

desktop-save-mode is a customizable variable defined in desktop.el.gz.

Value

nil

Documentation

Non-nil if Desktop-Save mode is enabled.

See the desktop-save-mode(var)/desktop-save-mode(fun) command for a description of this minor mode. Setting this variable directly does not take effect; either customize it (see the info node (emacs)Easy Customization) or call the function desktop-save-mode(var)/desktop-save-mode(fun).

View in manual

Probably introduced at or before Emacs version 22.1.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/desktop.el.gz
;;;###autoload
(define-minor-mode desktop-save-mode
  "Toggle desktop saving (Desktop Save mode).

When Desktop Save mode is enabled, the state of Emacs is saved from one
session to another.  The saved Emacs \"desktop configuration\" includes the
buffers, their file names, major modes, buffer positions, window and frame
configuration, and some important global variables.

To enable this feature for future sessions, customize `desktop-save-mode'
to t, or add this line in your init file:

    (desktop-save-mode 1)

When this mode is enabled, Emacs will save the desktop when it exits
\(this may prompt you, see the option `desktop-save').  The next time
Emacs starts, if this mode is active it will restore the desktop.

To manually save the desktop at any time, use the command \\[desktop-save].
To load it, use \\[desktop-read].

Once a desktop file exists, Emacs will auto-save it according to the
option `desktop-auto-save-timeout'.

To see all the options you can set, browse the `desktop' customization group.

For further details, see info node `(emacs)Saving Emacs Sessions'."
  :global t
  (if desktop-save-mode
      (desktop-auto-save-enable)
    (desktop-auto-save-disable)))