Please consider adding a mandatory timeout (see attached patch) when calling condition-wait in the main-thread. As it currently is, any such call may make Emacs freeze irrecoverably. I hope no argument is needed, why this is a bad thing. Andreas