comparison src/event-stream.c @ 138:6608ceec7cf8 r20-2b3

Import from CVS: tag r20-2b3
author cvs
date Mon, 13 Aug 2007 09:31:46 +0200
parents cca96a509cfe
children 1856695b1fa9
comparison
equal deleted inserted replaced
137:cae984061f40 138:6608ceec7cf8
1987 struct console *con = XCONSOLE (Vselected_console); 1987 struct console *con = XCONSOLE (Vselected_console);
1988 struct command_builder *command_builder = 1988 struct command_builder *command_builder =
1989 XCOMMAND_BUILDER (con->command_builder); 1989 XCOMMAND_BUILDER (con->command_builder);
1990 int store_this_key = 0; 1990 int store_this_key = 0;
1991 struct gcpro gcpro1; 1991 struct gcpro gcpro1;
1992 #ifdef LWLIB_MENUBARS_LUCID
1993 extern int in_menu_callback; /* defined in menubar-x.c */
1994 #endif /* LWLIB_MENUBARS_LUCID */
1995
1992 GCPRO1 (event); 1996 GCPRO1 (event);
1993
1994 /* DO NOT do QUIT anywhere within this function or the functions it calls. 1997 /* DO NOT do QUIT anywhere within this function or the functions it calls.
1995 We want to read the ^G as an event. */ 1998 We want to read the ^G as an event. */
1999
2000 #ifdef LWLIB_MENUBARS_LUCID
2001 /*
2002 * #### Fix the menu code so this isn't necessary.
2003 *
2004 * We cannot allow the lwmenu code to be reentered, because the
2005 * code is not written to be reentrant and will crash. Therefore
2006 * paths from the menu callbacks back into the menu code have to
2007 * be blocked. Fnext_event is the normal path into the menu code,
2008 * so we signal an error here.
2009 */
2010 if (in_menu_callback)
2011 error ("Attempt to call next-event inside menu callback");
2012 #endif /* LWLIB_MENUBARS_LUCID */
1996 2013
1997 if (NILP (event)) 2014 if (NILP (event))
1998 event = Fmake_event (); 2015 event = Fmake_event ();
1999 else 2016 else
2000 CHECK_LIVE_EVENT (event); 2017 CHECK_LIVE_EVENT (event);