[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 46e4704: Miscellaneous corrections to src/minibuf.c for bug #4833
From: |
Alan Mackenzie |
Subject: |
master 46e4704: Miscellaneous corrections to src/minibuf.c for bug #48337 |
Date: |
Sat, 15 May 2021 07:51:33 -0400 (EDT) |
branch: master
commit 46e4704e2abca4d264a43965f92eab7608211ee6
Author: Alan Mackenzie <acm@muc.de>
Commit: Alan Mackenzie <acm@muc.de>
Miscellaneous corrections to src/minibuf.c for bug #48337
* src/minibuf.c (read_minibuf): Call get_minibuffer before incrementing
minibuf_level, in case a hook function calls Factive_minibuffer_window.
(init_minibuf_once_for_pdumper): Create *Minibuf-0* here (moved from
init_minibuf_once), and set its mode, so that clicking in the mini-window
immediately after start up works (thanks, Eli Z.).
---
src/minibuf.c | 16 +++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/src/minibuf.c b/src/minibuf.c
index 428998a..b40d1fb 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -653,11 +653,12 @@ read_minibuf (Lisp_Object map, Lisp_Object initial,
Lisp_Object prompt,
return unbind_to (count, val);
}
- minibuf_level++; /* Before calling choose_minibuf_frame. */
- /* Ensure now that the latest minibuffer has been created, in case
- anything happens which depends on MINNIBUF_LEVEL and
- Vminibuffer_list being consistent with eachother. */
- minibuffer = get_minibuffer (minibuf_level);
+ /* Ensure now that the latest minibuffer has been created and pushed
+ onto Vminibuffer_list before incrementing minibuf_level, in case
+ a hook called during the minibuffer creation calls
+ Factive_minibuffer_window. */
+ minibuffer = get_minibuffer (minibuf_level + 1);
+ minibuf_level++; /* Before calling choose_minibuf_frame. */
/* Choose the minibuffer window and frame, and take action on them. */
@@ -2278,8 +2279,6 @@ init_minibuf_once (void)
staticpro (&Vminibuffer_list);
staticpro (&Vcommand_loop_level_list);
pdumper_do_now_and_after_load (init_minibuf_once_for_pdumper);
- /* Ensure our inactive minibuffer exists. */
- get_minibuffer (0);
}
static void
@@ -2297,6 +2296,9 @@ init_minibuf_once_for_pdumper (void)
minibuf_prompt = Qnil;
minibuf_save_list = Qnil;
last_minibuf_string = Qnil;
+ /* Ensure our inactive minibuffer exists. */
+ Lisp_Object minibuf = get_minibuffer (0);
+ set_minibuffer_mode (minibuf, 0);
}
void
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 46e4704: Miscellaneous corrections to src/minibuf.c for bug #48337,
Alan Mackenzie <=