+2014-09-16 Dmitry Antipov <dmantipov@yandex.ru>
+
+ If USE_LOCAL_ALLOCATORS, allocate even more Lisp objects on stack.
+ * charset.c (load_charset_map_from_file): Use scoped_list2
+ and build_local_string.
+ * buffer.c (Fother_buffer, other_buffer_safely, init_buffer):
+ * emacs.c (init_cmdargs, decode_env_path):
+ * fileio.c (Fexpand_file_name):
+ * fns.c (maybe_resize_hash_table) [ENABLE_CHECKING]:
+ * frame.c (x_get_arg):
+ * keyboard.c (safe_run_hooks_error):
+ * lread.c (load_warn_old_style_backquotes):
+ * xdisp.c (Fcurrent_bidi_paragraph_direction):
+ * xfns.c (x_default_scroll_bar_color_parameter, select_visual):
+ * xselect.c (x_clipboard_manager_error_1)
+ (x_clipboard_manager_save_all):
+ * xterm.c (x_term_init): Use build_local_string.
+
2014-09-15 Eli Zaretskii <eliz@gnu.org>
* sound.c [WINDOWSNT]: Include w32common.h and mbstring.h.
return notsogood;
else
{
- buf = Fget_buffer (build_string ("*scratch*"));
+ buf = Fget_buffer (build_local_string ("*scratch*"));
if (NILP (buf))
{
- buf = Fget_buffer_create (build_string ("*scratch*"));
+ buf = Fget_buffer_create (build_local_string ("*scratch*"));
Fset_buffer_major_mode (buf);
}
return buf;
if (candidate_buffer (buf, buffer))
return buf;
- buf = Fget_buffer (build_string ("*scratch*"));
+ buf = Fget_buffer (build_local_string ("*scratch*"));
if (NILP (buf))
{
- buf = Fget_buffer_create (build_string ("*scratch*"));
+ buf = Fget_buffer_create (build_local_string ("*scratch*"));
Fset_buffer_major_mode (buf);
}
initialized = initialized;
#endif /* USE_MMAP_FOR_BUFFERS */
- Fset_buffer (Fget_buffer_create (build_string ("*scratch*")));
+ Fset_buffer (Fget_buffer_create (build_local_string ("*scratch*")));
if (NILP (BVAR (&buffer_defaults, enable_multibyte_characters)))
Fset_buffer_multibyte (Qnil);
&& strcmp ("/", SSDATA (BVAR (current_buffer, directory))))
bset_directory
(current_buffer,
- concat2 (build_string ("/:"), BVAR (current_buffer, directory)));
+ concat2 (build_local_string ("/:"), BVAR (current_buffer, directory)));
temp = get_minibuffer (0);
bset_directory (XBUFFER (temp), BVAR (current_buffer, directory));
int n_entries;
ptrdiff_t count;
- suffixes = list2 (build_string (".map"), build_string (".TXT"));
+ suffixes = scoped_list2 (build_local_string (".map"),
+ build_local_string (".TXT"));
count = SPECPDL_INDEX ();
record_unwind_protect_nothing ();
USE_SAFE_ALLOCA;
SAFE_ALLOCA_LISP (args, len * 2 + 1);
- args[i++] = build_string ("One of ");
+ args[i++] = build_local_string ("One of ");
for (obj = choice; !NILP (obj); obj = XCDR (obj))
{
if it would otherwise be treated as magic. */
handler = Ffind_file_name_handler (raw_name, Qt);
if (! NILP (handler))
- raw_name = concat2 (build_string ("/:"), raw_name);
+ raw_name = concat2 (build_local_string ("/:"), raw_name);
Vinvocation_name = Ffile_name_nondirectory (raw_name);
Vinvocation_directory = Ffile_name_directory (raw_name);
if it would otherwise be treated as magic. */
handler = Ffind_file_name_handler (found, Qt);
if (! NILP (handler))
- found = concat2 (build_string ("/:"), found);
+ found = concat2 (build_local_string ("/:"), found);
Vinvocation_directory = Ffile_name_directory (found);
}
}
}
if (! NILP (tem))
- element = concat2 (build_string ("/:"), element);
+ element = concat2 (build_local_string ("/:"), element);
} /* !NILP (element) */
lpath = Fcons (element, lpath);
name = make_specified_string (nm, -1, p - nm, multibyte);
temp[0] = DRIVE_LETTER (drive);
- name = concat2 (build_string (temp), name);
+ name = concat2 (build_local_string (temp), name);
}
#ifdef WINDOWSNT
if (!NILP (Vw32_downcase_file_names))
#ifdef ENABLE_CHECKING
if (HASH_TABLE_P (Vpurify_flag)
&& XHASH_TABLE (Vpurify_flag) == h)
- {
- Lisp_Object args[2];
- args[0] = build_string ("Growing hash table to: %d");
- args[1] = make_number (new_size);
- Fmessage (2, args);
- }
+ Fmessage (2, ((Lisp_Object [])
+ { build_local_string ("Growing hash table to: %d"),
+ make_number (new_size) }));
#endif
set_hash_key_and_value (h, larger_vector (h->key_and_value,
{
if (attribute && dpyinfo)
{
- tem = display_x_get_resource (dpyinfo,
- build_string (attribute),
- build_string (class),
- Qnil, Qnil);
+ tem = display_x_get_resource
+ (dpyinfo, build_local_string (attribute),
+ build_local_string (class), Qnil, Qnil);
if (NILP (tem))
return Qunbound;
static Lisp_Object
safe_run_hooks_error (Lisp_Object error, ptrdiff_t nargs, Lisp_Object *args)
{
- Lisp_Object hook, fun, msgargs[4];
+ Lisp_Object hook, fun;
eassert (nargs == 2);
hook = args[0];
fun = args[1];
- msgargs[0] = build_string ("Error in %s (%S): %S");
- msgargs[1] = hook;
- msgargs[2] = fun;
- msgargs[3] = error;
- Fmessage (4, msgargs);
+ Fmessage (4, ((Lisp_Object [])
+ { build_local_string ("Error in %s (%S): %S"), hook, fun, error }));
if (SYMBOLP (hook))
{
load_warn_old_style_backquotes (Lisp_Object file)
{
if (!NILP (Vold_style_backquotes))
- {
- Lisp_Object args[2];
- args[0] = build_string ("Loading `%s': old-style backquotes detected!");
- args[1] = file;
- Fmessage (2, args);
- }
+ Fmessage (2, ((Lisp_Object [])
+ { build_local_string ("Loading `%s': old-style backquotes detected!"),
+ file }));
}
DEFUN ("get-load-suffixes", Fget_load_suffixes, Sget_load_suffixes, 0, 0, 0,
the previous non-empty line. */
if (pos >= ZV && pos > BEGV)
DEC_BOTH (pos, bytepos);
- if (fast_looking_at (build_string ("[\f\t ]*\n"),
+ if (fast_looking_at (build_local_string ("[\f\t ]*\n"),
pos, bytepos, ZV, ZV_BYTE, Qnil) > 0)
{
while ((c = FETCH_BYTE (bytepos)) == '\n'
/* See if an X resource for the scroll bar color has been
specified. */
- tem = display_x_get_resource (dpyinfo,
- build_string (foreground_p
- ? "foreground"
- : "background"),
- empty_unibyte_string,
- build_string ("verticalScrollBar"),
- empty_unibyte_string);
+ tem = display_x_get_resource
+ (dpyinfo, build_local_string (foreground_p
+ ? "foreground"
+ : "background"),
+ empty_unibyte_string,
+ build_local_string ("verticalScrollBar"),
+ empty_unibyte_string);
if (!STRINGP (tem))
{
/* If nothing has been specified, scroll bars will use a
{
Display *dpy = dpyinfo->display;
Screen *screen = dpyinfo->screen;
- Lisp_Object value;
/* See if a visual is specified. */
- value = display_x_get_resource (dpyinfo,
- build_string ("visualClass"),
- build_string ("VisualClass"),
- Qnil, Qnil);
+ Lisp_Object value = display_x_get_resource
+ (dpyinfo, build_local_string ("visualClass"),
+ build_local_string ("VisualClass"), Qnil, Qnil);
+
if (STRINGP (value))
{
/* VALUE should be of the form CLASS-DEPTH, where CLASS is one
static Lisp_Object
x_clipboard_manager_error_1 (Lisp_Object err)
{
- Lisp_Object args[2];
- args[0] = build_string ("X clipboard manager error: %s\n\
-If the problem persists, set `x-select-enable-clipboard-manager' to nil.");
- args[1] = CAR (CDR (err));
- Fmessage (2, args);
+ Fmessage (2, ((Lisp_Object [])
+ { build_local_string ("X clipboard manager error: %s\n\
+If the problem persists, set `x-select-enable-clipboard-manager' to nil."),
+ CAR (CDR (err)) }));
return Qnil;
}
local_frame = XCAR (XCDR (XCDR (XCDR (local_selection))));
if (FRAME_LIVE_P (XFRAME (local_frame)))
{
- Lisp_Object args[1];
- args[0] = build_string ("Saving clipboard to X clipboard manager...");
- Fmessage (1, args);
-
+ Fmessage (1, ((Lisp_Object [])
+ { build_local_string
+ ("Saving clipboard to X clipboard manager...") }));
internal_condition_case_1 (x_clipboard_manager_save, local_frame,
Qt, x_clipboard_manager_error_2);
}
if (dpyinfo->visual->class == PseudoColor)
{
Lisp_Object value;
- value = display_x_get_resource (dpyinfo,
- build_string ("privateColormap"),
- build_string ("PrivateColormap"),
- Qnil, Qnil);
+ value = display_x_get_resource
+ (dpyinfo, build_local_string ("privateColormap"),
+ build_local_string ("PrivateColormap"), Qnil, Qnil);
if (STRINGP (value)
&& (!strcmp (SSDATA (value), "true")
|| !strcmp (SSDATA (value), "on")))
/* See if we should run in synchronous mode. This is useful
for debugging X code. */
{
- Lisp_Object value;
- value = display_x_get_resource (dpyinfo,
- build_string ("synchronous"),
- build_string ("Synchronous"),
- Qnil, Qnil);
+ Lisp_Object value = display_x_get_resource
+ (dpyinfo, build_local_string ("synchronous"),
+ build_local_string ("Synchronous"), Qnil, Qnil);
if (STRINGP (value)
&& (!strcmp (SSDATA (value), "true")
|| !strcmp (SSDATA (value), "on")))
}
{
- Lisp_Object value;
- value = display_x_get_resource (dpyinfo,
- build_string ("useXIM"),
- build_string ("UseXIM"),
- Qnil, Qnil);
+ Lisp_Object value = display_x_get_resource
+ (dpyinfo, build_local_string ("useXIM"),
+ build_local_string ("UseXIM"), Qnil, Qnil);
#ifdef USE_XIM
if (STRINGP (value)
&& (!strcmp (SSDATA (value), "false")