if (!NILP (Vquit_flag))
{
Vquit_flag = Qnil;
- Vunread_command_events = Fcons (make_number (quit_char), Qnil);
+ Vunread_command_events = list1 (make_number (quit_char));
}
}
emacs_abort ();
}
if (!CONSP (last))
- kset_kbd_queue (kb, Fcons (c, Qnil));
+ kset_kbd_queue (kb, list1 (c));
else
- XSETCDR (last, Fcons (c, Qnil));
+ XSETCDR (last, list1 (c));
kb->kbd_queue_has_data = 1;
c = Qnil;
if (single_kboard)
emacs_abort ();
}
if (!CONSP (last))
- kset_kbd_queue (kb, Fcons (c, Qnil));
+ kset_kbd_queue (kb, list1 (c));
else
- XSETCDR (last, Fcons (c, Qnil));
+ XSETCDR (last, list1 (c));
kb->kbd_queue_has_data = 1;
current_kboard = kb;
/* This is going to exit from read_char
if (EQ (posn, Qmenu_bar) || EQ (posn, Qtool_bar))
{
/* Change menu-bar to (menu-bar) as the event "position". */
- POSN_SET_POSN (EVENT_START (c), Fcons (posn, Qnil));
+ POSN_SET_POSN (EVENT_START (c), list1 (posn));
also_record = c;
Vunread_command_events = Fcons (c, Vunread_command_events);
if (single_kboard && kb != current_kboard)
{
kset_kbd_queue
- (kb, Fcons (make_lispy_switch_frame (event->frame_or_window),
- Fcons (make_number (c), Qnil)));
+ (kb, list2 (make_lispy_switch_frame (event->frame_or_window),
+ make_number (c)));
kb->kbd_queue_has_data = 1;
for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++)
{
else if (event->kind == NS_TEXT_EVENT)
{
if (event->code == KEY_NS_PUT_WORKING_TEXT)
- obj = Fcons (intern ("ns-put-working-text"), Qnil);
+ obj = list1 (intern ("ns-put-working-text"));
else
- obj = Fcons (intern ("ns-unput-working-text"), Qnil);
+ obj = list1 (intern ("ns-unput-working-text"));
kbd_fetch_ptr = event + 1;
if (used_mouse_menu)
*used_mouse_menu = 1;
else if (event->kind == DELETE_WINDOW_EVENT)
{
/* Make an event (delete-frame (FRAME)). */
- obj = Fcons (event->frame_or_window, Qnil);
- obj = Fcons (Qdelete_frame, Fcons (obj, Qnil));
+ obj = list2 (Qdelete_frame, list1 (event->frame_or_window));
kbd_fetch_ptr = event + 1;
}
#endif
else if (event->kind == ICONIFY_EVENT)
{
/* Make an event (iconify-frame (FRAME)). */
- obj = Fcons (event->frame_or_window, Qnil);
- obj = Fcons (Qiconify_frame, Fcons (obj, Qnil));
+ obj = list2 (Qiconify_frame, list1 (event->frame_or_window));
kbd_fetch_ptr = event + 1;
}
else if (event->kind == DEICONIFY_EVENT)
{
/* Make an event (make-frame-visible (FRAME)). */
- obj = Fcons (event->frame_or_window, Qnil);
- obj = Fcons (Qmake_frame_visible, Fcons (obj, Qnil));
+ obj = list2 (Qmake_frame_visible, list1 (event->frame_or_window));
kbd_fetch_ptr = event + 1;
}
#endif
#ifdef HAVE_NTGUI
else if (event->kind == LANGUAGE_CHANGE_EVENT)
{
- /* 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)));
+ /* Make an event (language-change FRAME CODEPAGE LANGUAGE-ID). */
+ obj = list4 (Qlanguage_change,
+ event->frame_or_window,
+ make_number (event->code),
+ make_number (event->modifiers));
kbd_fetch_ptr = event + 1;
}
#endif
{
#ifdef HAVE_W32NOTIFY
/* Make an event (file-notify (DESCRIPTOR ACTION FILE) CALLBACK). */
- obj = Fcons (Qfile_notify,
- list2 (list3 (make_number (event->code),
- XCAR (event->arg),
- XCDR (event->arg)),
- event->frame_or_window));
+ obj = list3 (Qfile_notify,
+ list3 (make_number (event->code),
+ XCAR (event->arg),
+ XCDR (event->arg)),
+ event->frame_or_window);
#else
obj = make_lispy_event (event);
#endif
#endif /* USE_FILE_NOTIFY */
else if (event->kind == SAVE_SESSION_EVENT)
{
- obj = Fcons (Qsave_session, Fcons (event->arg, Qnil));
+ obj = list2 (Qsave_session, event->arg);
kbd_fetch_ptr = event + 1;
}
/* Just discard these, by returning nil.
/* ELisp manual 2.4b says (x y) are window relative but
code says they are frame-relative. */
- position
- = Fcons (event->frame_or_window,
- Fcons (Qmenu_bar,
- Fcons (Fcons (event->x, event->y),
- Fcons (make_number (event->timestamp),
- Qnil))));
-
- return Fcons (item, Fcons (position, Qnil));
+ position = list4 (event->frame_or_window,
+ Qmenu_bar,
+ Fcons (event->x, event->y),
+ make_number (event->timestamp));
+
+ return list2 (item, position);
}
#endif /* not USE_X_TOOLKIT && not USE_GTK && not HAVE_NS */
portion_whole = Fcons (event->x, event->y);
part = *scroll_bar_parts[(int) event->part];
- position
- = Fcons (window,
- Fcons (Qvertical_scroll_bar,
- Fcons (portion_whole,
- Fcons (make_number (event->timestamp),
- Fcons (part, Qnil)))));
+ position = list5 (window, Qvertical_scroll_bar,
+ portion_whole, make_number (event->timestamp),
+ part);
}
#endif /* not USE_TOOLKIT_SCROLL_BARS */
&mouse_syms,
ASIZE (mouse_syms));
if (event->modifiers & drag_modifier)
- return Fcons (head,
- Fcons (start_pos,
- Fcons (position,
- Qnil)));
+ return list3 (head, start_pos, position);
else if (event->modifiers & (double_modifier | triple_modifier))
- return Fcons (head,
- Fcons (position,
- Fcons (make_number (double_click_count),
- Qnil)));
+ return list3 (head, position, make_number (double_click_count));
else
- return Fcons (head,
- Fcons (position,
- Qnil));
+ return list2 (head, position);
}
}
}
if (event->modifiers & (double_modifier | triple_modifier))
- return Fcons (head,
- Fcons (position,
- Fcons (make_number (double_click_count),
- Qnil)));
+ return list3 (head, position, make_number (double_click_count));
else
- return Fcons (head,
- Fcons (position,
- Qnil));
+ return list2 (head, position);
}
portion_whole = Fcons (event->x, event->y);
part = *scroll_bar_parts[(int) event->part];
- position
- = Fcons (window,
- Fcons (Qvertical_scroll_bar,
- Fcons (portion_whole,
- Fcons (make_number (event->timestamp),
- Fcons (part, Qnil)))));
+ position = list5 (window, Qvertical_scroll_bar, portion_whole,
+ make_number (event->timestamp), part);
/* Always treat scroll bar events as clicks. */
event->modifiers |= click_modifier;
Vlispy_mouse_stem,
NULL, &mouse_syms,
ASIZE (mouse_syms));
- return Fcons (head, Fcons (position, Qnil));
+ return list2 (head, position);
}
#endif /* USE_TOOLKIT_SCROLL_BARS */
Qdrag_n_drop, Qnil,
lispy_drag_n_drop_names,
&drag_n_drop_syms, 1);
- return Fcons (head,
- Fcons (position,
- Fcons (files,
- Qnil)));
+ return list3 (head, position, files);
}
#if defined (USE_X_TOOLKIT) || defined (HAVE_NTGUI) \
/* This is the prefix key. We translate this to
`(menu_bar)' because the code in keyboard.c for menu
events, which we use, relies on this. */
- return Fcons (Qmenu_bar, Qnil);
+ return list1 (Qmenu_bar);
return event->arg;
#endif
case SELECT_WINDOW_EVENT:
/* Make an event (select-window (WINDOW)). */
- return Fcons (Qselect_window,
- Fcons (Fcons (event->frame_or_window, Qnil),
- Qnil));
+ return list2 (Qselect_window, list1 (event->frame_or_window));
case TOOL_BAR_EVENT:
if (EQ (event->arg, event->frame_or_window))
/* This is the prefix key. We translate this to
`(tool_bar)' because the code in keyboard.c for tool bar
events, which we use, relies on this. */
- return Fcons (Qtool_bar, Qnil);
+ return list1 (Qtool_bar);
else if (SYMBOLP (event->arg))
return apply_modifiers (event->modifiers, event->arg);
return event->arg;
#endif /* defined HAVE_GFILENOTIFY || defined HAVE_INOTIFY */
case CONFIG_CHANGED_EVENT:
- return Fcons (Qconfig_changed_event,
- Fcons (event->arg,
- Fcons (event->frame_or_window, Qnil)));
+ return list3 (Qconfig_changed_event,
+ event->arg, event->frame_or_window);
#ifdef HAVE_GPM
case GPM_CLICK_EVENT:
{
ASIZE (mouse_syms));
if (event->modifiers & drag_modifier)
- return Fcons (head,
- Fcons (start_pos,
- Fcons (position,
- Qnil)));
+ return list3 (head, start_pos, position);
else if (event->modifiers & double_modifier)
- return Fcons (head,
- Fcons (position,
- Fcons (make_number (2),
- Qnil)));
+ return list3 (head, position, make_number (2));
else if (event->modifiers & triple_modifier)
- return Fcons (head,
- Fcons (position,
- Fcons (make_number (3),
- Qnil)));
+ return list3 (head, position, make_number (3));
else
- return Fcons (head,
- Fcons (position,
- Qnil));
+ return list2 (head, position);
}
#endif /* HAVE_GPM */
Lisp_Object part_sym;
part_sym = *scroll_bar_parts[(int) part];
- return Fcons (Qscroll_bar_movement,
- Fcons (list5 (bar_window,
- Qvertical_scroll_bar,
- Fcons (x, y),
- make_number (t),
- part_sym),
- Qnil));
+ return list2 (Qscroll_bar_movement,
+ list5 (bar_window,
+ Qvertical_scroll_bar,
+ Fcons (x, y),
+ make_number (t),
+ part_sym));
}
/* Or is it an ordinary mouse movement? */
else
static Lisp_Object
make_lispy_switch_frame (Lisp_Object frame)
{
- return Fcons (Qswitch_frame, Fcons (frame, Qnil));
+ return list2 (Qswitch_frame, frame);
}
\f
/* Manipulating modifiers. */
if (modifiers & ~INTMASK)
emacs_abort ();
XSETFASTINT (mask, modifiers);
- elements = Fcons (unmodified, Fcons (mask, Qnil));
+ elements = list2 (unmodified, mask);
/* Cache the parsing results on SYMBOL. */
Fput (symbol, Qevent_symbol_element_mask,
the caches:
XSETFASTINT (idx, modifiers);
Fput (new_symbol, Qevent_symbol_element_mask,
- Fcons (base, Fcons (idx, Qnil)));
+ list2 (base, idx));
Fput (new_symbol, Qevent_symbol_elements,
Fcons (base, lispy_modifier_list (modifiers)));
Sadly, this is only correct if `base' is indeed a base event,
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, list1 (item)); i++;
ASET (menu_bar_items_vector, i, make_number (0)); i++;
menu_bar_items_index = i;
}
/* As an exception, allow old-style menu separators. */
if (STRINGP (XCAR (item)))
- item = Fcons (XCAR (item), Qnil);
+ item = list1 (XCAR (item));
else if (!EQ (XCAR (item), Qmenu_item)
|| (item = XCDR (item), !CONSP (item)))
return 0;
/* Zap the position in key, so we know that we've
expanded it, and don't try to do so again. */
- POSN_SET_POSN (EVENT_START (key),
- Fcons (posn, Qnil));
+ POSN_SET_POSN (EVENT_START (key), list1 (posn));
mock_input = t + 2;
goto replay_sequence;
new_head
= apply_modifiers (modifiers, XCAR (breakdown));
- new_click
- = Fcons (new_head, Fcons (EVENT_START (key), Qnil));
+ new_click = list2 (new_head, EVENT_START (key));
/* Look for a binding for this new key. */
new_binding = follow_key (current_binding, new_click);
file = Fexpand_file_name (file, Qnil);
dribble = emacs_fopen (SSDATA (file), "w");
if (dribble == 0)
- report_file_error ("Opening dribble", Fcons (file, Qnil));
+ report_file_error ("Opening dribble", list1 (file));
}
return Qnil;
}
*p->var = intern_c_string (p->name);
staticpro (p->var);
Fput (*p->var, Qevent_kind, *p->kind);
- Fput (*p->var, Qevent_symbol_elements, Fcons (*p->var, Qnil));
+ Fput (*p->var, Qevent_symbol_elements, list1 (*p->var));
}
}
DEFVAR_LISP ("special-event-map", Vspecial_event_map,
doc: /* Keymap defining bindings for special events to execute at low level. */);
- Vspecial_event_map = Fcons (intern_c_string ("keymap"), Qnil);
+ Vspecial_event_map = list1 (intern_c_string ("keymap"));
DEFVAR_LISP ("track-mouse", do_mouse_tracking,
doc: /* Non-nil means generate motion events for mouse motion. */);