diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2008-03-01 13:56:16 +0000 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2008-03-01 13:56:16 +0000 |
commit | 803a00b52f2631bbe074e9547092fde689867924 (patch) | |
tree | 14b50e1da7466bae613b860aa6477bd9af11c8b5 /lisp | |
parent | 03cfb99becbab058fe71ff4e541f760e708b483b (diff) | |
download | emacs-803a00b52f2631bbe074e9547092fde689867924.tar.gz |
(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.
Diffstat (limited to 'lisp')
-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 fbf9ed5c044..a042828e19c 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el @@ -967,11 +967,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) |