From ec0959f516842b44cc041b3ee7de62d2ebb9ba42 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerd=20M=C3=B6llmann?= Date: Fri, 21 Oct 2022 13:32:55 +0200 Subject: [PATCH] print-tests failure for esoteric symbols * src/print.c (print_symbol_name): Fix printing of symbols that look like numbers. --- src/print.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/print.c b/src/print.c index 3463d8ec5de..f909c3c8cc2 100644 --- a/src/print.c +++ b/src/print.c @@ -2198,13 +2198,17 @@ static void print_symbol_name (Lisp_Object name, Lisp_Object printcharfun, bool escape) { - const bool like_number_p = looks_like_number_p (name); + bool like_number_p = looks_like_number_p (name); for (ptrdiff_t ibyte = 0, ichar = 0; ibyte < SBYTES (name);) { const int c = fetch_string_char_advance (name, &ichar, &ibyte); maybe_quit (); - if (escape && (like_number_p || must_escape_p (c, ichar))) - printchar ('\\', printcharfun); + if (escape) + if (like_number_p || must_escape_p (c, ichar)) + { + printchar ('\\', printcharfun); + like_number_p = false; + } printchar (c, printcharfun); } } -- 2.39.2