summaryrefslogtreecommitdiff
path: root/lisp/desktop.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/desktop.el')
-rw-r--r--lisp/desktop.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 4af1fea1f9a..9be0ad74adb 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -622,7 +622,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)))