Mercurial > hg > xemacs-beta
comparison src/cmdloop.c @ 70:131b0175ea99 r20-0b30
Import from CVS: tag r20-0b30
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:02:59 +0200 |
parents | 56c54cf7c5b6 |
children | 6608ceec7cf8 |
comparison
equal
deleted
inserted
replaced
69:804d1389bcd6 | 70:131b0175ea99 |
---|---|
214 | 214 |
215 /* Avoid confusing the compiler. A helper function for command_loop_2 */ | 215 /* Avoid confusing the compiler. A helper function for command_loop_2 */ |
216 static DOESNT_RETURN | 216 static DOESNT_RETURN |
217 command_loop_3 (void) | 217 command_loop_3 (void) |
218 { | 218 { |
219 #ifdef LWLIB_MENUBARS_LUCID | |
220 extern int in_menu_callback; /* defined in menubar-x.c */ | |
221 #endif /* LWLIB_MENUBARS_LUCID */ | |
222 | |
223 #ifdef LWLIB_MENUBARS_LUCID | |
224 /* | |
225 * #### Fix the menu code so this isn't necessary. | |
226 * | |
227 * We cannot allow the lwmenu code to be reentered, because the | |
228 * code is not written to be reentrant and will crash. Therefore | |
229 * paths from the menu callbacks back into the menu code have to | |
230 * be blocked. Fnext_event is the normal path into the menu code, | |
231 * but waiting to signal an error there is too late in case where | |
232 * a new command loop has been started. The error will be caught | |
233 * and Fnext_event will be called again, looping forever. So we | |
234 * signal an error here to avoid the loop. | |
235 */ | |
236 if (in_menu_callback) | |
237 error ("Attempt to enter command_loop_3 inside menu callback"); | |
238 #endif /* LWLIB_MENUBARS_LUCID */ | |
239 /* This function can GC */ | 219 /* This function can GC */ |
240 for (;;) | 220 for (;;) |
241 { | 221 { |
242 condition_case_1 (Qerror, command_loop_1, Qnil, cmd_error, Qnil); | 222 condition_case_1 (Qerror, command_loop_1, Qnil, cmd_error, Qnil); |
243 /* #### wrong with selected-console? */ | 223 /* #### wrong with selected-console? */ |