diff options
| author | Martin Rudalics | 2011-09-22 11:28:57 +0200 |
|---|---|---|
| committer | Martin Rudalics | 2011-09-22 11:28:57 +0200 |
| commit | 7f80c86d3c06491c81836de1dff2db554b9d750c (patch) | |
| tree | 057e529d3c1309d33ef1e835ca710c8b2f9fbcd3 | |
| parent | bfeef8b6da2d8fad8cf2562bed35dbbc576a9d0c (diff) | |
| download | emacs-7f80c86d3c06491c81836de1dff2db554b9d750c.tar.gz emacs-7f80c86d3c06491c81836de1dff2db554b9d750c.zip | |
In special-display-popup-frame reset new frame's previous buffers to nil.
* window.el (special-display-popup-frame): When popping up a new frame
reset its previous buffers to nil. Simplify code.
| -rw-r--r-- | lisp/ChangeLog | 2 | ||||
| -rw-r--r-- | lisp/window.el | 18 |
2 files changed, 12 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f1cdee00c97..17000ca8697 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -14,6 +14,8 @@ | |||
| 14 | * window.el (quit-window): Undedicate window when switching to | 14 | * window.el (quit-window): Undedicate window when switching to |
| 15 | previous buffer. Reported by Thierry Volpiatto | 15 | previous buffer. Reported by Thierry Volpiatto |
| 16 | <thierry.volpiatto@gmail.com>. | 16 | <thierry.volpiatto@gmail.com>. |
| 17 | (special-display-popup-frame): When popping up a new frame reset | ||
| 18 | its previous buffers to nil. Simplify code. | ||
| 17 | 19 | ||
| 18 | 2011-09-21 Michael Albinus <michael.albinus@gmx.de> | 20 | 2011-09-21 Michael Albinus <michael.albinus@gmx.de> |
| 19 | 21 | ||
diff --git a/lisp/window.el b/lisp/window.el index 21d02f76042..843115d2e5c 100644 --- a/lisp/window.el +++ b/lisp/window.el | |||
| @@ -4104,14 +4104,16 @@ and (cdr ARGS) as second." | |||
| 4104 | special-display-buffer-names special-display-regexps) | 4104 | special-display-buffer-names special-display-regexps) |
| 4105 | (display-buffer buffer))) | 4105 | (display-buffer buffer))) |
| 4106 | ;; If no window yet, make one in a new frame. | 4106 | ;; If no window yet, make one in a new frame. |
| 4107 | (let ((frame | 4107 | (let* ((frame |
| 4108 | (with-current-buffer buffer | 4108 | (with-current-buffer buffer |
| 4109 | (make-frame (append args special-display-frame-alist))))) | 4109 | (make-frame (append args special-display-frame-alist)))) |
| 4110 | (display-buffer-record-window | 4110 | (window (frame-selected-window frame))) |
| 4111 | 'frame (frame-selected-window frame) buffer) | 4111 | (display-buffer-record-window 'frame window buffer) |
| 4112 | (set-window-buffer (frame-selected-window frame) buffer) | 4112 | (set-window-buffer window buffer) |
| 4113 | (set-window-dedicated-p (frame-selected-window frame) t) | 4113 | ;; Reset list of WINDOW's previous buffers to nil. |
| 4114 | (frame-selected-window frame)))))) | 4114 | (set-window-prev-buffers window nil) |
| 4115 | (set-window-dedicated-p window t) | ||
| 4116 | window))))) | ||
| 4115 | 4117 | ||
| 4116 | (defcustom special-display-function 'special-display-popup-frame | 4118 | (defcustom special-display-function 'special-display-popup-frame |
| 4117 | "Function to call for displaying special buffers. | 4119 | "Function to call for displaying special buffers. |