From 2c656f7deb3b192a5063151368782c2715e81051 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 31 May 2015 23:52:09 -0700 Subject: Avoid grave accent quoting in stderr diagnostics A few Emacs diagnostics go directly to stderr, and so can't easily contain curved quotes (as non-UTF-8 locales might mishandle them). Instead of bothering to add support for this rarity, reword the diagnostics so that they don't use grave accent to quote. * src/alloc.c (mark_memory): Fix comment. * src/buffer.c (init_buffer): * src/dispnew.c (init_display): * src/emacs.c (main, sort_args): * src/lread.c (dir_warning): * src/term.c (init_tty): * src/unexmacosx.c (unexec): * src/xfns.c (select_visual): * src/xterm.c (cvt_string_to_pixel, x_io_error_quitter): Reword stderr diagnostics to avoid quoting `like this'. * src/unexmacosx.c: Include errno.h. * src/xfns.c (select_visual): Encode value for locale. --- src/unexmacosx.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/unexmacosx.c') diff --git a/src/unexmacosx.c b/src/unexmacosx.c index fe6637e2ef5..319ec7956e5 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -99,6 +99,7 @@ along with GNU Emacs. If not, see . */ #include "unexec.h" #include "lisp.h" +#include #include #include #include @@ -1264,14 +1265,14 @@ unexec (const char *outfile, const char *infile) infd = emacs_open (infile, O_RDONLY, 0); if (infd < 0) { - unexec_error ("cannot open input file `%s'", infile); + unexec_error ("%s: %s", infile, strerror (errno)); } outfd = emacs_open (outfile, O_WRONLY | O_TRUNC | O_CREAT, 0777); if (outfd < 0) { emacs_close (infd); - unexec_error ("cannot open output file `%s'", outfile); + unexec_error ("%s: %s", outfile, strerror (errno)); } build_region_list (); -- cgit v1.2.1