From: Jan Djärv Date: Tue, 27 Apr 2010 06:45:43 +0000 (+0200) Subject: desktop.el (desktop-kill): ask-if-new: Ask if desktop file exists, X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~375 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7dd7fbb97528d964a25566a55b590a5a5774809b;p=emacs.git desktop.el (desktop-kill): ask-if-new: Ask if desktop file exists, but we aren't using it. --- 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)))