summaryrefslogtreecommitdiff
path: root/desktop-conf.el
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-conf.el')
-rw-r--r--desktop-conf.el12
1 files changed, 12 insertions, 0 deletions
diff --git a/desktop-conf.el b/desktop-conf.el
index 462c549..074aad0 100644
--- a/desktop-conf.el
+++ b/desktop-conf.el
@@ -198,5 +198,17 @@ no questions asked."
(desktop-save-mode 1)
+;;; Add a hook to save bookmarks if we are not already saving them.
+
+(defvar durand-saving-bookmarks)
+
+(defun desktop-also-save-bookmarks ()
+ "Save bookmarks if we are not already saving bookmarks."
+ (cond
+ ((and (functionp #'bookmark-save) (not durand-saving-bookmarks))
+ (bookmark-save))))
+
+(add-hook 'desktop-save-hook #'desktop-also-save-bookmarks)
+
(provide 'desktop-conf)
;;; desktop-conf.el ends here