CHECK_ALLOCATED_AND_LIVE (live_cons_p);
CONS_MARK (ptr);
/* If the cdr is nil, avoid recursion for the car. */
- if (EQ (ptr->u.s.u.cdr, Qnil))
+ if (NILP (ptr->u.s.u.cdr))
{
obj = ptr->u.s.car;
cdr_count = 0;
carelt = XCAR (elt);
/* If it is (if X Y), look at Y. */
if (EQ (carelt, Qif)
- && EQ (Fnthcdr (make_number (3), elt), Qnil))
+ && NILP (Fnthcdr (make_number (3), elt)))
elt = Fnth (make_number (2), elt);
/* If it is (when ... Y), look at Y. */
else if (EQ (carelt, Qwhen))
Lisp_Object val;
CHECK_CHAR_TABLE (char_table);
- if (EQ (range, Qnil))
+ if (NILP (range))
val = XCHAR_TABLE (char_table)->defalt;
else if (CHARACTERP (range))
val = CHAR_TABLE_REF (char_table, XFASTINT (range));
for (i = 0; i < chartab_size[0]; i++)
set_char_table_contents (char_table, i, value);
}
- else if (EQ (range, Qnil))
+ else if (NILP (range))
set_char_table_defalt (char_table, value);
else if (CHARACTERP (range))
char_table_set (char_table, XINT (range), value);
`dbus-send-signal', into corresponding C values appended as
arguments to a D-Bus message. */
#define XD_OBJECT_TO_DBUS_TYPE(object) \
- ((EQ (object, Qt) || EQ (object, Qnil)) ? DBUS_TYPE_BOOLEAN \
+ ((EQ (object, Qt) || NILP (object)) ? DBUS_TYPE_BOOLEAN \
: (NATNUMP (object)) ? DBUS_TYPE_UINT32 \
: (INTEGERP (object)) ? DBUS_TYPE_INT32 \
: (FLOATP (object)) ? DBUS_TYPE_DOUBLE \
break;
case DBUS_TYPE_BOOLEAN:
- if (!EQ (object, Qt) && !EQ (object, Qnil))
+ if (!EQ (object, Qt) && !NILP (object))
wrong_type_argument (intern ("booleanp"), object);
sprintf (signature, "%c", dtype);
break;
endpwent ();
#endif
- if (EQ (users, Qnil))
+ if (NILP (users))
/* At least current user is always known. */
users = list1 (Vuser_real_login_name);
return users;
spare the user annoying messages. */
&& XFASTINT (BVAR (b, save_length)) > 5000
/* These messages are frequent and annoying for `*mail*'. */
- && !EQ (BVAR (b, filename), Qnil)
+ && !NILP (BVAR (b, filename))
&& NILP (no_message))
{
/* It has shrunk too much; turn off auto-saving here. */
val = make_uninit_string (result_len);
/* In `append', if all but last arg are nil, return last arg. */
- if (target_type == Lisp_Cons && EQ (val, Qnil))
+ if (target_type == Lisp_Cons && NILP (val))
return last_tail;
/* Copy the contents of the args into the result. */
/* Return the value of frame parameter PROP in frame FRAME. */
Lisp_Object
-get_frame_param (register struct frame *frame, Lisp_Object prop)
+get_frame_param (struct frame *frame, Lisp_Object prop)
{
- register Lisp_Object tem;
-
- tem = Fassq (prop, frame->param_alist);
- if (EQ (tem, Qnil))
- return tem;
- return Fcdr (tem);
+ return Fcdr (Fassq (prop, frame->param_alist));
}
|| (CONSP (frame_inhibit_implied_resize)
&& !NILP (Fmemq (parameter, frame_inhibit_implied_resize)))
|| (horizontal
- && !EQ (fullscreen, Qnil) && !EQ (fullscreen, Qfullheight))
+ && !NILP (fullscreen) && !EQ (fullscreen, Qfullheight))
|| (!horizontal
- && !EQ (fullscreen, Qnil) && !EQ (fullscreen, Qfullwidth))
+ && !NILP (fullscreen) && !EQ (fullscreen, Qfullwidth))
|| FRAME_TERMCAP_P (f) || FRAME_MSDOS_P (f))
: ((horizontal && f->inhibit_horizontal_resize)
|| (!horizontal && f->inhibit_vertical_resize)));
void
store_in_alist (Lisp_Object *alistptr, Lisp_Object prop, Lisp_Object val)
{
- register Lisp_Object tem;
-
- tem = Fassq (prop, *alistptr);
- if (EQ (tem, Qnil))
+ Lisp_Object tem = Fassq (prop, *alistptr);
+ if (NILP (tem))
*alistptr = Fcons (Fcons (prop, val), *alistptr);
else
Fsetcdr (tem, val);
/* Update the frame parameter alist. */
old_alist_elt = Fassq (prop, f->param_alist);
- if (EQ (old_alist_elt, Qnil))
+ if (NILP (old_alist_elt))
fset_param_alist (f, Fcons (Fcons (prop, val), f->param_alist));
else
Fsetcdr (old_alist_elt, val);
void
x_set_autoraise (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
- f->auto_raise = !EQ (Qnil, arg);
+ f->auto_raise = !NILP (arg);
}
void
x_set_autolower (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
{
- f->auto_lower = !EQ (Qnil, arg);
+ f->auto_lower = !NILP (arg);
}
void
/* If it wasn't specified in ALIST or the Lisp-level defaults,
look in the X resources. */
- if (EQ (tem, Qnil))
+ if (NILP (tem))
{
if (attribute && dpyinfo)
{
which is then usually a filename. */)
(Lisp_Object filter)
{
- if (!(EQ (filter, Qnil) || FRAMEP (filter)))
+ if (! (NILP (filter) || FRAMEP (filter)))
clear_image_caches (filter);
else
clear_image_cache (decode_window_system_frame (filter), Qt);
}
/* i0 has something i1 doesn't. */
- if (EQ (i1_val, Qnil))
+ if (NILP (i1_val))
return false;
/* i0 and i1 both have sym, but it has different values in each. */
/* True if this is a default interval, which is the same as being null
or having no properties. */
-#define DEFAULT_INTERVAL_P(i) (!i || EQ ((i)->plist, Qnil))
+#define DEFAULT_INTERVAL_P(i) (!i || NILP ((i)->plist))
/* Test what type of parent we have. Three possibilities: another
interval, a buffer or string object, or NULL. */
return subtree;
/* If we've been to this node before, don't explore it again. */
- if (!EQ (Qnil, Fmemq (subtree, subst->seen)))
+ if (!NILP (Fmemq (subtree, subst->seen)))
return subtree;
/* If this node can be the entry point to a cycle, remember that
session if we unintern them, as well as even more ways to use
`setq' or `fset' or whatnot to make the Emacs session
unusable. Let's not go down this silly road. --Stef */
- /* if (EQ (tem, Qnil) || EQ (tem, Qt))
+ /* if (NILP (tem) || EQ (tem, Qt))
error ("Attempt to unintern t or nil"); */
XSYMBOL (tem)->u.s.interned = SYMBOL_UNINTERNED;
i = start;
while (i < end)
{
- if (EQ (AREF (menu_items, i), Qnil))
+ if (NILP (AREF (menu_items, i)))
{
submenu_stack[submenu_depth++] = save_wv;
save_wv = prev_wv;
while (i < menu_bar_items_used)
{
- if (EQ (AREF (vector, i), Qnil))
+ if (NILP (AREF (vector, i)))
{
subprefix_stack[submenu_depth++] = prefix;
prefix = entry;
while (i < menu_items_used)
{
- if (EQ (AREF (menu_items, i), Qnil))
+ if (NILP (AREF (menu_items, i)))
{
subprefix_stack[submenu_depth++] = prefix;
prefix = entry;
if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt))
return;
}
- else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil))
+ else if (!STRINGP (oldval) && NILP (oldval) == NILP (arg))
return;
fset_icon_name (f, arg);
window_prompting = x_figure_window_size (f, parms, true, &x_width, &x_height);
tem = x_get_arg (dpyinfo, parms, Qunsplittable, 0, 0, RES_TYPE_BOOLEAN);
- f->no_split = minibuffer_only || (!EQ (tem, Qunbound) && !EQ (tem, Qnil));
+ f->no_split = minibuffer_only || (!EQ (tem, Qunbound) && !NILP (tem));
/* NOTE: on other terms, this is done in set_mouse_color, however this
was not getting called under Nextstep. */
i = 0;
while (i < menu_items_used)
{
- if (EQ (AREF (menu_items, i), Qnil))
+ if (NILP (AREF (menu_items, i)))
{
submenu_stack[submenu_depth++] = save_wv;
save_wv = prev_wv;
static void
ns_string_to_pasteboard_internal (id pb, Lisp_Object str, NSString *gtype)
{
- if (EQ (str, Qnil))
+ if (NILP (str))
{
[pb declareTypes: [NSArray array] owner: nil];
}
return Qnil;
CHECK_SYMBOL (selection);
- if (EQ (selection, Qnil)) selection = QPRIMARY;
+ if (NILP (selection)) selection = QPRIMARY;
if (EQ (selection, Qt)) selection = QSECONDARY;
pb = ns_symbol_to_pb (selection);
if (pb == nil) return Qnil;
{
check_window_system (NULL);
CHECK_SYMBOL (selection);
- if (EQ (selection, Qnil)) selection = QPRIMARY;
+ if (NILP (selection)) selection = QPRIMARY;
if (EQ (selection, Qt)) selection = QSECONDARY;
return ns_get_pb_change_count (selection)
== ns_get_our_change_count_for (selection)
/* Can't wait for a process that is dedicated to a different
thread. */
- if (!EQ (proc->thread, Qnil) && !EQ (proc->thread, Fcurrent_thread ()))
+ if (!NILP (proc->thread) && !EQ (proc->thread, Fcurrent_thread ()))
{
Lisp_Object proc_thread_name = XTHREAD (proc->thread)->name;
struct timespec now = invalid_timespec ();
eassert (wait_proc == NULL
- || EQ (wait_proc->thread, Qnil)
+ || NILP (wait_proc->thread)
|| XTHREAD (wait_proc->thread) == current_thread);
FD_ZERO (&Available);
store_terminal_param (struct terminal *t, Lisp_Object parameter, Lisp_Object value)
{
Lisp_Object old_alist_elt = Fassq (parameter, t->param_alist);
- if (EQ (old_alist_elt, Qnil))
+ if (NILP (old_alist_elt))
{
tset_param_alist (t, Fcons (Fcons (parameter, value), t->param_alist));
return Qnil;
if (!inhibit_modification_hooks)
{
hooks = Fnreverse (hooks);
- while (! EQ (hooks, Qnil))
+ while (! NILP (hooks))
{
call_mod_hooks (Fcar (hooks), make_number (start),
make_number (end));
eassert (IT_CHARPOS (*it) >= BEGV);
eassert (NILP (it->string) && !it->s);
eassert (!it->bidi_p
- || (EQ (it->bidi_it.string.lstring, Qnil)
+ || (NILP (it->bidi_it.string.lstring)
&& it->bidi_it.string.s == NULL));
/* With bidi reordering, the character to display might not be the
if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
if ((SYMBOLP (value)
&& !EQ (value, Qt)
- && !EQ (value, Qnil))
+ && !NILP (value))
/* Overline color. */
|| (STRINGP (value)
&& SCHARS (value) == 0))
if (!UNSPECIFIEDP (value) && !IGNORE_DEFFACE_P (value))
if ((SYMBOLP (value)
&& !EQ (value, Qt)
- && !EQ (value, Qnil))
+ && !NILP (value))
/* Strike-through color. */
|| (STRINGP (value)
&& SCHARS (value) == 0))
if (STRINGP (oldval) && EQ (Fstring_equal (oldval, arg), Qt))
return;
}
- else if (!STRINGP (oldval) && EQ (oldval, Qnil) == EQ (arg, Qnil))
+ else if (!STRINGP (oldval) && NILP (oldval) == NILP (arg))
return;
block_input ();
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- XSynchronize (dpyinfo->display, !EQ (on, Qnil));
+ XSynchronize (dpyinfo->display, !NILP (on));
return Qnil;
}
i = 0;
while (i < menu_items_used)
{
- if (EQ (AREF (menu_items, i), Qnil))
+ if (NILP (AREF (menu_items, i)))
{
submenu_stack[submenu_depth++] = save_wv;
save_wv = prev_wv;
i = 0;
while (i < menu_items_used)
{
- if (EQ (AREF (menu_items, i), Qnil))
+ if (NILP (AREF (menu_items, i)))
{
subprefix_stack[submenu_depth++] = prefix;
prefix = entry;
struct frame *f = frame_for_x_selection (terminal);
CHECK_SYMBOL (selection);
- if (EQ (selection, Qnil)) selection = QPRIMARY;
+ if (NILP (selection)) selection = QPRIMARY;
if (EQ (selection, Qt)) selection = QSECONDARY;
if (f && !NILP (LOCAL_SELECTION (selection, FRAME_DISPLAY_INFO (f))))
struct x_display_info *dpyinfo;
CHECK_SYMBOL (selection);
- if (EQ (selection, Qnil)) selection = QPRIMARY;
+ if (NILP (selection)) selection = QPRIMARY;
if (EQ (selection, Qt)) selection = QSECONDARY;
if (!f)
ret = Fxwidget_view_lookup (xwidget, window);
- return EQ (ret, Qnil) ? NULL : XXWIDGET_VIEW (ret);
+ return NILP (ret) ? NULL : XXWIDGET_VIEW (ret);
}
struct xwidget *