From 7dd7fbb97528d964a25566a55b590a5a5774809b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Tue, 27 Apr 2010 08:45:43 +0200 Subject: [PATCH] desktop.el (desktop-kill): ask-if-new: Ask if desktop file exists, but we aren't using it. --- lisp/ChangeLog | 5 +++++ lisp/desktop.el | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e6e8dcabadb..fce9ebf350f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-04-27 Jan Djärv + + * desktop.el (desktop-kill): ask-if-new: Ask if desktop file exists, + but we aren't using it. + 2010-04-25 Jan Djärv * tool-bar.el (tool-bar-local-item-from-menu): Revert unintended diff --git a/lisp/desktop.el b/lisp/desktop.el index 0e6153cfe47..5c2e6d9b2f5 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -620,7 +620,10 @@ is nil, ask the user where to save the desktop." (when (and desktop-save-mode (let ((exists (file-exists-p (desktop-full-file-name)))) (or (eq desktop-save t) - (and exists (memq desktop-save '(ask-if-new if-exists))) + (and exists (eq desktop-save 'if-exists)) + ;; If it exists, but we aren't using it, we are going + ;; to ask for a new directory below. + (and exists desktop-dirname (eq desktop-save 'ask-if-new)) (and (or (memq desktop-save '(ask ask-if-new)) (and exists (eq desktop-save 'ask-if-exists))) -- 2.39.5