From: Gerd Möllmann Date: Fri, 21 Oct 2022 11:32:55 +0000 (+0200) Subject: print-tests failure for esoteric symbols X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=ec0959f516842b44cc041b3ee7de62d2ebb9ba42;p=emacs.git print-tests failure for esoteric symbols * src/print.c (print_symbol_name): Fix printing of symbols that look like numbers. --- 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); } }