[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/pkg 671078f30f 1/2: print-test fixes
From: |
Gerd Moellmann |
Subject: |
feature/pkg 671078f30f 1/2: print-test fixes |
Date: |
Fri, 21 Oct 2022 07:34:57 -0400 (EDT) |
branch: feature/pkg
commit 671078f30f189d061e537cd5fda5a9e64fd487bf
Author: Gerd Möllmann <gerd@gnu.org>
Commit: Gerd Möllmann <gerd@gnu.org>
print-test fixes
* src/print.c (print_symbol): Fix printing of empty symbol names
to be compatible.
---
src/print.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/src/print.c b/src/print.c
index af23aade6f..3463d8ec5d 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2226,11 +2226,6 @@ print_symbol (Lisp_Object symbol, Lisp_Object
printcharfun,
{
if (!NILP (Vprint_gensym))
print_c_string ("#:", printcharfun);
- else if (*SDATA (name) == 0)
- {
- print_c_string ("##", printcharfun);
- return;
- }
}
else
{
@@ -2250,7 +2245,13 @@ print_symbol (Lisp_Object symbol, Lisp_Object
printcharfun,
}
}
- print_symbol_name (name, printcharfun, escape);
+ /* In Common Lisp, this would be ||, but we don't have multi-escapes
+ in Emacs, and we will probably never have them because '| has
+ been a valid symbol, and it is used, for instance in rx.el. */
+ if (SBYTES (name) == 0)
+ print_c_string ("##", printcharfun);
+ else
+ print_symbol_name (name, printcharfun, escape);
}