summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2011-09-22 11:28:57 +0200
committerMartin Rudalics <rudalics@gmx.at>2011-09-22 11:28:57 +0200
commit7f80c86d3c06491c81836de1dff2db554b9d750c (patch)
tree057e529d3c1309d33ef1e835ca710c8b2f9fbcd3 /lisp
parentbfeef8b6da2d8fad8cf2562bed35dbbc576a9d0c (diff)
downloademacs-7f80c86d3c06491c81836de1dff2db554b9d750c.tar.gz
emacs-7f80c86d3c06491c81836de1dff2db554b9d750c.tar.bz2
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.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog2
-rw-r--r--lisp/window.el18
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 @@
* window.el (quit-window): Undedicate window when switching to
previous buffer. Reported by Thierry Volpiatto
<thierry.volpiatto@gmail.com>.
+ (special-display-popup-frame): When popping up a new frame reset
+ its previous buffers to nil. Simplify code.
2011-09-21 Michael Albinus <michael.albinus@gmx.de>
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."
special-display-buffer-names special-display-regexps)
(display-buffer buffer)))
;; If no window yet, make one in a new frame.
- (let ((frame
- (with-current-buffer buffer
- (make-frame (append args special-display-frame-alist)))))
- (display-buffer-record-window
- 'frame (frame-selected-window frame) buffer)
- (set-window-buffer (frame-selected-window frame) buffer)
- (set-window-dedicated-p (frame-selected-window frame) t)
- (frame-selected-window frame))))))
+ (let* ((frame
+ (with-current-buffer buffer
+ (make-frame (append args special-display-frame-alist))))
+ (window (frame-selected-window frame)))
+ (display-buffer-record-window 'frame window buffer)
+ (set-window-buffer window buffer)
+ ;; Reset list of WINDOW's previous buffers to nil.
+ (set-window-prev-buffers window nil)
+ (set-window-dedicated-p window t)
+ window)))))
(defcustom special-display-function 'special-display-popup-frame
"Function to call for displaying special buffers.