From 6f037f427a25160168e842bff0d12b816d69067d Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Fri, 11 May 2018 13:44:46 -0400 Subject: 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) : 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. --- doc/lispref/streams.texi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'doc/lispref/streams.texi') 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 -- cgit v1.2.1