• Paul Eggert's avatar
    format-message now curves ` and ' · 71781c31
    Paul Eggert authored
    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.
    71781c31
NEWS 48.8 KB