diff options
| author | Martin Rudalics | 2012-05-28 11:48:29 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2012-05-28 11:48:29 +0200 |
| commit | 5221ccb96e8dde4c0c3164f9517aa7b54e539d0d (patch) | |
| tree | 1bd34c276df067cbeac9eeae36775ef2f1f4255b | |
| parent | ed7bebbb489cf6f893fc35a2a6714b0d8e7e8a90 (diff) | |
| download | emacs-5221ccb96e8dde4c0c3164f9517aa7b54e539d0d.tar.gz 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).
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/desktop.el | 12 |
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 @@ | |||
| 1 | 2012-05-28 Martin Rudalics <rudalics@gmx.at> | ||
| 2 | |||
| 3 | * desktop.el (desktop-read): Clear previous and next buffers for | ||
| 4 | all windows and bury *Messages* buffer (bug#11556). | ||
| 5 | |||
| 1 | 2012-05-18 Eli Zaretskii <eliz@gnu.org> | 6 | 2012-05-18 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * mail/sendmail.el (mail-yank-region): Recognize | 8 | * 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))))) | |||
| 1022 | (format ", %d to restore lazily" | 1022 | (format ", %d to restore lazily" |
| 1023 | (length desktop-buffer-args-list)) | 1023 | (length desktop-buffer-args-list)) |
| 1024 | "")) | 1024 | "")) |
| 1025 | ;; Bury the *Messages* buffer to not reshow it when burying | ||
| 1026 | ;; the buffer we switched to above. | ||
| 1027 | (when (buffer-live-p (get-buffer "*Messages*")) | ||
| 1028 | (bury-buffer "*Messages*")) | ||
| 1029 | ;; Clear all windows' previous and next buffers, these have | ||
| 1030 | ;; been corrupted by the `switch-to-buffer' calls in | ||
| 1031 | ;; `desktop-restore-file-buffer' (bug#11556). This is a | ||
| 1032 | ;; brute force fix and should be replaced by a more subtle | ||
| 1033 | ;; strategy eventually. | ||
| 1034 | (walk-window-tree (lambda (window) | ||
| 1035 | (set-window-prev-buffers window nil) | ||
| 1036 | (set-window-next-buffers window nil))) | ||
| 1025 | t)) | 1037 | t)) |
| 1026 | ;; No desktop file found. | 1038 | ;; No desktop file found. |
| 1027 | (desktop-clear) | 1039 | (desktop-clear) |