Mercurial > emacs
changeset 92364:4cf1d5a7cc52
(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.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Sat, 01 Mar 2008 14:16:50 +0000 |
parents | 1b9ed04041df |
children | da14af9c4d86 |
files | lisp/desktop.el |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/desktop.el Sat Mar 01 10:09:52 2008 +0000 +++ b/lisp/desktop.el Sat Mar 01 14:16:50 2008 +0000 @@ -969,11 +969,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)