+2012-07-27 Eli Zaretskii <eliz@gnu.org>
+
+ * lisp.h (enum constype): Use CONSTYPE_HEAP and CONSTYPE_PURE for
+ enumeration constants, as PURE and HEAP are too general, and clash
+ with other headers and sources, such as gmalloc.c and the
+ MS-Windows system headers. All users changed.
+
2012-07-27 Dmitry Antipov <dmantipov@yandex.ru>
Revert last save_excursion_save and save_excursion_restore changes.
/* Make a list of COUNT Lisp_Objects, where ARG is the
first one. Allocate conses from pure space if TYPE
- is PURE, or allocate as usual if type is HEAP. */
+ is CONSTYPE_PURE, or allocate as usual if type is CONSTYPE_HEAP. */
Lisp_Object
listn (enum constype type, ptrdiff_t count, Lisp_Object arg, ...)
for (i = 0, val = Qnil; i < count; i++)
{
- if (type == PURE)
+ if (type == CONSTYPE_PURE)
val = pure_cons (objp[i], val);
- else if (type == HEAP)
+ else if (type == CONSTYPE_HEAP)
val = Fcons (objp[i], val);
else
abort ();
(but the contents of a buffer's text do not count here). */)
(void)
{
- return listn (HEAP, 8,
+ return listn (CONSTYPE_HEAP, 8,
bounded_number (cons_cells_consed),
bounded_number (floats_consed),
bounded_number (vector_cells_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 (PURE, 2, Qerror,
+ = listn (CONSTYPE_PURE, 2, Qerror,
build_pure_c_string ("Memory exhausted--use M-x save-some-buffers then exit and restart Emacs"));
DEFVAR_LISP ("memory-full", Vmemory_full,
DEFSYM (Qkill_buffer_query_functions, "kill-buffer-query-functions");
Fput (Qprotected_field, Qerror_conditions,
- listn (PURE, 2, Qprotected_field, Qerror));
+ listn (CONSTYPE_PURE, 2, 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 (PURE, 4,
+ preserved_fns = listn (CONSTYPE_PURE, 4,
intern_c_string ("region-beginning"),
intern_c_string ("region-end"),
intern_c_string ("point"),
args[charset_arg_unify_map] = Qnil;
args[charset_arg_plist] =
- listn (HEAP, 14,
+ listn (CONSTYPE_HEAP, 14,
intern_c_string (":name"),
args[charset_arg_name],
intern_c_string (":dimension"),
DEFSYM (Qcoding_system_error, "coding-system-error");
Fput (Qcoding_system_error, Qerror_conditions,
- listn (PURE, 2, Qcoding_system_error, Qerror));
+ listn (CONSTYPE_PURE, 2, Qcoding_system_error, Qerror));
Fput (Qcoding_system_error, Qerror_message,
build_pure_c_string ("Invalid coding system"));
Fset (intern_c_string ("ctl-x-map"), control_x_map);
Ffset (intern_c_string ("Control-X-prefix"), control_x_map);
- exclude_keys = listn (PURE, 5,
+ 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")),
where_is_preferred_modifier = 0;
staticpro (&Vmouse_events);
- Vmouse_events = listn (PURE, 9,
+ Vmouse_events = listn (CONSTYPE_PURE, 9,
intern_c_string ("menu-bar"),
intern_c_string ("tool-bar"),
intern_c_string ("header-line"),
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 {HEAP, PURE};
+enum constype {CONSTYPE_HEAP, CONSTYPE_PURE};
extern Lisp_Object listn (enum constype, ptrdiff_t, Lisp_Object, ...);
extern _Noreturn void string_overflow (void);
extern Lisp_Object make_string (const char *, ptrdiff_t);
DEFSYM (Qinvalid_regexp, "invalid-regexp");
Fput (Qsearch_failed, Qerror_conditions,
- listn (PURE, 2, Qsearch_failed, Qerror));
+ listn (CONSTYPE_PURE, 2, Qsearch_failed, Qerror));
Fput (Qsearch_failed, Qerror_message,
build_pure_c_string ("Search failed"));
Fput (Qinvalid_regexp, Qerror_conditions,
- listn (PURE, 2, Qinvalid_regexp, Qerror));
+ listn (CONSTYPE_PURE, 2, 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 (PURE, 2, Qscan_error, Qerror));
+ listn (CONSTYPE_PURE, 2, Qscan_error, Qerror));
Fput (Qscan_error, Qerror_message,
build_pure_c_string ("Scan error"));
dwType = REG_EXPAND_SZ;
dont_free = 1;
if (!strcmp (env_vars[i].name, "HOME") && !appdata)
- Vdelayed_warnings_list
- = Fcons (listn (HEAP, 2,
+ Vdelayed_warnings_list
+ = Fcons (listn (CONSTYPE_HEAP, 2,
intern ("initialization"),
build_string ("Setting HOME to C:\\ by default is deprecated")),
Vdelayed_warnings_list);
remain = build_string (buffer);
}
- status = listn (HEAP, 8,
+ status = listn (CONSTYPE_HEAP, 8,
Fcons (make_number ('L'), line_status),
Fcons (make_number ('B'), battery_status),
Fcons (make_number ('b'), battery_status_symbol),
Fput (Qundefined_color, Qerror_conditions,
- listn (PURE, 2, Qundefined_color, Qerror));
+ listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror));
Fput (Qundefined_color, Qerror_message,
build_pure_c_string ("Undefined color"));
\(see `modify-frame-parameters'). */);
Vicon_title_format
= Vframe_title_format
- = listn (PURE, 3,
+ = listn (CONSTYPE_PURE, 3,
intern_c_string ("multiple-frames"),
build_pure_c_string ("%b"),
- listn (PURE, 4,
+ listn (CONSTYPE_PURE, 4,
empty_unibyte_string,
intern_c_string ("invocation-name"),
build_pure_c_string ("@"),
/* This is the end of symbol initialization. */
Fput (Qundefined_color, Qerror_conditions,
- listn (PURE, 2, Qundefined_color, Qerror));
+ listn (CONSTYPE_PURE, 2, Qundefined_color, Qerror));
Fput (Qundefined_color, Qerror_message,
build_pure_c_string ("Undefined color"));