aboutsummaryrefslogtreecommitdiffstats
path: root/doc/lispref
diff options
context:
space:
mode:
authorPaul Eggert2015-05-31 20:04:05 -0700
committerPaul Eggert2015-05-31 20:04:43 -0700
commit467af178f53798e4cd102e04eb2990121eb655df (patch)
tree1e6e2cec1eb87963ae796289ef9a1afdd060a668 /doc/lispref
parent21d13bce38c2160bf21b3428cd8e56daadcf4698 (diff)
downloademacs-467af178f53798e4cd102e04eb2990121eb655df.tar.gz
emacs-467af178f53798e4cd102e04eb2990121eb655df.zip
Treat batch stdout/stderr like standard display
Calls like (print FOO) could generate improperly encoded or hard-to-read output if FOO contains characters outside the system locale. Fix this by treating batch stdout and stderr like interactive standard display, when it comes to transliterating and encoding characters (Bug#20545). * doc/emacs/mule.texi (Communication Coding): * doc/lispref/display.texi (Active Display Table): * doc/lispref/nonascii.texi (Locales): * etc/NEWS: * src/coding.c (syms_of_coding): * src/dispnew.c (syms_of_display): Document this. * src/print.c: Include disptab.h. (printchar_to_stream): New function, with much of the guts of the old Fexternal_debugging_output, except this one also uses the standard display table. (printchar, strout, Fexternal_debugging_output): Use it.
Diffstat (limited to 'doc/lispref')
-rw-r--r--doc/lispref/display.texi5
-rw-r--r--doc/lispref/nonascii.texi1
2 files changed, 4 insertions, 2 deletions
diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi
index b12995be6ed..357a3c33fa3 100644
--- a/doc/lispref/display.texi
+++ b/doc/lispref/display.texi
@@ -6522,8 +6522,9 @@ no buffer display table.
6522@defvar standard-display-table 6522@defvar standard-display-table
6523The value of this variable is the standard display table, which is 6523The value of this variable is the standard display table, which is
6524used when Emacs is displaying a buffer in a window with neither a 6524used when Emacs is displaying a buffer in a window with neither a
6525window display table nor a buffer display table defined. Its default 6525window display table nor a buffer display table defined, or when Emacs
6526is @code{nil}. 6526is outputting text to the standard output or error streams. Its
6527default is @code{nil}.
6527@end defvar 6528@end defvar
6528 6529
6529The @file{disp-table} library defines several functions for changing 6530The @file{disp-table} library defines several functions for changing
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi
index f16018417de..362c3a4dcbb 100644
--- a/doc/lispref/nonascii.texi
+++ b/doc/lispref/nonascii.texi
@@ -1959,6 +1959,7 @@ how Emacs interacts with these features.
1959@cindex keyboard input decoding on X 1959@cindex keyboard input decoding on X
1960This variable specifies the coding system to use for decoding system 1960This variable specifies the coding system to use for decoding system
1961error messages and---on X Window system only---keyboard input, for 1961error messages and---on X Window system only---keyboard input, for
1962sending batch output to the standard output and error streams, for
1962encoding the format argument to @code{format-time-string}, and for 1963encoding the format argument to @code{format-time-string}, and for
1963decoding the return value of @code{format-time-string}. 1964decoding the return value of @code{format-time-string}.
1964@end defvar 1965@end defvar