diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-09 16:02:27 +0400 |
---|---|---|
committer | Dmitry Antipov <dmantipov@yandex.ru> | 2012-07-09 16:02:27 +0400 |
commit | a8290ec31c89dfdec85fc9d46000c66c0caa1697 (patch) | |
tree | a1fcee6481bc8ef358abdeec12a15fcfd9c53649 /src/minibuf.c | |
parent | 27505cf5e4d61283be5368cfd200c942dded0c79 (diff) | |
download | emacs-a8290ec31c89dfdec85fc9d46000c66c0caa1697.tar.gz |
Use make_formatted_string to avoid double length calculation.
* lisp.h (make_formatted_string): New prototype.
* alloc.c (make_formatted_string): New function.
* buffer.c (Fgenerate_new_buffer_name): Use it.
* dbus.c (syms_of_dbusbind): Likewise.
* editfns.c (Fcurrent_time_zone): Likewise.
* filelock.c (get_boot_time): Likewise.
* frame.c (make_terminal_frame, set_term_frame_name)
(x_report_frame_params): Likewise.
* image.c (gs_load): Likewise.
* minibuf.c (get_minibuffer): Likewise.
* msdos.c (dos_set_window_size): Likewise.
* process.c (make_process): Likewise.
* xdisp.c (ensure_echo_area_buffers): Likewise.
* xsettings.c (apply_xft_settings): Likewise.
Diffstat (limited to 'src/minibuf.c')
-rw-r--r-- | src/minibuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/minibuf.c b/src/minibuf.c index 89390aeb0b5..acf57a73268 100644 --- a/src/minibuf.c +++ b/src/minibuf.c @@ -792,8 +792,8 @@ get_minibuffer (EMACS_INT depth) buf = Fcar (tail); if (NILP (buf) || NILP (BVAR (XBUFFER (buf), name))) { - sprintf (name, " *Minibuf-%"pI"d*", depth); - buf = Fget_buffer_create (build_string (name)); + buf = Fget_buffer_create + (make_formatted_string (name, " *Minibuf-%"pI"d*", depth)); /* Although the buffer's name starts with a space, undo should be enabled in it. */ |