diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2008-03-01 14:17:41 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2008-03-01 14:17:41 +0000 |
commit | c41cf130749506a90c313c00a679e89147880934 (patch) | |
tree | c75ca04569bf9974bb504d59eb0807129dc33f76 /lisp/desktop.el | |
parent | 6c8acaa1be9bdada2296efc31c4fffd4292310ed (diff) | |
download | emacs-c41cf130749506a90c313c00a679e89147880934.tar.gz |
(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.
Diffstat (limited to 'lisp/desktop.el')
-rw-r--r-- | lisp/desktop.el | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el index ce10b19894f..d52890e2a93 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -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) |