diff options
| author | Paul Eggert | 2015-05-31 20:04:05 -0700 |
|---|---|---|
| committer | Paul Eggert | 2015-05-31 20:04:43 -0700 |
| commit | 467af178f53798e4cd102e04eb2990121eb655df (patch) | |
| tree | 1e6e2cec1eb87963ae796289ef9a1afdd060a668 /doc/lispref | |
| parent | 21d13bce38c2160bf21b3428cd8e56daadcf4698 (diff) | |
| download | emacs-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.texi | 5 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 1 |
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 |
| 6523 | The value of this variable is the standard display table, which is | 6523 | The value of this variable is the standard display table, which is |
| 6524 | used when Emacs is displaying a buffer in a window with neither a | 6524 | used when Emacs is displaying a buffer in a window with neither a |
| 6525 | window display table nor a buffer display table defined. Its default | 6525 | window display table nor a buffer display table defined, or when Emacs |
| 6526 | is @code{nil}. | 6526 | is outputting text to the standard output or error streams. Its |
| 6527 | default is @code{nil}. | ||
| 6527 | @end defvar | 6528 | @end defvar |
| 6528 | 6529 | ||
| 6529 | The @file{disp-table} library defines several functions for changing | 6530 | The @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 |
| 1960 | This variable specifies the coding system to use for decoding system | 1960 | This variable specifies the coding system to use for decoding system |
| 1961 | error messages and---on X Window system only---keyboard input, for | 1961 | error messages and---on X Window system only---keyboard input, for |
| 1962 | sending batch output to the standard output and error streams, for | ||
| 1962 | encoding the format argument to @code{format-time-string}, and for | 1963 | encoding the format argument to @code{format-time-string}, and for |
| 1963 | decoding the return value of @code{format-time-string}. | 1964 | decoding the return value of @code{format-time-string}. |
| 1964 | @end defvar | 1965 | @end defvar |