summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2017-07-28 15:40:25 +0300
committerEli Zaretskii <eliz@gnu.org>2017-07-28 15:40:25 +0300
commitdc9c6a071c0c12be2bd490f85107486bca44623e (patch)
tree41fd51ba4c22e5ee10c18e557e7047003d7e1283 /src
parentf1ed31a8f5c6f19aa5e119e670533241c6375945 (diff)
downloademacs-dc9c6a071c0c12be2bd490f85107486bca44623e.tar.gz
Preserve this-command-keys across recursive-edit invocations
* src/minibuf.c (read_minibuf, read_minibuf_unwind): Save and restore this-command-keys, to preserve it across recursive-edit. (Bug#27470)
Diffstat (limited to 'src')
-rw-r--r--src/minibuf.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/minibuf.c b/src/minibuf.c
index d4128ce01c1..010152930bc 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -497,6 +497,8 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
Fcons (Vminibuffer_history_position,
Fcons (Vminibuffer_history_variable,
minibuf_save_list))))));
+ minibuf_save_list
+ = Fcons (Fthis_command_keys_vector (), minibuf_save_list);
record_unwind_protect_void (read_minibuf_unwind);
minibuf_level++;
@@ -836,6 +838,11 @@ read_minibuf_unwind (void)
Fset_buffer (XWINDOW (window)->contents);
/* Restore prompt, etc, from outer minibuffer level. */
+ Lisp_Object key_vec = Fcar (minibuf_save_list);
+ eassert (VECTORP (key_vec));
+ this_command_key_count = XFASTINT (Flength (key_vec));
+ this_command_keys = key_vec;
+ minibuf_save_list = Fcdr (minibuf_save_list);
minibuf_prompt = Fcar (minibuf_save_list);
minibuf_save_list = Fcdr (minibuf_save_list);
minibuf_prompt_width = XFASTINT (Fcar (minibuf_save_list));