summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2012-05-28 11:48:29 +0200
committerMartin Rudalics <rudalics@gmx.at>2012-05-28 11:48:29 +0200
commit5221ccb96e8dde4c0c3164f9517aa7b54e539d0d (patch)
tree1bd34c276df067cbeac9eeae36775ef2f1f4255b /lisp
parented7bebbb489cf6f893fc35a2a6714b0d8e7e8a90 (diff)
downloademacs-5221ccb96e8dde4c0c3164f9517aa7b54e539d0d.tar.gz
emacs-5221ccb96e8dde4c0c3164f9517aa7b54e539d0d.tar.bz2
emacs-5221ccb96e8dde4c0c3164f9517aa7b54e539d0d.zip
Ugly fix for bug#11556.
* desktop.el (desktop-read): Clear previous and next buffers for all windows and bury *Messages* buffer (bug#11556).
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/desktop.el12
2 files changed, 17 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5b27dcfb52e..2ebff3d0eed 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-28 Martin Rudalics <rudalics@gmx.at>
+
+ * desktop.el (desktop-read): Clear previous and next buffers for
+ all windows and bury *Messages* buffer (bug#11556).
+
2012-05-18 Eli Zaretskii <eliz@gnu.org>
* mail/sendmail.el (mail-yank-region): Recognize
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 674ce72dba3..ce3efb09a74 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -1022,6 +1022,18 @@ Using it may cause conflicts. Use it anyway? " owner)))))
(format ", %d to restore lazily"
(length desktop-buffer-args-list))
""))
+ ;; Bury the *Messages* buffer to not reshow it when burying
+ ;; the buffer we switched to above.
+ (when (buffer-live-p (get-buffer "*Messages*"))
+ (bury-buffer "*Messages*"))
+ ;; Clear all windows' previous and next buffers, these have
+ ;; been corrupted by the `switch-to-buffer' calls in
+ ;; `desktop-restore-file-buffer' (bug#11556). This is a
+ ;; brute force fix and should be replaced by a more subtle
+ ;; strategy eventually.
+ (walk-window-tree (lambda (window)
+ (set-window-prev-buffers window nil)
+ (set-window-next-buffers window nil)))
t))
;; No desktop file found.
(desktop-clear)