*** orig/src/keyboard.c --- mod/src/keyboard.c *************** *** 1247,1252 **** --- 1247,1256 ---- while (1) { internal_catch (Qtop_level, top_level_1, Qnil); + /* Reset single_kboard in case top-level set it while + evaluating an -f option, or we are stuck there for some + other reason. */ + any_kboard_state (); internal_catch (Qtop_level, command_loop_2, Qnil); executing_macro = Qnil;