summaryrefslogtreecommitdiff
path: root/src/callint.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-08-25 18:41:31 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2015-08-25 19:00:20 -0700
commit71781c31a4860e56434643296eaa303ca43386bb (patch)
tree271e4e378ac38caa3212d8e2025186715b5e1802 /src/callint.c
parentef4c2eac6c6e1df8f40efde52d737d911cf2dcf9 (diff)
downloademacs-71781c31a4860e56434643296eaa303ca43386bb.tar.gz
format-message now curves ` and '
That way, the caller doesn’t have to use curved quotes to get diagnostics that match the text-quoting-style preferences. Suggested by Dmitry Gutov in: http://lists.gnu.org/archive/html/emacs-devel/2015-08/msg00893.html This means we no longer need %qs, so remove that format. While we’re at it, fix an unlikely bug and lessen the pressure on the garbage collector by processing the string once rather than twice in the usual case. * doc/lispref/strings.texi (Formatting Strings): * etc/NEWS: Document this. * lisp/subr.el (format-message): Remove; now done in C. * src/callint.c (Fcall_interactively): * src/editfns.c (Fmessage, Fmessage_box): Use Fformat_message instead of Finternal__text_restyle followed by Fformat. * src/doc.c (LSQM, RSQM): Remove; all uses changed to use uLSQM and uRSQM. (Fsubstitute_command_keys): Prefer AUTO_STRING to build_string when pure ASCII now suffices. Fix unlikely bug when parsing unibyte string containing non-ASCII bytes. Use inline code rather than memcpy, as it’s a tiny number of bytes. (Finternal__text_restyle): Remove; no longer used. (syms_of_doc): Don’t declare it. * src/editfns.c (Fformat): Rewrite in terms of new function ‘styled_format’. (Fformat_message): New function, moved here from subr.el. (styled_format): New function, with the old guts of Fformat, except it now optionally transliterates quotes, and it transliterates traditional grave accent and apostrophe quoting as well. Remove recently-added q flag; no longer needed or used. (syms_of_editfns): Define format-message. * src/lisp.h (uLSQM0, uLSQM1, uLSQM2, uRSQM0, uRSQM1, uRSQM2): Remove; no longer need to be global symbols. * src/xdisp.c (vadd_to_log): Use Fformat_message, not Fformat, so that callers can use `%s'. * src/image.c (image_size_error, xbm_load_image, xbm_load) (xpm_load, pbm_load, png_load_body, jpeg_load_body, tiff_load) (gif_load, imagemagick_load_image, imagemagick_load, svg_load) (svg_load_image, gs_load, x_kill_gs_process): * src/lread.c (load_warn_old_style_backquotes): * src/xfaces.c (load_pixmap): * src/xselect.c (x_clipboard_manager_error_1): Use `%s' instead of %qs in formats.
Diffstat (limited to 'src/callint.c')
-rw-r--r--src/callint.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/callint.c b/src/callint.c
index be0fb1a84df..e39f4dff2e4 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -511,9 +511,8 @@ invoke it. If KEYS is omitted or nil, the return value of
for (i = 2; *tem; i++)
{
visargs[1] = make_string (tem + 1, strcspn (tem + 1, "\n"));
- visargs[1] = Finternal__text_restyle (visargs[1]);
if (strchr (SSDATA (visargs[1]), '%'))
- callint_message = Fformat (i - 1, visargs + 1);
+ callint_message = Fformat_message (i - 1, visargs + 1);
else
callint_message = visargs[1];