Install fixes for Bug#12764 and Bug#12766.

* window.el (quit-restore-window): If the window has been
created on an existing frame and ended up as the sole window on
that frame, do not delete it (Bug#12764).

* minibuf.c (read_minibuf): Restore current buffer since
choose_minibuf_frame calling Fset_frame_selected_window may
change it (Bug#12766).
This commit is contained in:
Martin Rudalics 2012-10-31 11:02:51 +01:00
parent 69c1c2e65a
commit 218e997a10
4 changed files with 22 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2012-10-31 Martin Rudalics <rudalics@gmx.at>
* window.el (quit-restore-window): If the window has been
created on an existing frame and ended up as the sole window on
that frame, do not delete it (Bug#12764).
2012-10-31 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/sh-script.el (sh--inside-noncommand-expression):

View file

@ -3556,7 +3556,12 @@ the buffer of WINDOW. The following values are handled:
quad entry)
(cond
((and (not prev-buffer)
(memq (nth 1 quit-restore) '(window frame))
(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 ended 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)))

View file

@ -1,3 +1,9 @@
2012-10-31 Martin Rudalics <rudalics@gmx.at>
* minibuf.c (read_minibuf): Restore current buffer since
choose_minibuf_frame calling Fset_frame_selected_window may
change it (Bug#12766).
2012-10-30 Jan Djärv <jan.h.d@swipnet.se>
* frame.c (Fframe_pixel_height): Fix documentation (Bug#12733).

View file

@ -472,6 +472,10 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
/* Choose the minibuffer window and frame, and take action on them. */
/* Prepare for restoring the current buffer since choose_minibuf_frame
calling Fset_frame_selected_window may change it (Bug#12766). */
record_unwind_protect (Fset_buffer, Fcurrent_buffer ());
choose_minibuf_frame ();
record_unwind_protect (choose_minibuf_frame_1, Qnil);