From 3a15818a01175865f2c6b625fe858aa5418af7b7 Mon Sep 17 00:00:00 2001 From: JSDurand Date: Mon, 19 Jun 2023 02:25:40 +0800 Subject: 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. --- desktop-conf.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'desktop-conf.el') 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) -- cgit v1.2.3-18-g5258