GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
Lisp_Object list;
{
register Lisp_Object tail;
- for (tail = list; !NILP (tail); tail = XCDR (tail))
+ for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
CHECK_LIST_CONS (tail, list);
if (!FLOATP (elt))
return Fmemq (elt, list);
- for (tail = list; !NILP (tail); tail = XCDR (tail))
+ for (tail = list; CONSP (tail); tail = XCDR (tail))
{
register Lisp_Object tem;
CHECK_LIST_CONS (tail, list);
{
Lisp_Object tail, prev;
- for (tail = seq, prev = Qnil; !NILP (tail); tail = XCDR (tail))
+ for (tail = seq, prev = Qnil; CONSP (tail); tail = XCDR (tail))
{
CHECK_LIST_CONS (tail, seq);
prev = tail;
QUIT;
}
- newcell = Fcons (prop, Fcons (val, Qnil));
+ newcell = Fcons (prop, Fcons (val, NILP (prev) ? plist : XCDR (XCDR (prev))));
if (NILP (prev))
return newcell;
else
{
CHECK_CHAR_TABLE (parent);
- for (temp = parent; !NILP (temp); temp = XCHAR_TABLE (temp)->parent)
+ for (temp = parent; CHAR_TABLE_P (temp);
+ temp = XCHAR_TABLE (temp)->parent)
if (EQ (temp, char_table))
error ("Attempt to make a chartable be its own parent");
}
{
#ifdef HAVE_MENUS
- if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
+ if (FRAME_WINDOW_P (SELECTED_FRAME ())
+ && (NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
&& use_dialog_box
&& have_menus_p ())
{
Fraise_frame (mini_frame);
}
+ temporarily_switch_to_single_kboard (SELECTED_FRAME ());
obj = read_filtered_event (1, 0, 0, 0, Qnil);
cursor_in_echo_area = 0;
/* If we need to quit, quit with cursor_in_echo_area = 0. */
CHECK_STRING (prompt);
#ifdef HAVE_MENUS
- if ((NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
+ if (FRAME_WINDOW_P (SELECTED_FRAME ())
+ && (NILP (last_nonmenu_event) || CONSP (last_nonmenu_event))
&& use_dialog_box
&& have_menus_p ())
{
h->weak = weak;
h->rehash_threshold = rehash_threshold;
h->rehash_size = rehash_size;
- h->count = make_number (0);
+ h->count = 0;
h->key_and_value = Fmake_vector (make_number (2 * sz), Qnil);
h->hash = Fmake_vector (size, Qnil);
h->next = Fmake_vector (size, Qnil);
/* Increment count after resizing because resizing may fail. */
maybe_resize_hash_table (h);
- h->count = make_number (XFASTINT (h->count) + 1);
+ h->count++;
/* Store key/value in the key_and_value vector. */
i = XFASTINT (h->next_free);
HASH_KEY (h, i) = HASH_VALUE (h, i) = HASH_HASH (h, i) = Qnil;
HASH_NEXT (h, i) = h->next_free;
h->next_free = make_number (i);
- h->count = make_number (XFASTINT (h->count) - 1);
- xassert (XINT (h->count) >= 0);
+ h->count--;
+ xassert (h->count >= 0);
break;
}
else
hash_clear (h)
struct Lisp_Hash_Table *h;
{
- if (XFASTINT (h->count) > 0)
+ if (h->count > 0)
{
int i, size = HASH_TABLE_SIZE (h);
AREF (h->index, i) = Qnil;
h->next_free = make_number (0);
- h->count = make_number (0);
+ h->count = 0;
}
}
HASH_KEY (h, i) = HASH_VALUE (h, i) = Qnil;
HASH_HASH (h, i) = Qnil;
- h->count = make_number (XFASTINT (h->count) - 1);
+ h->count--;
}
else
{
if (h->size & ARRAY_MARK_FLAG)
{
/* TABLE is marked as used. Sweep its contents. */
- if (XFASTINT (h->count) > 0)
+ if (h->count > 0)
sweep_weak_table (h, 1);
/* Add table to the list of used weak hash tables. */
(table)
Lisp_Object table;
{
- return check_hash_table (table)->count;
+ return make_number (check_hash_table (table)->count);
}