Fix problem where an error would change standard-output
* src/keyboard.c (cmd_error): Don't set standard-output/standard-input (bug#30529). Instead bind them temporarily while handling the error.
This commit is contained in:
parent
37dbf10893
commit
65dd00667f
1 changed files with 4 additions and 2 deletions
|
@ -924,6 +924,7 @@ static Lisp_Object
|
|||
cmd_error (Lisp_Object data)
|
||||
{
|
||||
Lisp_Object old_level, old_length;
|
||||
ptrdiff_t count = SPECPDL_INDEX ();
|
||||
Lisp_Object conditions;
|
||||
char macroerror[sizeof "After..kbd macro iterations: "
|
||||
+ INT_STRLEN_BOUND (EMACS_INT)];
|
||||
|
@ -951,8 +952,8 @@ cmd_error (Lisp_Object data)
|
|||
executing_kbd_macro = Qnil;
|
||||
}
|
||||
|
||||
Vstandard_output = Qt;
|
||||
Vstandard_input = Qt;
|
||||
specbind (Qstandard_output, Qt);
|
||||
specbind (Qstandard_input, Qt);
|
||||
kset_prefix_arg (current_kboard, Qnil);
|
||||
kset_last_prefix_arg (current_kboard, Qnil);
|
||||
cancel_echoing ();
|
||||
|
@ -969,6 +970,7 @@ cmd_error (Lisp_Object data)
|
|||
Vquit_flag = Qnil;
|
||||
Vinhibit_quit = Qnil;
|
||||
|
||||
unbind_to (count, Qnil);
|
||||
return make_fixnum (0);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue