Tags: patch As the comment in temporarily_switch_to_single_kboard () says, it is possible for lisp code to call `recursive-edit' (or one of its callers) while the keyboard for the selected frame is locked. And it is indeed better to throw an error when this happens than to leave the user with a frozen screen. (I don't properly understand the circumstances I saw it in, but they involved emacs --daemon and a terminal which did not actually work.) One small problem: this happens *after* the line: command_loop_level++; but before the line: record_unwind_protect (recursive_edit_unwind, buffer); which registers the code that does the corresponding: command_loop_level--; So the user will be left with every indication that they're in a recursive edit, except that when they try to use C-M-c it will give them a cryptic error like "No catch for tag: exit, nil" in the status area instead of zapping those pesky square brackets. Here's a patch against master to fix that: