summaryrefslogtreecommitdiff
path: root/src/nsselect.m
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-07-19 22:03:34 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2018-07-19 22:05:27 -0700
commitfb24ce37d1bc258cfc3884d9828aa0602fa06e1d (patch)
tree2c0669e13f1324d78b9a0e2de496fc366016ef12 /src/nsselect.m
parent96d77f9eb882b68e994e187ed9c2156a23e3279d (diff)
downloademacs-fb24ce37d1bc258cfc3884d9828aa0602fa06e1d.tar.gz
Prefer NILP (x) to EQ (x, Qnil)
This simplifies the code a bit, and also simplifies some potential future changes slightly (e.g., altering eq vs eql). * src/alloc.c (mark_object): * src/callint.c (fix_command): * src/chartab.c (Fchar_table_range, Fset_char_table_range): * src/dbusbind.c (XD_OBJECT_TO_DBUS_TYPE, xd_signature): * src/dired.c (Fsystem_users): * src/fileio.c (Fdo_auto_save): * src/fns.c (concat): * src/frame.c (get_frame_param, frame_inhibit_resize) (store_in_alist, store_frame_param, x_set_autoraise) (x_set_autolower, x_get_arg): * src/image.c (Fclear_image_cache): * src/intervals.c (intervals_equal): * src/intervals.h (DEFAULT_INTERVAL_P): * src/lread.c (substitute_object_recurse): * src/menu.c (digest_single_submenu) (find_and_call_menu_selection) (find_and_return_menu_selection): * src/nsfns.m (x_set_icon_name, Fx_create_frame): * src/nsmenu.m (ns_menu_show): * src/nsselect.m (ns_string_to_pasteboard_internal) (Fns_selection_exists_p, Fns_selection_owner_p): * src/process.c (Faccept_process_output) (wait_reading_process_output): * src/terminal.c (store_terminal_param): * src/textprop.c (verify_interval_modification): * src/xdisp.c (next_element_from_buffer): * src/xfaces.c (Finternal_set_lisp_face_attribute): * src/xfns.c (x_set_icon_type, Fx_synchronize): * src/xmenu.c (x_menu_show): * src/xselect.c (Fx_selection_owner_p) (Fx_selection_exists_p): * src/xwidget.c (xwidget_view_lookup): Prefer NILP (x) to EQ (x, Qnil).
Diffstat (limited to 'src/nsselect.m')
-rw-r--r--src/nsselect.m6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nsselect.m b/src/nsselect.m
index c72f179ab38..e71a20ed92e 100644
--- a/src/nsselect.m
+++ b/src/nsselect.m
@@ -164,7 +164,7 @@ ns_get_our_change_count_for (Lisp_Object selection)
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];
}
@@ -399,7 +399,7 @@ these literal upper-case names.) The symbol nil is the same as
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;
@@ -421,7 +421,7 @@ and t is the same as `SECONDARY'. */)
{
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)