diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2014-09-15 18:53:23 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2014-09-15 18:53:23 +0400 |
commit | edb0288b83b45d295df52ce7644e897613358971 (patch) | |
tree | 8f169c257e9752ca860764cc19ec232d287eb189 /src/minibuf.c | |
parent | 497daa12743ed71a70e41f966631d1c8856248cc (diff) | |
download | emacs-edb0288b83b45d295df52ce7644e897613358971.tar.gz |
If USE_LOCAL_ALLOCATORS, allocate some Lisp objects on stack.
* lisp.h (local_cons, local_list1, local_list2, local_list3)
[USE_LOCAL_ALLOCATORS]: New macros.
[!USE_LOCAL_ALLOCATORS]: Fall back to regular functions.
(build_local_string): Avoid argument name expansion clash with
make_local_string.
* alloc.c (toplevel)
[USE_LOCAL_ALLOCATORS && GC_MARK_STACK != GC_MAKE_GCPROS_NOOPS]:
Preprocessor guard to avoid impossible configuration.
* charset.c (Ffind_charset_region, Ffind_charset_string):
Use make_local_vector.
* lread.c (read1, substitute_object_recurse): Use scoped_cons.
* textprop.c (Fput_text_property, Fadd_face_text_property):
Use scoped_list2.
(copy_text_properties): Use local_cons and local_list3.
* chartab.c (uniprop_table):
* data.c (wrong_choice, wrong_range):
* doc.c (get_doc_string):
* editfns.c (format2):
* fileio.c (Fexpand_file_name, auto_save_error):
* fns.c (Fyes_or_no_p):
* font.c (font_parse_xlfd, font_parse_family_registry, font_add_log):
* fontset.c (Fset_fontset_font):
* keyboard.c (echo_add_key, echo_dash, parse_menu_item)
(read_char_minibuf_menu_prompt):
* keymap.c (silly_event_symbol_error, describe_vector):
* menu.c (single_menu_item):
* minibuf.c (Fread_buffer):
* process.c (status_message, Fformat_network_address)
(server_accept_connection): Use make_local_string and
build_local_string. Prefer compound literals where appropriate.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 93e19d5c120..b5e7e4cd76e 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -1123,7 +1123,7 @@ If `read-buffer-function' is non-nil, this works by calling it as a function, instead of the usual behavior. */) (Lisp_Object prompt, Lisp_Object def, Lisp_Object require_match) { - Lisp_Object args[4], result; + Lisp_Object result; char *s; ptrdiff_t len; ptrdiff_t count = SPECPDL_INDEX (); @@ -1157,10 +1157,9 @@ function, instead of the usual behavior. */) STRING_MULTIBYTE (prompt)); } - args[0] = build_string ("%s (default %s): "); - args[1] = prompt; - args[2] = CONSP (def) ? XCAR (def) : def; - prompt = Fformat (3, args); + prompt = Fformat (3, ((Lisp_Object []) + { build_local_string ("%s (default %s): "), + prompt, CONSP (def) ? XCAR (def) : def })); } result = Fcompleting_read (prompt, intern ("internal-complete-buffer"), @@ -1168,13 +1167,8 @@ function, instead of the usual behavior. */) Qbuffer_name_history, def, Qnil); } else - { - args[0] = Vread_buffer_function; - args[1] = prompt; - args[2] = def; - args[3] = require_match; - result = Ffuncall (4, args); - } + result = Ffuncall (4, ((Lisp_Object []) + { Vread_buffer_function, prompt, def, require_match })); return unbind_to (count, result); } |