annotate src/event-xlike-inc.c @ 1296:87084e8445a7

[xemacs-hg @ 2003-02-14 09:50:15 by ben] syntax-table fixes 1. the updating of mirror tables every time a syntax table was modified was taking up huge amounts of time so i added a dirty flag and made the updating "just-in-time". 2. no-longer-used char-table-entries were not getting "freed", generating tons of garbage. 3. syntax_match() was being incorrectly called on mirror tables in the cache, not the original syntax table. buffer.c, syntax.c: Move syntax table description from buffer.c to syntax.c. chartab.c, chartab.h: Free extra char table entries to avoid excessive garbage. Add flags for dirty and mirror_table_p to char tables. Add a back pointer from mirror tables to the original syntax table. When modifying a syntax table, don't update the mirror table right away, just mark as dirty. Add various asserts to make sure we are dealing with the right type of table (mirror or non-mirror). font-lock.c, syntax.c, syntax.h: Add entry to syntax caches for the non-mirror table. Set it appropriately when initializing the syntax table. Use it, not the mirror table, for calls to syntax_match(). Don't create a bogus float each time, just once at startup. Add some asserts, as in chartab.c. syntax.h: When retrieving the syntax code, check the dirty flag and update the mirror tables as appropriate. Add some asserts, as above.
author ben
date Fri, 14 Feb 2003 09:50:17 +0000
parents fffe735e63ee
children a25c824ed558
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1268
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
1 /* Shared event code between X and GTK -- include file.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
2 Copyright (C) 1991-5, 1997 Free Software Foundation, Inc.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
3 Copyright (C) 1995 Sun Microsystems, Inc.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
4 Copyright (C) 1996, 2001, 2002, 2003 Ben Wing.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
5
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
6 This file is part of XEmacs.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
7
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
8 XEmacs is free software; you can redistribute it and/or modify it
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
9 under the terms of the GNU General Public License as published by the
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
10 Free Software Foundation; either version 2, or (at your option) any
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
11 later version.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
12
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
16 for more details.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
17
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
19 along with XEmacs; see the file COPYING. If not, write to
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
21 Boston, MA 02111-1307, USA. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
22
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
23 /* Synched up with: Not in FSF. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
24
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
25 /* For some code it's reasonable to have only one copy and conditionalize
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
26 at run-time. For other code it isn't. #### Perhaps all code should be
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
27 included here, not in event-xlike.c. However, event-xlike.c is always
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
28 X-specific, whereas the following code isn't, in the GTK case. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
29
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
30 static int
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
31 #ifdef THIS_IS_GTK
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
32 emacs_gtk_event_pending_p (int how_many)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
33 #else
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
34 emacs_Xt_event_pending_p (int how_many)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
35 #endif
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
36 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
37 Lisp_Object event;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
38 int tick_count_val;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
39
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
40 /* If `how_many' is 0, then this function returns whether there are any
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
41 X, timeout, or fd events pending (that is, whether
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
42 emacs_Xt_next_event() would return immediately without blocking).
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
43
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
44 If `how_many' is > 0, then this function returns whether there are
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
45 that many *user generated* events available (keyboard, mouse click,
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
46 etc.). This also implies that emacs_Xt_next_event() would not block.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
47 */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
48
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
49 /* This function used to simply check whether there were any X events (or
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
50 if user_p was 1, it iterated over all the pending X events using
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
51 XCheckIfEvent(), looking for keystrokes and button events). That
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
52 worked in the old cheesoid event loop, which didn't go through
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
53 XtAppDispatchEvent(), but it doesn't work any more -- X events may not
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
54 result in anything. For example, a button press in a blank part of
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
55 the menubar appears as an X event but will not result in any Emacs
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
56 events (a button press that activates the menubar results in an Emacs
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
57 event through the stop_next_event mechanism).
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
58
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
59 The only accurate way of determining whether these X events translate
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
60 into Emacs events is to go ahead and dispatch them until there's
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
61 something on the dispatch queue. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
62
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
63 if (!how_many)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
64 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
65 /* We're being asked for *ALL* events, not just user events. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
66
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
67 /* (1) Any pending events in the dispatch queue? */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
68 if (!NILP (dispatch_event_queue))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
69 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
70
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
71 /* (2) Any TTY or process input available?
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
72
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
73 Note that formerly we just checked the value of XtAppPending() to
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
74 determine if there was file-desc input. This doesn't work any
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
75 more with the signal_event_pipe; XtAppPending() will says "yes" in
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
76 this case but there isn't really any input. So instead we keep
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
77 track of the file descriptors, and call select() ourselves.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
78 Another way of fixing this problem is for the signal_event_pipe to
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
79 generate actual input in the form of an identity eval event or
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
80 something. (#### maybe this actually happens?) */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
81
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
82 if (poll_fds_for_input (non_fake_input_wait_mask))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
83 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
84
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
85 #ifndef THIS_IS_GTK
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
86 /* (3) Any timeout input available? */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
87 if (XtAppPending (Xt_app_con) & XtIMTimer)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
88 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
89 #else
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
90 /* #### Is there any way to do this in Gtk? I don't think there
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
91 is a 'peek' for events */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
92 #endif
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
93 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
94 else
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
95 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
96 /* HOW_MANY > 0 */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
97 EVENT_CHAIN_LOOP (event, dispatch_event_queue)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
98 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
99 if (command_event_p (event))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
100 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
101 how_many--;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
102 if (how_many <= 0)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
103 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
104 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
105 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
106 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
107
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
108 /* XtAppPending() can be super-slow, esp. over a network connection.
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
109 Quantify results have indicated that in some cases the call to
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
110 detect_input_pending() completely dominates the running time of
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
111 redisplay(). Fortunately, in a SIGIO world we can more quickly
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
112 determine whether there are any X events: if an event has happened
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
113 since the last time we checked, then a SIGIO will have happened. On a
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
114 machine with broken SIGIO, we'll still be in an OK state --
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
115 quit_check_signal_tick_count will get ticked at least every 1/4
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
116 second, so we'll be no more than that much behind reality. (In general
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
117 it's OK if we erroneously report no input pending when input is
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
118 actually pending() -- preemption is just a bit less efficient, that's
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
119 all. It's bad bad bad if you err the other way -- you've promised
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
120 that `next-event' won't block but it actually will, and some action
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
121 might get delayed until the next time you hit a key.)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
122 */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
123
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
124 if (!in_modal_loop)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
125 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
126 /* quit_check_signal_tick_count is volatile so try to avoid race
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
127 conditions by using a temporary variable */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
128 tick_count_val = quit_check_signal_tick_count;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
129 if (last_quit_check_signal_tick_count != tick_count_val
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
130 #if !defined (THIS_IS_GTK) && (!defined (SIGIO) || defined (CYGWIN))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
131 || (XtIMXEvent & XtAppPending (Xt_app_con))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
132 #endif
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
133 )
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
134 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
135 last_quit_check_signal_tick_count = tick_count_val;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
136
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
137 /* We need to drain the entire queue now -- if we only drain part of
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
138 it, we may later on end up with events actually pending but
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
139 detect_input_pending() returning false because there wasn't
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
140 another SIGIO. */
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
141 event_stream_drain_queue ();
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
142
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
143 if (!how_many)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
144 return !NILP (dispatch_event_queue);
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
145
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
146 EVENT_CHAIN_LOOP (event, dispatch_event_queue)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
147 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
148 if (command_event_p (event))
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
149 {
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
150 how_many--;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
151 if (how_many <= 0)
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
152 return 1;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
153 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
154 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
155
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
156 return 0;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
157 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
158 }
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
159
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
160 return 0;
fffe735e63ee [xemacs-hg @ 2003-02-07 11:50:50 by ben]
ben
parents:
diff changeset
161 }