Emacs: save-place hook for daemon

master
Pierre Neidhardt 2014-03-03 21:05:09 +01:00
parent 7794c3f964
commit 22b59c20d1
1 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,9 @@
(require 'saveplace)
(setq save-place-file (concat emacs-cache-folder "saveplace"))
(setq-default save-place t)
(add-hook 'before-save-hook 'save-place-to-alist)
;; When the daemon is killed abruptly, places are not saved. Adding this hook
;; allows to save places at a strategic moment.
(add-hook 'before-save-hook 'save-place-kill-emacs-hook)
;; Bookmark file to cache folder.
(setq bookmark-default-file (concat emacs-cache-folder "emacs.bmk"))