desktop-save-hook

desktop-save-hook is a variable defined in `desktop.el'.
Its value is
nil

  • This variable may be risky if used as a file-local variable.

Documentation:
Normal hook run before the desktop is saved in a desktop file.
Run with the desktop buffer current with only the header present.
May be used to add to the desktop code or to truncate history lists,
for example.

You can customize this variable.