changeset 80259:b30a40e18121

(desktop-read): Set `desktop-dirname' to nil before calling `desktop-not-loaded-hook' to allow modifying it. Don't show warning message if `desktop-dirname' was modified.
author Juanma Barranquero <lekktu@gmail.com>
date Sat, 01 Mar 2008 13:56:16 +0000
parents 54ec3d566dbb
children bcd82d955672
files lisp/desktop.el
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/desktop.el	Sat Mar 01 09:05:12 2008 +0000
+++ b/lisp/desktop.el	Sat Mar 01 13:56:16 2008 +0000
@@ -967,11 +967,11 @@
 		   (or (null desktop-load-locked-desktop)
 		       (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\
 Using it may cause conflicts.  Use it anyway? " owner)))))
-	      (progn
-		(let ((default-directory desktop-dirname))
-		  (run-hooks 'desktop-not-loaded-hook))
+	      (let ((default-directory desktop-dirname))
 		(setq desktop-dirname nil)
-		(message "Desktop file in use; not loaded."))
+		(run-hooks 'desktop-not-loaded-hook)
+		(unless desktop-dirname
+		  (message "Desktop file in use; not loaded.")))
 	    (desktop-lazy-abort)
 	    ;; Evaluate desktop buffer and remember when it was modified.
 	    (load (desktop-full-file-name) t t t)