Mercurial > emacs
comparison lisp/desktop.el @ 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 | 04dddf68dfc0 |
children | 6dea71380597 |
comparison
equal
deleted
inserted
replaced
92363:1b9ed04041df | 92364:4cf1d5a7cc52 |
---|---|
967 (if (and owner | 967 (if (and owner |
968 (memq desktop-load-locked-desktop '(nil ask)) | 968 (memq desktop-load-locked-desktop '(nil ask)) |
969 (or (null desktop-load-locked-desktop) | 969 (or (null desktop-load-locked-desktop) |
970 (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\ | 970 (not (y-or-n-p (format "Warning: desktop file appears to be in use by PID %s.\n\ |
971 Using it may cause conflicts. Use it anyway? " owner))))) | 971 Using it may cause conflicts. Use it anyway? " owner))))) |
972 (progn | 972 (let ((default-directory desktop-dirname)) |
973 (let ((default-directory desktop-dirname)) | |
974 (run-hooks 'desktop-not-loaded-hook)) | |
975 (setq desktop-dirname nil) | 973 (setq desktop-dirname nil) |
976 (message "Desktop file in use; not loaded.")) | 974 (run-hooks 'desktop-not-loaded-hook) |
975 (unless desktop-dirname | |
976 (message "Desktop file in use; not loaded."))) | |
977 (desktop-lazy-abort) | 977 (desktop-lazy-abort) |
978 ;; Evaluate desktop buffer and remember when it was modified. | 978 ;; Evaluate desktop buffer and remember when it was modified. |
979 (load (desktop-full-file-name) t t t) | 979 (load (desktop-full-file-name) t t t) |
980 (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name)))) | 980 (setq desktop-file-modtime (nth 5 (file-attributes (desktop-full-file-name)))) |
981 ;; If it wasn't already, mark it as in-use, to bother other | 981 ;; If it wasn't already, mark it as in-use, to bother other |