summaryrefslogtreecommitdiff
path: root/desktop-conf.el
diff options
context:
space:
mode:
authorJSDurand <mmemmew@gmail.com>2023-06-19 02:25:40 +0800
committerJSDurand <mmemmew@gmail.com>2023-06-19 02:25:40 +0800
commit3a15818a01175865f2c6b625fe858aa5418af7b7 (patch)
tree6fed60c8a388d896b6ae80fcd308e6ee20b6d10f /desktop-conf.el
parent65db3d46ee23f6b17d899d9fefcb41dd0471b4bc (diff)
desktop: fix the previous issue of a variable not bound.
* desktop-conf.el (desktop-also-save-bookmarks): Check if the variable `durand-saving-bookmarks` is bound, before checking its value.
Diffstat (limited to 'desktop-conf.el')
-rw-r--r--desktop-conf.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop-conf.el b/desktop-conf.el
index be3ea52..f0a53ee 100644
--- a/desktop-conf.el
+++ b/desktop-conf.el
@@ -205,7 +205,9 @@ no questions asked."
(defun desktop-also-save-bookmarks ()
"Save bookmarks if we are not already saving bookmarks."
(cond
- ((and (functionp #'bookmark-save) (not durand-saving-bookmarks))
+ ((and (functionp #'bookmark-save)
+ (or (not (boundp 'durand-saving-bookmarks))
+ (not durand-saving-bookmarks)))
(let ((inhibit-message t)) (bookmark-save)))))
(add-hook 'desktop-save-hook #'desktop-also-save-bookmarks)