Commit a1341f75 authored by Richard M. Stallman's avatar Richard M. Stallman

(cmd_error_internal): New function, broken out of cmd_error.

(read_char): Don't return right away when
read_char_minibuf_menu_prompt returns non-nil.
Instead, set key_already_recorded, which inhibits most but not all
of the work at non_reread.
parent 95e6cf39
......@@ -749,6 +749,22 @@ recursive_edit_unwind (buffer)
Lisp_Object
cmd_error (data)
Lisp_Object data;
{
Vstandard_output = Qt;
Vstandard_input = Qt;
Vexecuting_macro = Qnil;
cmd_error_internal (data, 0);
Vquit_flag = Qnil;
Vinhibit_quit = Qnil;
return make_number (0);
}
cmd_error_internal (data, context)
Lisp_Object data;
char *context;
{
Lisp_Object errmsg, tail, errname, file_error;
Lisp_Object stream;
......@@ -757,9 +773,6 @@ cmd_error (data)
Vquit_flag = Qnil;
Vinhibit_quit = Qt;
Vstandard_output = Qt;
Vstandard_input = Qt;
Vexecuting_macro = Qnil;
echo_area_glyphs = 0;
/* If the window system or terminal frame hasn't been initialized
......@@ -775,6 +788,9 @@ cmd_error (data)
stream = Qt;
}
if (context != 0)
write_string_1 (context, -1, stream);
errname = Fcar (data);
if (EQ (errname, Qerror))
......@@ -827,11 +843,6 @@ cmd_error (data)
Fterpri (stream);
Fkill_emacs (make_number (-1));
}
Vquit_flag = Qnil;
Vinhibit_quit = Qnil;
return make_number (0);
}
Lisp_Object command_loop_1 ();
......@@ -1473,6 +1484,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
register Lisp_Object c;
int count;
jmp_buf save_jump;
int key_already_recorded = 0;
if (CONSP (Vunread_command_events))
{
......@@ -1593,7 +1605,10 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
{
c = read_char_minibuf_menu_prompt (commandflag, nmaps, maps);
if (! NILP (c))
goto non_reread;
{
key_already_recorded = 1;
goto non_reread;
}
}
/* If in middle of key sequence and minibuffer not active,
......@@ -1731,6 +1746,9 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu)
if (XTYPE (c) == Lisp_Buffer)
return c;
if (key_already_recorded)
return c;
/* Wipe the echo area. */
echo_area_glyphs = 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment