summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuanma Barranquero <lekktu@gmail.com>2008-03-01 13:58:59 +0000
committerJuanma Barranquero <lekktu@gmail.com>2008-03-01 13:58:59 +0000
commit04ba431364ac0a6b53fc709efe234086a22f71fe (patch)
tree3e81edb9955be313159eba420c510e60d99a73bb
parent0ce2ec82c9ab3c6490ccf293f025567eeb283634 (diff)
downloademacs-04ba431364ac0a6b53fc709efe234086a22f71fe.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.
-rw-r--r--lisp/ChangeLog11
-rw-r--r--lisp/desktop.el8
2 files changed, 12 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 627e29dbc4f..2c05f010dcc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,7 +1,12 @@
+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 Alan Mackenzie <acm@muc.de>
- * progmodes/cc-mode.el (c-neutralize-syntax-in-CPP): Fix coding
- bug.
+ * progmodes/cc-mode.el (c-neutralize-syntax-in-CPP): Fix coding bug.
* progmodes/cc-langs.el (c-before-font-lock-function): Fix bug in
doc-string, "c-old-LEN" -> "c-old-END".
@@ -156,7 +161,7 @@
(verilog-pretty-declarations): Add new flag to ask it to refrain
from printing to the message buffer.
(verilog-pretty-expr): Add a QUIET flag to ask it to refrain from
- printing to the message buffer. Improve handling of the many
+ printing to the message buffer. Improve handling of the many
types of expression line up.
(verilog-just-one-space): Remove printing of an empty message.
(verilog-get-lineup-indent): Rework to support the better handling
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)