Mercurial > emacs
changeset 8994:818bddaf3e03
(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.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 22 Sep 1994 06:26:46 +0000 |
parents | c6572fa27df3 |
children | 2281d87b7c91 |
files | src/keyboard.c |
diffstat | 1 files changed, 27 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/keyboard.c Thu Sep 22 05:47:28 1994 +0000 +++ b/src/keyboard.c Thu Sep 22 06:26:46 1994 +0000 @@ -750,6 +750,22 @@ 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; struct gcpro gcpro1; @@ -757,9 +773,6 @@ 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 @@ stream = Qt; } + if (context != 0) + write_string_1 (context, -1, stream); + errname = Fcar (data); if (EQ (errname, Qerror)) @@ -827,11 +843,6 @@ 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 @@ register Lisp_Object c; int count; jmp_buf save_jump; + int key_already_recorded = 0; if (CONSP (Vunread_command_events)) { @@ -1593,7 +1605,10 @@ { 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 @@ if (XTYPE (c) == Lisp_Buffer) return c; + if (key_already_recorded) + return c; + /* Wipe the echo area. */ echo_area_glyphs = 0;