summaryrefslogtreecommitdiff
path: root/doc/lispref/streams.texi
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2018-05-11 13:44:46 -0400
committerNoam Postavsky <npostavs@gmail.com>2018-05-23 07:53:58 -0400
commit6f037f427a25160168e842bff0d12b816d69067d (patch)
treefdcb0290e8f9e1a957ffab079b1f4d2f9bfdeb34 /doc/lispref/streams.texi
parent0d224e82411d9471f03fc339890d6a2952b5e239 (diff)
downloademacs-6f037f427a25160168e842bff0d12b816d69067d.tar.gz
Honor print-charset-text-property value of nil (Bug#31376)
* src/print.c (print_check_string_charset_prop): Move check for nil Vprint_charset_text_property from here... (print_prune_string_charset): ... to here. (syms_of_print) <print-charset-text-property>: Clarify that any non-boolean values are treated the same as `default'. * doc/lispref/streams.texi (Output Variables): Add print-prune-string-charset. * test/src/print-tests.el (print-charset-text-property-nil) (print-charset-text-property-default) (print-charset-text-property-t): New tests. (print-tests--prints-with-charset-p): New helper function.
Diffstat (limited to 'doc/lispref/streams.texi')
-rw-r--r--doc/lispref/streams.texi15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi
index ebd806601ef..032669cb102 100644
--- a/doc/lispref/streams.texi
+++ b/doc/lispref/streams.texi
@@ -809,6 +809,21 @@ when the output stream is a unibyte buffer or a marker pointing into
one.
@end defvar
+@defvar print-charset-text-property
+This variable controls printing of `charset' text property on printing
+a string. The value should be @code{nil}, @code{t}, or
+@code{default}.
+
+If the value is @code{nil}, @code{charset} text properties are never
+printed. If @code{t}, they are always printed.
+
+If the value is @code{default}, only print @code{charset} text
+properties if there is an ``unexpected'' @code{charset} property. For
+ascii characters, all charsets are considered ``expected''.
+Otherwise, the expected @code{charset} property of a character is
+given by @code{char-charset}.
+@end defvar
+
@defvar print-length
@cindex printing limits
The value of this variable is the maximum number of elements to print in