New #emacs package: persist-state
Automatically saves the state in the background: history variables, bookmarks, open buffers, etc. are saved regularly while Emacs is running.
Normally these saves are done by kill-emacs-hook
, but these functions are not executed when Emacs stops unexpectedly.