*** lisp/window.el 2012-10-27 08:58:30 +0000
--- lisp/window.el 2012-10-30 09:51:16 +0000
***************
*** 3556,3562 ****
quad entry)
(cond
((and (not prev-buffer)
! (memq (nth 1 quit-restore) '(window frame))
(eq (nth 3 quit-restore) buffer)
;; Delete WINDOW if possible.
(window--delete window nil (eq bury-or-kill 'kill)))
--- 3556,3567 ----
quad entry)
(cond
((and (not prev-buffer)
! (or (eq (nth 1 quit-restore) 'frame)
! (and (eq (nth 1 quit-restore) 'window)
! ;; If the window has been created on an existing
! ;; frame and winds up as the sole window on that
! ;; frame, do not delete it (Bug#12764).
! (not (eq window (frame-root-window window)))))
(eq (nth 3 quit-restore) buffer)
;; Delete WINDOW if possible.
(window--delete window nil (eq bury-or-kill 'kill)))