return Fcons (arg1, Fcons (arg2, Fcons (arg3, Qnil)));
}
-
Lisp_Object
list4 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4)
{
return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4, Qnil))));
}
-
Lisp_Object
-list5 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4, Lisp_Object arg5)
+list5 (Lisp_Object arg1, Lisp_Object arg2, Lisp_Object arg3, Lisp_Object arg4,
+ Lisp_Object arg5)
{
return Fcons (arg1, Fcons (arg2, Fcons (arg3, Fcons (arg4,
Fcons (arg5, Qnil)))));
}
-/* Make a list of COUNT Lisp_Objects, where ARG is the
- first one. Allocate conses from pure space if TYPE
- is CONSTYPE_PURE, or allocate as usual if type is CONSTYPE_HEAP. */
-
-Lisp_Object
-listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...)
+/* Make a list of COUNT Lisp_Objects, where ARG is the first one.
+ Use CONS to construct the pairs. AP has any remaining args. */
+static Lisp_Object
+cons_listn (ptrdiff_t count, Lisp_Object arg,
+ Lisp_Object (*cons) (Lisp_Object, Lisp_Object), va_list ap)
{
- Lisp_Object (*cons) (Lisp_Object, Lisp_Object);
- switch (type)
- {
- case CONSTYPE_PURE: cons = pure_cons; break;
- case CONSTYPE_HEAP: cons = Fcons; break;
- default: emacs_abort ();
- }
-
eassume (0 < count);
Lisp_Object val = cons (arg, Qnil);
Lisp_Object tail = val;
-
- va_list ap;
- va_start (ap, arg);
for (ptrdiff_t i = 1; i < count; i++)
{
Lisp_Object elem = cons (va_arg (ap, Lisp_Object), Qnil);
XSETCDR (tail, elem);
tail = elem;
}
+ return val;
+}
+
+/* Make a list of COUNT Lisp_Objects, where ARG1 is the first one. */
+Lisp_Object
+listn (ptrdiff_t count, Lisp_Object arg1, ...)
+{
+ va_list ap;
+ va_start (ap, arg1);
+ Lisp_Object val = cons_listn (count, arg1, Fcons, ap);
va_end (ap);
+ return val;
+}
+/* Make a pure list of COUNT Lisp_Objects, where ARG1 is the first one. */
+Lisp_Object
+pure_listn (ptrdiff_t count, Lisp_Object arg1, ...)
+{
+ va_list ap;
+ va_start (ap, arg1);
+ Lisp_Object val = cons_listn (count, arg1, pure_cons, ap);
+ va_end (ap);
return val;
}
(but the contents of a buffer's text do not count here). */)
(void)
{
- return listn (CONSTYPE_HEAP, 7,
- make_int (cons_cells_consed),
+ return list (make_int (cons_cells_consed),
make_int (floats_consed),
make_int (vector_cells_consed),
make_int (symbols_consed),
/* We build this in advance because if we wait until we need it, we might
not be able to allocate the memory to hold it. */
Vmemory_signal_data
- = listn (CONSTYPE_PURE, 2, Qerror,
- build_pure_c_string ("Memory exhausted--use M-x save-some-buffers then exit and restart Emacs"));
+ = pure_list (Qerror,
+ build_pure_c_string ("Memory exhausted--use"
+ " M-x save-some-buffers then"
+ " exit and restart Emacs"));
DEFVAR_LISP ("memory-full", Vmemory_full,
doc: /* Non-nil means Emacs cannot get much more Lisp memory. */);
Qoverwrite_mode_binary));
Fput (Qprotected_field, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qprotected_field, Qerror));
+ pure_list (Qprotected_field, Qerror));
Fput (Qprotected_field, Qerror_message,
build_pure_c_string ("Attempt to modify a protected field"));
callint_message = Qnil;
staticpro (&callint_message);
- preserved_fns = listn (CONSTYPE_PURE, 4,
- intern_c_string ("region-beginning"),
- intern_c_string ("region-end"),
- intern_c_string ("point"),
- intern_c_string ("mark"));
+ preserved_fns = pure_list (intern_c_string ("region-beginning"),
+ intern_c_string ("region-end"),
+ intern_c_string ("point"),
+ intern_c_string ("mark"));
staticpro (&preserved_fns);
DEFSYM (Qlist, "list");
ISO_CHARSET_TABLE (charset.dimension, charset.iso_chars_96,
charset.iso_final) = id;
if (new_definition_p)
- Viso_2022_charset_list = nconc2 (Viso_2022_charset_list,
- list1 (make_fixnum (id)));
+ Viso_2022_charset_list = nconc2 (Viso_2022_charset_list, list1i (id));
if (ISO_CHARSET_TABLE (1, 0, 'J') == id)
charset_jisx0201_roman = id;
else if (ISO_CHARSET_TABLE (2, 0, '@') == id)
emacs_mule_bytes[charset.emacs_mule_id] = charset.dimension + 2;
if (new_definition_p)
Vemacs_mule_charset_list = nconc2 (Vemacs_mule_charset_list,
- list1 (make_fixnum (id)));
+ list1i (id));
}
if (new_definition_p)
{
Vcharset_list = Fcons (args[charset_arg_name], Vcharset_list);
if (charset.supplementary_p)
- Vcharset_ordered_list = nconc2 (Vcharset_ordered_list,
- list1 (make_fixnum (id)));
+ Vcharset_ordered_list = nconc2 (Vcharset_ordered_list, list1i (id));
else
{
Lisp_Object tail;
Vcharset_ordered_list);
else if (NILP (tail))
Vcharset_ordered_list = nconc2 (Vcharset_ordered_list,
- list1 (make_fixnum (id)));
+ list1i (id));
else
{
val = Fcons (XCAR (tail), XCDR (tail));
args[charset_arg_unify_map] = Qnil;
args[charset_arg_plist] =
- listn (CONSTYPE_HEAP, 14,
- QCname,
+ list (QCname,
args[charset_arg_name],
intern_c_string (":dimension"),
args[charset_arg_dimension],
}
}
Vcharset_non_preferred_head = old_list;
- Vcharset_ordered_list = CALLN (Fnconc, Fnreverse (new_head), old_list);
+ Vcharset_ordered_list = nconc2 (Fnreverse (new_head), old_list);
charset_ordered_list_tick++;
{
detect_info.found = CATEGORY_MASK_RAW_TEXT;
id = CODING_SYSTEM_ID (Qno_conversion);
- val = list1 (make_fixnum (id));
+ val = list1i (id);
}
else if (! detect_info.rejected && ! detect_info.found)
{
detect_info.found = CATEGORY_MASK_ANY;
id = coding_categories[coding_category_undecided].id;
- val = list1 (make_fixnum (id));
+ val = list1i (id);
}
else if (highest)
{
if (detect_info.found)
{
detect_info.found = 1 << category;
- val = list1 (make_fixnum (this->id));
+ val = list1i (this->id);
}
else
for (i = 0; i < coding_category_raw_text; i++)
{
detect_info.found = 1 << coding_priorities[i];
id = coding_categories[coding_priorities[i]].id;
- val = list1 (make_fixnum (id));
+ val = list1i (id);
break;
}
}
found |= 1 << category;
id = coding_categories[category].id;
if (id >= 0)
- val = list1 (make_fixnum (id));
+ val = list1i (id);
}
}
for (i = coding_category_raw_text - 1; i >= 0; i--)
this = coding_categories + coding_category_utf_8_sig;
else
this = coding_categories + coding_category_utf_8_nosig;
- val = list1 (make_fixnum (this->id));
+ val = list1i (this->id);
}
}
else if (base_category == coding_category_utf_16_auto)
this = coding_categories + coding_category_utf_16_be_nosig;
else
this = coding_categories + coding_category_utf_16_le_nosig;
- val = list1 (make_fixnum (this->id));
+ val = list1i (this->id);
}
}
else
{
detect_info.found = 1 << XFIXNUM (CODING_ATTR_CATEGORY (attrs));
- val = list1 (make_fixnum (coding.id));
+ val = list1i (coding.id);
}
/* Then, detect eol-format if necessary. */
tset_charset_list
(term, (terminal_coding->common_flags & CODING_REQUIRE_ENCODING_MASK
? coding_charset_list (terminal_coding)
- : list1 (make_fixnum (charset_ascii))));
+ : list1i (charset_ascii)));
return Qnil;
}
/* Error signaled when there's a problem with detecting a coding system. */
DEFSYM (Qcoding_system_error, "coding-system-error");
Fput (Qcoding_system_error, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qcoding_system_error, Qerror));
+ pure_list (Qcoding_system_error, Qerror));
Fput (Qcoding_system_error, Qerror_message,
build_pure_c_string ("Invalid coding system"));
/* This is already set.
plist[7] = args[coding_arg_ascii_compatible_p] = Qt; */
plist[8] = intern_c_string (":charset-list");
- plist[9] = args[coding_arg_charset_list] = Fcons (Qascii, Qnil);
+ plist[9] = args[coding_arg_charset_list] = list1 (Qascii);
plist[11] = args[coding_arg_for_unibyte] = Qnil;
plist[13] = build_pure_c_string ("No conversion on encoding, "
"automatic conversion on decoding.");
DEFSYM (Qmodule_load_failed, "module-load-failed");
Fput (Qmodule_load_failed, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qmodule_load_failed, Qerror));
+ pure_list (Qmodule_load_failed, Qerror));
Fput (Qmodule_load_failed, Qerror_message,
build_pure_c_string ("Module load failed"));
DEFSYM (Qmodule_open_failed, "module-open-failed");
Fput (Qmodule_open_failed, Qerror_conditions,
- listn (CONSTYPE_PURE, 3,
- Qmodule_open_failed, Qmodule_load_failed, Qerror));
+ pure_list (Qmodule_open_failed, Qmodule_load_failed, Qerror));
Fput (Qmodule_open_failed, Qerror_message,
build_pure_c_string ("Module could not be opened"));
DEFSYM (Qmodule_not_gpl_compatible, "module-not-gpl-compatible");
Fput (Qmodule_not_gpl_compatible, Qerror_conditions,
- listn (CONSTYPE_PURE, 3,
- Qmodule_not_gpl_compatible, Qmodule_load_failed, Qerror));
+ pure_list (Qmodule_not_gpl_compatible, Qmodule_load_failed, Qerror));
Fput (Qmodule_not_gpl_compatible, Qerror_message,
build_pure_c_string ("Module is not GPL compatible"));
DEFSYM (Qmissing_module_init_function, "missing-module-init-function");
Fput (Qmissing_module_init_function, Qerror_conditions,
- listn (CONSTYPE_PURE, 3,
- Qmissing_module_init_function, Qmodule_load_failed, Qerror));
+ pure_list (Qmissing_module_init_function, Qmodule_load_failed,
+ Qerror));
Fput (Qmissing_module_init_function, Qerror_message,
build_pure_c_string ("Module does not export an "
"initialization function"));
DEFSYM (Qmodule_init_failed, "module-init-failed");
Fput (Qmodule_init_failed, Qerror_conditions,
- listn (CONSTYPE_PURE, 3,
- Qmodule_init_failed, Qmodule_load_failed, Qerror));
+ pure_list (Qmodule_init_failed, Qmodule_load_failed, Qerror));
Fput (Qmodule_init_failed, Qerror_message,
build_pure_c_string ("Module initialization failed"));
DEFSYM (Qinvalid_arity, "invalid-arity");
- Fput (Qinvalid_arity, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qinvalid_arity, Qerror));
+ Fput (Qinvalid_arity, Qerror_conditions, pure_list (Qinvalid_arity, Qerror));
Fput (Qinvalid_arity, Qerror_message,
build_pure_c_string ("Invalid function arity"));
/* Optimize for no indirection. */
fun = original_fun;
if (!SYMBOLP (fun))
- fun = Ffunction (Fcons (fun, Qnil));
+ fun = Ffunction (list1 (fun));
else if (!NILP (fun) && (fun = XSYMBOL (fun)->u.s.function, SYMBOLP (fun)))
fun = indirect_function (fun);
Lisp_Object flags = Qnil;
if (backtrace_debug_on_exit (pdl))
- flags = Fcons (QCdebug_on_exit, Fcons (Qt, Qnil));
+ flags = list2 (QCdebug_on_exit, Qt);
if (backtrace_nargs (pdl) == UNEVALLED)
return call4 (function, Qnil, backtrace_function (pdl), *backtrace_args (pdl), flags);
doc: /* Return a list of all the supported `secure_hash' algorithms. */)
(void)
{
- return listn (CONSTYPE_HEAP, 6,
- Qmd5,
- Qsha1,
- Qsha224,
- Qsha256,
- Qsha384,
- Qsha512);
+ return list (Qmd5, Qsha1, Qsha224, Qsha256, Qsha384, Qsha512);
}
/* Extract data from a string or a buffer. SPEC is a list of
{
Lisp_Object copy;
- val = driver_list->driver->list (f, scratch_font_spec);
+ val = (driver_list->driver->list) (f, scratch_font_spec);
/* We put zero_vector in the font-cache to indicate that
no fonts matching SPEC were found on the system.
Failure to have this indication in the font cache can
Fcons (list4
(frame, fun_symbol,
((width > 0)
- ? list4 (make_fixnum (FRAME_TEXT_WIDTH (f)),
- make_fixnum (FRAME_TEXT_HEIGHT (f)),
- make_fixnum (width),
- make_fixnum (height))
+ ? list4i (FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
+ width, height)
: Qnil),
rest),
XCDR (frame_size_history)));
frame_size_history_add
(f, Qadjust_frame_size_3, new_text_width, new_text_height,
- list4 (make_fixnum (old_pixel_width), make_fixnum (old_pixel_height),
- make_fixnum (new_pixel_width), make_fixnum (new_pixel_height)));
+ list4i (old_pixel_width, old_pixel_height,
+ new_pixel_width, new_pixel_height));
/* Assign new sizes. */
FRAME_TEXT_WIDTH (f) = new_text_width;
ptrdiff_t cipher_tag_size = gnutls_cipher_get_tag_size (gca);
Lisp_Object cp
- = listn (CONSTYPE_HEAP, 15, cipher_symbol,
+ = list (cipher_symbol,
QCcipher_id, make_fixnum (gca),
QCtype, Qgnutls_type_cipher,
QCcipher_aead_capable, cipher_tag_size == 0 ? Qnil : Qt,
# ifdef HAVE_GNUTLS_MAC_GET_NONCE_SIZE
nonce_size = gnutls_mac_get_nonce_size (gma);
# endif
- Lisp_Object mp = listn (CONSTYPE_HEAP, 11, gma_symbol,
+ Lisp_Object mp = list (gma_symbol,
QCmac_algorithm_id, make_fixnum (gma),
QCtype, Qgnutls_type_mac_algorithm,
/* A symbol representing the GnuTLS digest algorithm. */
Lisp_Object gda_symbol = intern (gnutls_digest_get_name (gda));
- Lisp_Object mp = listn (CONSTYPE_HEAP, 7, gda_symbol,
+ Lisp_Object mp = list (gda_symbol,
QCdigest_algorithm_id, make_fixnum (gda),
QCtype, Qgnutls_type_digest_algorithm,
{
frame_size_history_add
(f, Qxg_frame_set_char_size_1, width, height,
- list2 (make_fixnum (gheight), make_fixnum (totalheight)));
+ list2i (gheight, totalheight));
gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
gwidth, totalheight);
{
frame_size_history_add
(f, Qxg_frame_set_char_size_2, width, height,
- list2 (make_fixnum (gwidth), make_fixnum (totalwidth)));
+ list2i (gwidth, totalwidth));
gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
totalwidth, gheight);
{
frame_size_history_add
(f, Qxg_frame_set_char_size_3, width, height,
- list2 (make_fixnum (totalwidth), make_fixnum (totalheight)));
+ list2i (totalwidth, totalheight));
gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
totalwidth, totalheight);
eassume (false);
}
- return listn (CONSTYPE_HEAP, 7,
- Fcons (Qorientation, orientation_symbol),
-#define MAKE_FLOAT_PAGE_SETUP(f) make_float (f (page_setup, GTK_UNIT_POINTS))
- Fcons (Qwidth,
- MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_page_width)),
- Fcons (Qheight,
- MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_page_height)),
- Fcons (Qleft_margin,
- MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_left_margin)),
- Fcons (Qright_margin,
- MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_right_margin)),
- Fcons (Qtop_margin,
- MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_top_margin)),
- Fcons (Qbottom_margin,
- MAKE_FLOAT_PAGE_SETUP (gtk_page_setup_get_bottom_margin))
-#undef MAKE_FLOAT_PAGE_SETUP
- );
+#define GETSETUP(f) make_float (f (page_setup, GTK_UNIT_POINTS))
+ return
+ list (Fcons (Qorientation, orientation_symbol),
+ Fcons (Qwidth, GETSETUP (gtk_page_setup_get_page_width)),
+ Fcons (Qheight, GETSETUP (gtk_page_setup_get_page_height)),
+ Fcons (Qleft_margin, GETSETUP (gtk_page_setup_get_left_margin)),
+ Fcons (Qright_margin, GETSETUP (gtk_page_setup_get_right_margin)),
+ Fcons (Qtop_margin, GETSETUP (gtk_page_setup_get_top_margin)),
+ Fcons (Qbottom_margin, GETSETUP (gtk_page_setup_get_bottom_margin)));
+#undef GETSETUP
}
static void
if (!NILP (Vquit_flag))
{
Vquit_flag = Qnil;
- Vunread_command_events = list1 (make_fixnum (quit_char));
+ Vunread_command_events = list1i (quit_char);
}
}
in case you use it as a menu with `x-popup-menu'. */)
(Lisp_Object string)
{
- Lisp_Object tail;
- if (!NILP (string))
- tail = list1 (string);
- else
- tail = Qnil;
+ Lisp_Object tail = !NILP (string) ? list1 (string) : Qnil;
return Fcons (Qkeymap,
Fcons (Fmake_char_table (Qkeymap, Qnil), tail));
}
Fset (intern_c_string ("ctl-x-map"), control_x_map);
Ffset (intern_c_string ("Control-X-prefix"), control_x_map);
- exclude_keys = listn (CONSTYPE_PURE, 5,
- pure_cons (build_pure_c_string ("DEL"), build_pure_c_string ("\\d")),
- pure_cons (build_pure_c_string ("TAB"), build_pure_c_string ("\\t")),
- pure_cons (build_pure_c_string ("RET"), build_pure_c_string ("\\r")),
- pure_cons (build_pure_c_string ("ESC"), build_pure_c_string ("\\e")),
- pure_cons (build_pure_c_string ("SPC"), build_pure_c_string (" ")));
+ exclude_keys = pure_list
+ (pure_cons (build_pure_c_string ("DEL"), build_pure_c_string ("\\d")),
+ pure_cons (build_pure_c_string ("TAB"), build_pure_c_string ("\\t")),
+ pure_cons (build_pure_c_string ("RET"), build_pure_c_string ("\\r")),
+ pure_cons (build_pure_c_string ("ESC"), build_pure_c_string ("\\e")),
+ pure_cons (build_pure_c_string ("SPC"), build_pure_c_string (" ")));
staticpro (&exclude_keys);
DEFVAR_LISP ("define-key-rebound-commands", Vdefine_key_rebound_commands,
DEFSYM (Qmode_line, "mode-line");
staticpro (&Vmouse_events);
- Vmouse_events = listn (CONSTYPE_PURE, 9,
- Qmenu_bar,
- Qtool_bar,
- Qheader_line,
- Qmode_line,
- intern_c_string ("mouse-1"),
- intern_c_string ("mouse-2"),
- intern_c_string ("mouse-3"),
- intern_c_string ("mouse-4"),
- intern_c_string ("mouse-5"));
+ Vmouse_events = pure_list (Qmenu_bar, Qtool_bar, Qheader_line, Qmode_line,
+ intern_c_string ("mouse-1"),
+ intern_c_string ("mouse-2"),
+ intern_c_string ("mouse-3"),
+ intern_c_string ("mouse-4"),
+ intern_c_string ("mouse-5"));
/* Keymap used for minibuffers when doing completion. */
/* Keymap used for minibuffers when doing completion and require a match. */
event.arg = list2 (Fcons (XCAR (watch_object),
Fcons (actions,
NILP (file1)
- ? Fcons (file, Qnil)
+ ? list1 (file)
: list2 (file, file1))),
Fnth (make_fixnum (3), watch_object));
kbd_buffer_store_event (&event);
extern Lisp_Object list4 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object);
extern Lisp_Object list5 (Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object,
Lisp_Object);
-enum constype {CONSTYPE_HEAP, CONSTYPE_PURE};
-extern Lisp_Object listn (enum constype, ptrdiff_t, Lisp_Object, ...);
+extern Lisp_Object listn (ptrdiff_t, Lisp_Object, ...);
+extern Lisp_Object pure_listn (ptrdiff_t, Lisp_Object, ...);
+#define list(...) \
+ listn (ARRAYELTS (((Lisp_Object []) {__VA_ARGS__})), __VA_ARGS__)
+#define pure_list(...) \
+ pure_listn (ARRAYELTS (((Lisp_Object []) {__VA_ARGS__})), __VA_ARGS__)
enum gc_root_type {
GC_ROOT_STATICPRO,
};
extern void visit_static_gc_roots (struct gc_root_visitor visitor);
-/* Build a frequently used 2/3/4-integer lists. */
+/* Build a frequently used 1/2/3/4-integer lists. */
+
+INLINE Lisp_Object
+list1i (EMACS_INT x)
+{
+ return list1 (make_fixnum (x));
+}
INLINE Lisp_Object
list2i (EMACS_INT x, EMACS_INT y)
/* Construct list. */
if (EQ (attribute, Qouter_edges))
- return list4 (make_fixnum (f->left_pos), make_fixnum (f->top_pos),
- make_fixnum (f->left_pos + outer_width),
- make_fixnum (f->top_pos + outer_height));
+ return list4i (f->left_pos, f->top_pos,
+ f->left_pos + outer_width,
+ f->top_pos + outer_height);
else if (EQ (attribute, Qnative_edges))
- return list4 (make_fixnum (native_left), make_fixnum (native_top),
- make_fixnum (native_right), make_fixnum (native_bottom));
+ return list4i (native_left, native_top,
+ native_right, native_bottom);
else if (EQ (attribute, Qinner_edges))
- return list4 (make_fixnum (native_left + internal_border_width),
- make_fixnum (native_top
- + tool_bar_height
- + internal_border_width),
- make_fixnum (native_right - internal_border_width),
- make_fixnum (native_bottom - internal_border_width));
+ return list4i (native_left + internal_border_width,
+ native_top + tool_bar_height + internal_border_width,
+ native_right - internal_border_width,
+ native_bottom - internal_border_width);
else
return
- listn (CONSTYPE_HEAP, 10,
- Fcons (Qouter_position,
+ list (Fcons (Qouter_position,
Fcons (make_fixnum (f->left_pos),
make_fixnum (f->top_pos))),
Fcons (Qouter_size,
Utility to append to a list
-------------------------------------------------------------------------- */
{
- return CALLN (Fnconc, list, list1 (item));
+ return nconc2 (list, list (item));
}
type_sym = Qurl;
- strings = Fcons (build_string ([[url absoluteString] UTF8String]), Qnil);
+ strings = list1 (build_string ([[url absoluteString] UTF8String]));
}
else if ([type isEqualToString: NSStringPboardType]
|| [type isEqualToString: NSTabularTextPboardType])
type_sym = Qnil;
- strings = Fcons (build_string ([data UTF8String]), Qnil);
+ strings = list1 (build_string ([data UTF8String]));
}
else
{
dump_fn = Fexpand_file_name (dump_fn, Qnil);
- return CALLN (Flist,
- Fcons (Qdumped_with_pdumper, Qt),
+ return list3 (Fcons (Qdumped_with_pdumper, Qt),
Fcons (Qload_time, make_float (dump_private.load_time)),
Fcons (Qdump_file_name, dump_fn));
}
DEFSYM (Qinvalid_regexp, "invalid-regexp");
Fput (Qsearch_failed, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qsearch_failed, Qerror));
+ pure_list (Qsearch_failed, Qerror));
Fput (Qsearch_failed, Qerror_message,
build_pure_c_string ("Search failed"));
Fput (Quser_search_failed, Qerror_conditions,
- listn (CONSTYPE_PURE, 4,
- Quser_search_failed, Quser_error, Qsearch_failed, Qerror));
+ pure_list (Quser_search_failed, Quser_error, Qsearch_failed, Qerror));
Fput (Quser_search_failed, Qerror_message,
build_pure_c_string ("Search failed"));
Fput (Qinvalid_regexp, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qinvalid_regexp, Qerror));
+ pure_list (Qinvalid_regexp, Qerror));
Fput (Qinvalid_regexp, Qerror_message,
build_pure_c_string ("Invalid regexp"));
DEFSYM (Qscan_error, "scan-error");
Fput (Qscan_error, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qscan_error, Qerror));
+ pure_list (Qscan_error, Qerror));
Fput (Qscan_error, Qerror_message,
build_pure_c_string ("Scan error"));
if (strcmp (env_vars[i].name, "HOME") == 0 && !appdata)
Vdelayed_warnings_list
= Fcons
- (listn (CONSTYPE_HEAP, 2,
- intern ("initialization"), build_string
+ (list2 (intern ("initialization"), build_string
("Use of `C:\\.emacs' without defining `HOME'\n"
"in the environment is deprecated, "
"see `Windows HOME' in the Emacs manual.")),
remain = format_string ("%ld:%02ld", m / 60, m % 60);
}
- status = listn (CONSTYPE_HEAP, 8,
- Fcons (make_fixnum ('L'), line_status),
+ status = list (Fcons (make_fixnum ('L'), line_status),
Fcons (make_fixnum ('B'), battery_status),
Fcons (make_fixnum ('b'), battery_status_symbol),
Fcons (make_fixnum ('p'), load_percentage),
/* A single line menu bar. */
menu_bar_height = single_menu_bar_height;
- return listn (CONSTYPE_HEAP, 10,
- Fcons (Qouter_position,
+ return list (Fcons (Qouter_position,
Fcons (make_fixnum (left), make_fixnum (top))),
Fcons (Qouter_size,
Fcons (make_fixnum (right - left),
DEFSYM (Qjson, "json");
Fput (Qundefined_color, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror));
+ pure_list (Qundefined_color, Qerror));
Fput (Qundefined_color, Qerror_message,
build_pure_c_string ("Undefined color"));
frame_size_history_add
(f, Qset_frame_size, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
- list2 (make_fixnum (ew->core.width), make_fixnum (ew->core.height)));
+ list2i (ew->core.width, ew->core.height));
}
static void
have to reverse this list at the end. */
foreach_window (XFRAME (frame), add_window_to_list, &arglist);
arglist = Fnreverse (arglist);
- Vwindow_list = CALLN (Fnconc, Vwindow_list, arglist);
+ Vwindow_list = nconc2 (Vwindow_list, arglist);
}
}
\(see `modify-frame-parameters'). */);
Vicon_title_format
= Vframe_title_format
- = listn (CONSTYPE_PURE, 3,
- intern_c_string ("multiple-frames"),
- build_pure_c_string ("%b"),
- listn (CONSTYPE_PURE, 4,
- empty_unibyte_string,
- intern_c_string ("invocation-name"),
- build_pure_c_string ("@"),
- intern_c_string ("system-name")));
+ = pure_list (intern_c_string ("multiple-frames"),
+ build_pure_c_string ("%b"),
+ pure_list (empty_unibyte_string,
+ intern_c_string ("invocation-name"),
+ build_pure_c_string ("@"),
+ intern_c_string ("system-name")));
DEFVAR_LISP ("message-log-max", Vmessage_log_max,
doc: /* Maximum number of lines to keep in the message log buffer.
/* We don't have to check fontsets. */
return fonts;
Lisp_Object fontsets = list_fontsets (f, pattern, size);
- return CALLN (Fnconc, fonts, fontsets);
+ return nconc2 (fonts, fontsets);
}
#endif /* HAVE_WINDOW_SYSTEM */
return make_fixnum (color_distance (&cdef1, &cdef2));
else
return call2 (metric,
- list3 (make_fixnum (cdef1.red),
- make_fixnum (cdef1.green),
- make_fixnum (cdef1.blue)),
- list3 (make_fixnum (cdef2.red),
- make_fixnum (cdef2.green),
- make_fixnum (cdef2.blue)));
+ list3i (cdef1.red, cdef1.green, cdef1.blue),
+ list3i (cdef2.red, cdef2.green, cdef2.blue));
}
\f
/* Construct list. */
if (EQ (attribute, Qouter_edges))
- return list4 (make_fixnum (outer_left), make_fixnum (outer_top),
- make_fixnum (outer_right), make_fixnum (outer_bottom));
+ return list4i (outer_left, outer_top, outer_right, outer_bottom);
else if (EQ (attribute, Qnative_edges))
- return list4 (make_fixnum (native_left), make_fixnum (native_top),
- make_fixnum (native_right), make_fixnum (native_bottom));
+ return list4i (native_left, native_top, native_right, native_bottom);
else if (EQ (attribute, Qinner_edges))
- return list4 (make_fixnum (inner_left), make_fixnum (inner_top),
- make_fixnum (inner_right), make_fixnum (inner_bottom));
+ return list4i (inner_left, inner_top, inner_right, inner_bottom);
else
return
- listn (CONSTYPE_HEAP, 11,
- Fcons (Qouter_position,
+ list (Fcons (Qouter_position,
Fcons (make_fixnum (outer_left),
make_fixnum (outer_top))),
Fcons (Qouter_size,
#endif
Fput (Qundefined_color, Qerror_conditions,
- listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror));
+ pure_list (Qundefined_color, Qerror));
Fput (Qundefined_color, Qerror_message,
build_pure_c_string ("Undefined color"));
{
frame_size_history_add
(f, Qx_set_window_size_1, width, height,
- list2 (make_fixnum (old_height),
- make_fixnum (pixelheight + FRAME_MENUBAR_HEIGHT (f))));
+ list2i (old_height, pixelheight + FRAME_MENUBAR_HEIGHT (f)));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
old_width, pixelheight + FRAME_MENUBAR_HEIGHT (f));
{
frame_size_history_add
(f, Qx_set_window_size_2, width, height,
- list2 (make_fixnum (old_width), make_fixnum (pixelwidth)));
+ list2i (old_width, pixelwidth));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
pixelwidth, old_height);
{
frame_size_history_add
(f, Qx_set_window_size_3, width, height,
- list3 (make_fixnum (pixelwidth + FRAME_TOOLBAR_WIDTH (f)),
- make_fixnum (pixelheight + FRAME_TOOLBAR_HEIGHT (f)
- + FRAME_MENUBAR_HEIGHT (f)),
- make_fixnum (FRAME_MENUBAR_HEIGHT (f))));
+ list3i (pixelwidth + FRAME_TOOLBAR_WIDTH (f),
+ (pixelheight + FRAME_TOOLBAR_HEIGHT (f)
+ + FRAME_MENUBAR_HEIGHT (f)),
+ FRAME_MENUBAR_HEIGHT (f)));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f));
CHECK_XWIDGET (xwidget);
GtkRequisition requisition;
gtk_widget_size_request (XXWIDGET (xwidget)->widget_osr, &requisition);
- return list2 (make_fixnum (requisition.width),
- make_fixnum (requisition.height));
+ return list2i (requisition.width, requisition.height);
}
DEFUN ("xwidgetp",