#ifdef SIGIO
static void input_available_signal (int signo);
#endif
-static Lisp_Object (Fcommand_execute) (Lisp_Object, Lisp_Object, Lisp_Object,
- Lisp_Object);
static void handle_interrupt (void);
-static void quit_throw_to_read_char (int) NO_RETURN;
+static _Noreturn void quit_throw_to_read_char (int);
static void process_special_events (void);
static void timer_start_idle (void);
static void timer_stop_idle (void);
if (i == this_single_command_key_start)
before_command_echo_length = echo_length ();
- c = XVECTOR (this_command_keys)->contents[i];
+ c = AREF (this_command_keys, i);
if (! (EVENT_HAS_PARAMETERS (c)
&& EQ (EVENT_HEAD_KIND (EVENT_HEAD (c)), Qmouse_movement)))
echo_char (c);
Fthrow (Qtop_level, Qnil);
}
-static void user_error (const char*) NO_RETURN;
-static void user_error (const char *msg)
+static _Noreturn void
+user_error (const char *msg)
{
xsignal1 (Quser_error, build_string (msg));
}
-static Lisp_Object Fexit_recursive_edit (void) NO_RETURN;
+_Noreturn
DEFUN ("exit-recursive-edit", Fexit_recursive_edit, Sexit_recursive_edit, 0, 0, "",
doc: /* Exit from the innermost recursive edit or minibuffer. */)
(void)
user_error ("No recursive edit is in progress");
}
-static Lisp_Object Fabort_recursive_edit (void) NO_RETURN;
+_Noreturn
DEFUN ("abort-recursive-edit", Fabort_recursive_edit, Sabort_recursive_edit, 0, 0, "",
doc: /* Abort the command that requested this recursive edit or minibuffer input. */)
(void)
/* FIXME: This is wrong rather than test window-system, we should call
a new set-selection, which will then dispatch to x-set-selection, or
tty-set-selection, or w32-set-selection, ... */
-EXFUN (Fwindow_system, 1);
Lisp_Object
command_loop_1 (void)
&& (beg < PT /* && end > PT <- It's always the case. */
|| (beg <= PT && STRINGP (val) && SCHARS (val) == 0)))
{
- xassert (end > PT);
+ eassert (end > PT);
SET_PT (PT < last_pt
? (STRINGP (val) && SCHARS (val) == 0
? max (beg - 1, BEGV)
#if 0 /* This assertion isn't correct, because SET_PT may end up setting
the point to something other than its argument, due to
point-motion hooks, intangibility, etc. */
- xassert (PT == beg || PT == end);
+ eassert (PT == beg || PT == end);
#endif
/* Pretend the area doesn't exist if the buffer is not
if (poll_timer == NULL
|| EMACS_SECS (poll_timer->interval) != polling_period)
{
+ time_t period = max (1, min (polling_period, TYPE_MAXIMUM (time_t)));
EMACS_TIME interval;
if (poll_timer)
cancel_atimer (poll_timer);
- EMACS_SET_SECS_USECS (interval, polling_period, 0);
+ EMACS_SET_SECS_USECS (interval, period, 0);
poll_timer = start_atimer (ATIMER_CONTINUOUS, interval,
poll_for_input, NULL);
}
bind_polling_period (int n)
{
#ifdef POLL_FOR_INPUT
- int new = polling_period;
+ EMACS_INT new = polling_period;
if (n > new)
new = n;
/* Input of single characters from keyboard */
static Lisp_Object kbd_buffer_get_event (KBOARD **kbp, int *used_mouse_menu,
- struct timeval *end_time);
+ EMACS_TIME *end_time);
static void record_char (Lisp_Object c);
static Lisp_Object help_form_saved_window_configs;
Lisp_Object
read_char (int commandflag, ptrdiff_t nmaps, Lisp_Object *maps,
Lisp_Object prev_event,
- int *used_mouse_menu, struct timeval *end_time)
+ int *used_mouse_menu, EMACS_TIME *end_time)
{
volatile Lisp_Object c;
ptrdiff_t jmpcount;
static Lisp_Object
kbd_buffer_get_event (KBOARD **kbp,
int *used_mouse_menu,
- struct timeval *end_time)
+ EMACS_TIME *end_time)
{
Lisp_Object obj;
EMACS_TIME duration;
EMACS_GET_TIME (duration);
if (EMACS_TIME_GE (duration, *end_time))
- return Qnil; /* finished waiting */
+ return Qnil; /* Finished waiting. */
else
{
EMACS_SUB_TIME (duration, *end_time, duration);
- wait_reading_process_output (EMACS_SECS (duration),
- EMACS_USECS (duration),
+ wait_reading_process_output (min (EMACS_SECS (duration),
+ WAIT_READING_MAX),
+ EMACS_NSECS (duration),
-1, 1, Qnil, NULL, 0);
}
}
#if defined (WINDOWSNT)
else if (event->kind == LANGUAGE_CHANGE_EVENT)
{
- /* Make an event (language-change (FRAME CHARSET LCID)). */
- obj = Fcons (event->frame_or_window, Qnil);
- obj = Fcons (Qlanguage_change, Fcons (obj, Qnil));
+ /* Make an event (language-change (FRAME CODEPAGE LANGUAGE-ID)). */
+ obj = Fcons (Qlanguage_change,
+ list3 (event->frame_or_window,
+ make_number (event->code),
+ make_number (event->modifiers)));
kbd_fetch_ptr = event + 1;
}
#endif
Lisp_Object timers;
/* If we are already in the idle state, do nothing. */
- if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
+ if (EMACS_TIME_VALID_P (timer_idleness_start_time))
return;
EMACS_GET_TIME (timer_idleness_start_time);
timer = XCAR (timers);
- if (!VECTORP (timer) || ASIZE (timer) != 8)
+ if (!VECTORP (timer) || ASIZE (timer) != 9)
continue;
- XVECTOR (timer)->contents[0] = Qnil;
+ ASET (timer, 0, Qnil);
}
}
static void
timer_stop_idle (void)
{
- EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1);
+ EMACS_SET_INVALID_TIME (timer_idleness_start_time);
}
/* Resume idle timer from last idle start time. */
static void
timer_resume_idle (void)
{
- if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
+ if (EMACS_TIME_VALID_P (timer_idleness_start_time))
return;
timer_idleness_start_time = timer_last_idleness_start_time;
...). Each element has the form (FUN . ARGS). */
Lisp_Object pending_funcalls;
+/* If TIMER is a valid timer, return nonzero and place its value into
+ *RESULT. Otherwise return zero. */
+static int
+decode_timer (Lisp_Object timer, EMACS_TIME *result)
+{
+ Lisp_Object *vector;
+
+ if (! (VECTORP (timer) && ASIZE (timer) == 9))
+ return 0;
+ vector = XVECTOR (timer)->contents;
+ if (! NILP (vector[0]))
+ return 0;
+
+ return decode_time_components (vector[1], vector[2], vector[3], vector[4],
+ result, 0);
+}
+
+
/* Check whether a timer has fired. To prevent larger problems we simply
disregard elements that are not proper timers. Do not make a circular
timer list for the time being.
{
EMACS_TIME nexttime;
EMACS_TIME now;
- EMACS_TIME idleness_now IF_LINT (= {0});
+ EMACS_TIME idleness_now;
Lisp_Object timers, idle_timers, chosen_timer;
struct gcpro gcpro1, gcpro2, gcpro3;
- EMACS_SET_SECS (nexttime, -1);
- EMACS_SET_USECS (nexttime, -1);
+ EMACS_SET_INVALID_TIME (nexttime);
/* Always consider the ordinary timers. */
timers = Vtimer_list;
/* Consider the idle timers only if Emacs is idle. */
- if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
+ if (EMACS_TIME_VALID_P (timer_idleness_start_time))
idle_timers = Vtimer_idle_list;
else
idle_timers = Qnil;
if (CONSP (timers) || CONSP (idle_timers))
{
EMACS_GET_TIME (now);
- if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
+ if (EMACS_TIME_VALID_P (timer_idleness_start_time))
EMACS_SUB_TIME (idleness_now, now, timer_idleness_start_time);
+ else
+ EMACS_SET_SECS_NSECS (idleness_now, 0, 0);
}
while (CONSP (timers) || CONSP (idle_timers))
Lisp_Object timer = Qnil, idle_timer = Qnil;
EMACS_TIME timer_time, idle_timer_time;
EMACS_TIME difference;
- EMACS_TIME timer_difference IF_LINT (= {0});
- EMACS_TIME idle_timer_difference IF_LINT (= {0});
+ EMACS_TIME timer_difference, idle_timer_difference;
+ int ripe, timer_ripe = 0, idle_timer_ripe = 0;
+
+ EMACS_SET_INVALID_TIME (timer_difference);
+ EMACS_SET_INVALID_TIME (idle_timer_difference);
- /* Skip past invalid timers and timers already handled. */
+ /* Set TIMER and TIMER_DIFFERENCE
+ based on the next ordinary timer.
+ TIMER_DIFFERENCE is the distance in time from NOW to when
+ this timer becomes ripe (negative if it's already ripe).
+ Skip past invalid timers and timers already handled. */
if (CONSP (timers))
{
timer = XCAR (timers);
- if (!VECTORP (timer) || ASIZE (timer) != 8)
+ if (! decode_timer (timer, &timer_time))
{
timers = XCDR (timers);
continue;
}
- vector = XVECTOR (timer)->contents;
- if (!INTEGERP (vector[1]) || !INTEGERP (vector[2])
- || !INTEGERP (vector[3])
- || ! NILP (vector[0]))
- {
- timers = XCDR (timers);
- continue;
- }
+ timer_ripe = EMACS_TIME_LE (timer_time, now);
+ if (timer_ripe)
+ EMACS_SUB_TIME (timer_difference, now, timer_time);
+ else
+ EMACS_SUB_TIME (timer_difference, timer_time, now);
}
+
+ /* Likewise for IDLE_TIMER and IDLE_TIMER_DIFFERENCE
+ based on the next idle timer. */
if (CONSP (idle_timers))
{
- timer = XCAR (idle_timers);
- if (!VECTORP (timer) || ASIZE (timer) != 8)
- {
- idle_timers = XCDR (idle_timers);
- continue;
- }
- vector = XVECTOR (timer)->contents;
-
- if (!INTEGERP (vector[1]) || !INTEGERP (vector[2])
- || !INTEGERP (vector[3])
- || ! NILP (vector[0]))
+ idle_timer = XCAR (idle_timers);
+ if (! decode_timer (idle_timer, &idle_timer_time))
{
idle_timers = XCDR (idle_timers);
continue;
}
- }
- /* Set TIMER, TIMER_TIME and TIMER_DIFFERENCE
- based on the next ordinary timer.
- TIMER_DIFFERENCE is the distance in time from NOW to when
- this timer becomes ripe (negative if it's already ripe). */
- if (CONSP (timers))
- {
- timer = XCAR (timers);
- vector = XVECTOR (timer)->contents;
- EMACS_SET_SECS (timer_time,
- (XINT (vector[1]) << 16) | (XINT (vector[2])));
- EMACS_SET_USECS (timer_time, XINT (vector[3]));
- EMACS_SUB_TIME (timer_difference, timer_time, now);
- }
-
- /* Set IDLE_TIMER, IDLE_TIMER_TIME and IDLE_TIMER_DIFFERENCE
- based on the next idle timer. */
- if (CONSP (idle_timers))
- {
- idle_timer = XCAR (idle_timers);
- vector = XVECTOR (idle_timer)->contents;
- EMACS_SET_SECS (idle_timer_time,
- (XINT (vector[1]) << 16) | (XINT (vector[2])));
- EMACS_SET_USECS (idle_timer_time, XINT (vector[3]));
- EMACS_SUB_TIME (idle_timer_difference, idle_timer_time, idleness_now);
+ idle_timer_ripe = EMACS_TIME_LE (idle_timer_time, idleness_now);
+ if (idle_timer_ripe)
+ EMACS_SUB_TIME (idle_timer_difference,
+ idleness_now, idle_timer_time);
+ else
+ EMACS_SUB_TIME (idle_timer_difference,
+ idle_timer_time, idleness_now);
}
/* Decide which timer is the next timer,
- and set CHOSEN_TIMER, VECTOR and DIFFERENCE accordingly.
+ and set CHOSEN_TIMER, DIFFERENCE, and RIPE accordingly.
Also step down the list where we found that timer. */
- if (CONSP (timers) && CONSP (idle_timers))
- {
- EMACS_TIME temp;
- EMACS_SUB_TIME (temp, timer_difference, idle_timer_difference);
- if (EMACS_TIME_NEG_P (temp))
- {
- chosen_timer = timer;
- timers = XCDR (timers);
- difference = timer_difference;
- }
- else
- {
- chosen_timer = idle_timer;
- idle_timers = XCDR (idle_timers);
- difference = idle_timer_difference;
- }
- }
- else if (CONSP (timers))
+ if (EMACS_TIME_VALID_P (timer_difference)
+ && (! EMACS_TIME_VALID_P (idle_timer_difference)
+ || idle_timer_ripe < timer_ripe
+ || (idle_timer_ripe == timer_ripe
+ && (timer_ripe
+ ? EMACS_TIME_LT (idle_timer_difference,
+ timer_difference)
+ : EMACS_TIME_LT (timer_difference,
+ idle_timer_difference)))))
{
chosen_timer = timer;
timers = XCDR (timers);
difference = timer_difference;
+ ripe = timer_ripe;
}
else
{
chosen_timer = idle_timer;
idle_timers = XCDR (idle_timers);
difference = idle_timer_difference;
+ ripe = idle_timer_ripe;
}
- vector = XVECTOR (chosen_timer)->contents;
/* If timer is ripe, run it if it hasn't been run. */
- if (EMACS_TIME_NEG_P (difference)
- || (EMACS_SECS (difference) == 0
- && EMACS_USECS (difference) == 0))
+ if (ripe)
{
+ vector = XVECTOR (chosen_timer)->contents;
if (NILP (vector[0]))
{
ptrdiff_t count = SPECPDL_INDEX ();
timer list for the time being.
Returns the time to wait until the next timer fires.
- If no timer is active, return -1.
+ If no timer is active, return an invalid value.
As long as any timer is ripe, we run it. */
{
nexttime = timer_check_2 ();
}
- while (EMACS_SECS (nexttime) == 0 && EMACS_USECS (nexttime) == 0);
+ while (EMACS_SECS (nexttime) == 0 && EMACS_NSECS (nexttime) == 0);
return nexttime;
}
DEFUN ("current-idle-time", Fcurrent_idle_time, Scurrent_idle_time, 0, 0, 0,
doc: /* Return the current length of Emacs idleness, or nil.
-The value when Emacs is idle is a list of three integers. The first has
-the most significant 16 bits of the seconds, while the second has the least
-significant 16 bits. The third integer gives the microsecond count.
+The value when Emacs is idle is a list of four integers (HIGH LOW USEC PSEC)
+in the same style as (current-time).
The value when Emacs is not idle is nil.
-The microsecond count is zero on systems that do not provide
-resolution finer than a second. */)
+NSEC is a multiple of the system clock resolution. */)
(void)
{
- if (! EMACS_TIME_NEG_P (timer_idleness_start_time))
+ if (EMACS_TIME_VALID_P (timer_idleness_start_time))
{
EMACS_TIME now, idleness_now;
EMACS_GET_TIME (now);
EMACS_SUB_TIME (idleness_now, now, timer_idleness_start_time);
- return list3 (make_number ((EMACS_SECS (idleness_now) >> 16) & 0xffff),
- make_number ((EMACS_SECS (idleness_now) >> 0) & 0xffff),
- make_number (EMACS_USECS (idleness_now)));
+ return make_lisp_time (idleness_now);
}
return Qnil;
modifier_list = Qnil;
for (i = 0; (1<<i) <= modifiers && i < NUM_MOD_NAMES; i++)
if (modifiers & (1<<i))
- modifier_list = Fcons (XVECTOR (modifier_symbols)->contents[i],
+ modifier_list = Fcons (AREF (modifier_symbols, i),
modifier_list);
return modifier_list;
*symbol_table = Fmake_vector (size, Qnil);
}
- value = XVECTOR (*symbol_table)->contents[symbol_num];
+ value = AREF (*symbol_table, symbol_num);
}
/* Have we already used this symbol before? */
if (CONSP (*symbol_table))
*symbol_table = Fcons (Fcons (symbol_int, value), *symbol_table);
else
- XVECTOR (*symbol_table)->contents[symbol_num] = value;
+ ASET (*symbol_table, symbol_num, value);
/* Fill in the cache entries for this symbol; this also
builds the Qevent_symbol_elements property, which the user
for (p = user_signals; p; p = p->next)
if (p->sig == sig)
{
- if (special_event_name &&
- strcmp (special_event_name, p->name) == 0)
+ if (special_event_name
+ && strcmp (special_event_name, p->name) == 0)
{
/* Enter the debugger in many ways. */
debug_on_next_call = 1;
int end = menu_bar_items_index;
for (i = 0; i < end; i += 4)
- if (EQ (XCAR (tail), XVECTOR (menu_bar_items_vector)->contents[i]))
+ if (EQ (XCAR (tail), AREF (menu_bar_items_vector, i)))
{
Lisp_Object tem0, tem1, tem2, tem3;
/* Move the item at index I to the end,
shifting all the others forward. */
- tem0 = XVECTOR (menu_bar_items_vector)->contents[i + 0];
- tem1 = XVECTOR (menu_bar_items_vector)->contents[i + 1];
- tem2 = XVECTOR (menu_bar_items_vector)->contents[i + 2];
- tem3 = XVECTOR (menu_bar_items_vector)->contents[i + 3];
+ tem0 = AREF (menu_bar_items_vector, i + 0);
+ tem1 = AREF (menu_bar_items_vector, i + 1);
+ tem2 = AREF (menu_bar_items_vector, i + 2);
+ tem3 = AREF (menu_bar_items_vector, i + 3);
if (end > i + 4)
- memmove (&XVECTOR (menu_bar_items_vector)->contents[i],
- &XVECTOR (menu_bar_items_vector)->contents[i + 4],
+ memmove (&AREF (menu_bar_items_vector, i),
+ &AREF (menu_bar_items_vector, i + 4),
(end - i - 4) * sizeof (Lisp_Object));
- XVECTOR (menu_bar_items_vector)->contents[end - 4] = tem0;
- XVECTOR (menu_bar_items_vector)->contents[end - 3] = tem1;
- XVECTOR (menu_bar_items_vector)->contents[end - 2] = tem2;
- XVECTOR (menu_bar_items_vector)->contents[end - 1] = tem3;
+ ASET (menu_bar_items_vector, end - 4, tem0);
+ ASET (menu_bar_items_vector, end - 3, tem1);
+ ASET (menu_bar_items_vector, end - 2, tem2);
+ ASET (menu_bar_items_vector, end - 1, tem3);
break;
}
}
menu_bar_items_vector =
larger_vector (menu_bar_items_vector, 4, -1);
/* Add this item. */
- XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
- XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
- XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
- XVECTOR (menu_bar_items_vector)->contents[i++] = Qnil;
+ ASET (menu_bar_items_vector, i, Qnil); i++;
+ ASET (menu_bar_items_vector, i, Qnil); i++;
+ ASET (menu_bar_items_vector, i, Qnil); i++;
+ ASET (menu_bar_items_vector, i, Qnil); i++;
menu_bar_items_index = i;
}
discard any previously made menu bar item. */
for (i = 0; i < menu_bar_items_index; i += 4)
- if (EQ (key, XVECTOR (menu_bar_items_vector)->contents[i]))
+ if (EQ (key, AREF (menu_bar_items_vector, i)))
{
if (menu_bar_items_index > i + 4)
- memmove (&XVECTOR (menu_bar_items_vector)->contents[i],
- &XVECTOR (menu_bar_items_vector)->contents[i + 4],
+ memmove (&AREF (menu_bar_items_vector, i),
+ &AREF (menu_bar_items_vector, i + 4),
(menu_bar_items_index - i - 4) * sizeof (Lisp_Object));
menu_bar_items_index -= 4;
}
if (!i)
return;
- item = XVECTOR (item_properties)->contents[ITEM_PROPERTY_DEF];
+ item = AREF (item_properties, ITEM_PROPERTY_DEF);
/* Find any existing item for this KEY. */
for (i = 0; i < menu_bar_items_index; i += 4)
- if (EQ (key, XVECTOR (menu_bar_items_vector)->contents[i]))
+ if (EQ (key, AREF (menu_bar_items_vector, i)))
break;
/* If we did not find this KEY, add it at the end. */
if (i + 4 > ASIZE (menu_bar_items_vector))
menu_bar_items_vector = larger_vector (menu_bar_items_vector, 4, -1);
/* Add this item. */
- XVECTOR (menu_bar_items_vector)->contents[i++] = key;
- XVECTOR (menu_bar_items_vector)->contents[i++]
- = XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME];
- XVECTOR (menu_bar_items_vector)->contents[i++] = Fcons (item, Qnil);
- XVECTOR (menu_bar_items_vector)->contents[i++] = make_number (0);
+ ASET (menu_bar_items_vector, i, key); i++;
+ ASET (menu_bar_items_vector, i,
+ AREF (item_properties, ITEM_PROPERTY_NAME)); i++;
+ ASET (menu_bar_items_vector, i, Fcons (item, Qnil)); i++;
+ ASET (menu_bar_items_vector, i, make_number (0)); i++;
menu_bar_items_index = i;
}
/* We did find an item for this KEY. Add ITEM to its list of maps. */
else
{
Lisp_Object old;
- old = XVECTOR (menu_bar_items_vector)->contents[i + 2];
+ old = AREF (menu_bar_items_vector, i + 2);
/* If the new and the old items are not both keymaps,
the lookup will only find `item'. */
item = Fcons (item, KEYMAPP (item) && KEYMAPP (XCAR (old)) ? old : Qnil);
- XVECTOR (menu_bar_items_vector)->contents[i + 2] = item;
+ ASET (menu_bar_items_vector, i + 2, item);
}
}
\f
parse_tool_bar_item (Lisp_Object key, Lisp_Object item)
{
/* Access slot with index IDX of vector tool_bar_item_properties. */
-#define PROP(IDX) XVECTOR (tool_bar_item_properties)->contents[IDX]
+#define PROP(IDX) AREF (tool_bar_item_properties, (IDX))
Lisp_Object filter = Qnil;
Lisp_Object caption;
/* Look at the next element of the map. */
if (idx >= 0)
- elt = XVECTOR (vector)->contents[idx];
+ elt = AREF (vector, idx);
else
elt = Fcar_safe (rest);
Lisp_Object upcased_event, downcased_event;
Lisp_Object desc = Qnil;
Lisp_Object s
- = XVECTOR (item_properties)->contents[ITEM_PROPERTY_NAME];
+ = AREF (item_properties, ITEM_PROPERTY_NAME);
upcased_event = Fupcase (event);
downcased_event = Fdowncase (event);
s = concat2 (s, tem);
#endif
tem
- = XVECTOR (item_properties)->contents[ITEM_PROPERTY_TYPE];
+ = AREF (item_properties, ITEM_PROPERTY_TYPE);
if (EQ (tem, QCradio) || EQ (tem, QCtoggle))
{
/* Insert button prefix. */
Lisp_Object selected
- = XVECTOR (item_properties)->contents[ITEM_PROPERTY_SELECTED];
+ = AREF (item_properties, ITEM_PROPERTY_SELECTED);
if (EQ (tem, QCradio))
tem = build_string (NILP (selected) ? "(*) " : "( ) ");
else
&& current_buffer != starting_buffer)
{
GROW_RAW_KEYBUF;
- XVECTOR (raw_keybuf)->contents[raw_keybuf_count++] = key;
+ ASET (raw_keybuf, raw_keybuf_count, key);
+ raw_keybuf_count++;
keybuf[t++] = key;
mock_input = t;
Vquit_flag = Qnil;
&& BUFFERP (XWINDOW (window)->buffer)
&& XBUFFER (XWINDOW (window)->buffer) != current_buffer)
{
- XVECTOR (raw_keybuf)->contents[raw_keybuf_count++] = key;
+ ASET (raw_keybuf, raw_keybuf_count, key);
+ raw_keybuf_count++;
keybuf[t] = key;
mock_input = t + 1;
if (NILP (keep_record))
{
for (i = 0; i < ASIZE (recent_keys); ++i)
- XVECTOR (recent_keys)->contents[i] = Qnil;
+ ASET (recent_keys, i, Qnil);
total_keys = 0;
recent_keys_index = 0;
}
}
\f
void
-set_waiting_for_input (struct timeval *time_to_clear)
+set_waiting_for_input (EMACS_TIME *time_to_clear)
{
input_available_clear_time = time_to_clear;
quit_char = Ctl ('g');
Vunread_command_events = Qnil;
unread_command_char = -1;
- EMACS_SET_SECS_USECS (timer_idleness_start_time, -1, -1);
+ EMACS_SET_INVALID_TIME (timer_idleness_start_time);
total_keys = 0;
recent_keys_index = 0;
kbd_fetch_ptr = kbd_buffer;
modifier_symbols = Fmake_vector (make_number (len), Qnil);
for (i = 0; i < len; i++)
if (modifier_names[i])
- XVECTOR (modifier_symbols)->contents[i] = intern_c_string (modifier_names[i]);
+ ASET (modifier_symbols, i, intern_c_string (modifier_names[i]));
staticpro (&modifier_symbols);
}