]> git.eshelyaron.com Git - emacs.git/commitdiff
(desktop-read): Set `desktop-dirname' to nil before running
authorJuanma Barranquero <lekktu@gmail.com>
Sat, 1 Mar 2008 14:17:41 +0000 (14:17 +0000)
committerJuanma Barranquero <lekktu@gmail.com>
Sat, 1 Mar 2008 14:17:41 +0000 (14:17 +0000)
`desktop-not-loaded-hook' to allow modifying it.
Don't show warning message if `desktop-dirname' was modified.

lisp/ChangeLog
lisp/desktop.el

index 9b9b7eaee76c0b957715cfcff421def7018a48f5..4c805de52f564582024a057aea608ec772dfe1d3 100644 (file)
@@ -1,3 +1,9 @@
+2008-03-01  Juanma Barranquero  <lekktu@gmail.com>
+
+       * desktop.el (desktop-read): Set `desktop-dirname' to nil before
+       running `desktop-not-loaded-hook' to allow modifying it.
+       Don't show warning message if `desktop-dirname' was modified.
+
 2008-03-01  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * diff-mode.el (diff-sanity-check-hunk): Only accept an empty line if
index ce10b19894f4503130c023c0a38c0a26c5de0c18..d52890e2a9344f86b6f46bb502239987077c3691 100644 (file)
@@ -969,11 +969,11 @@ It returns t if a desktop file was loaded, nil otherwise."
                   (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)