diff options
| author | Paul Eggert | 2015-05-30 11:17:56 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-05-30 11:19:31 -0700 |
| commit | 75f8653bfe0da39acca9dbcb8b021ad033ac6ae9 (patch) | |
| tree | 13d34ab47fac65374d374a7ea8e9d9b220b16f3f /src/alloc.c | |
| parent | 85aa6ede9fe1b8165a99a4046dd8262ec93a02d5 (diff) | |
| download | emacs-75f8653bfe0da39acca9dbcb8b021ad033ac6ae9.tar.gz emacs-75f8653bfe0da39acca9dbcb8b021ad033ac6ae9.zip | |
Don't misencode C-generated messages
Also, be more consistent about calls to 'Fmessage' vs 'message'.
* src/alloc.c (Fgc_status):
Prefer AUTO_STRING to build_string for Fmessage call.
* src/data.c (Fmake_variable_buffer_local)
(Fmake_local_variable, Fmake_variable_frame_local):
* src/doc.c (store_function_docstring):
Use Fmessage, not message, since the argument can contain
non-ASCII characters, and this can cause the resulting message
to be incorrectly encoded for the current environment.
* src/fns.c (maybe_resize_hash_table):
* src/xselect.c (x_clipboard_manager_save_all):
Use message, not Fmessage, since Fmessage's power isn't needed here.
* src/process.c (Fmake_network_process): Reword message to avoid %s.
* src/xdisp.c (vmessage): Document restrictions on message contents.
(message_nolog) [false]: Remove unused code.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/alloc.c b/src/alloc.c index 030c6e06ba8..14baf291bd8 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -4542,9 +4542,9 @@ DEFUN ("gc-status", Fgc_status, Sgc_status, 0, 0, "", | |||
| 4542 | Lisp_Object zombie_list = Qnil; | 4542 | Lisp_Object zombie_list = Qnil; |
| 4543 | for (int i = 0; i < min (MAX_ZOMBIES, nzombies); i++) | 4543 | for (int i = 0; i < min (MAX_ZOMBIES, nzombies); i++) |
| 4544 | zombie_list = Fcons (zombies[i], zombie_list); | 4544 | zombie_list = Fcons (zombies[i], zombie_list); |
| 4545 | return CALLN (Fmessage, | 4545 | AUTO_STRING (format, ("%d GCs, avg live/zombies = %.2f/%.2f (%f%%)," |
| 4546 | build_string ("%d GCs, avg live/zombies = %.2f/%.2f" | 4546 | " max %d/%d\nzombies: %S")); |
| 4547 | " (%f%%), max %d/%d\nzombies: %S"), | 4547 | return CALLN (Fmessage, format, |
| 4548 | make_number (ngcs), make_float (avg_live), | 4548 | make_number (ngcs), make_float (avg_live), |
| 4549 | make_float (avg_zombies), | 4549 | make_float (avg_zombies), |
| 4550 | make_float (avg_zombies / avg_live / 100), | 4550 | make_float (avg_zombies / avg_live / 100), |