summaryrefslogtreecommitdiff
path: root/src/minibuf.c
diff options
context:
space:
mode:
authorMartin Rudalics <rudalics@gmx.at>2012-10-31 11:02:51 +0100
committerMartin Rudalics <rudalics@gmx.at>2012-10-31 11:02:51 +0100
commit218e997a10bc1bc2eebde639f9b0aaddc525159d (patch)
tree3b0b065ea77aac4ab2c4b95782d91963d834ce93 /src/minibuf.c
parent69c1c2e65a5cbf9c26fcdc0920ca806d50440860 (diff)
downloademacs-218e997a10bc1bc2eebde639f9b0aaddc525159d.tar.gz
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).
Diffstat (limited to 'src/minibuf.c')
-rw-r--r--src/minibuf.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index 2cc89e75680..dcc4af37c13 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -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);