From 4cea5d48a772870df40f7d33fc0a87cdcfc9bbc1 Mon Sep 17 00:00:00 2001 From: Thuna Date: Sat, 3 Aug 2024 03:17:49 +0200 Subject: [PATCH] Print list terminating backquote and comma forms specially * src/print.c (print_object): When `print-quoted' is non-nil print a list-terminating (\` obj) as though it terminates the list with a " . " --- src/print.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/print.c b/src/print.c index 256f19aeb90..d654ab76799 100644 --- a/src/print.c +++ b/src/print.c @@ -2656,7 +2656,13 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag) --print_depth; goto next_obj; } - else if (CONSP (next)) + else if (CONSP (next) + && !(print_quoted + && (EQ (Qbackquote, XCAR (next)) + || EQ (Qcomma, XCAR (next)) + || EQ (Qcomma_at, XCAR (next))) + && CONSP (XCDR (next)) + && NILP (XCDR (XCDR (next))))) { if (!NILP (Vprint_circle)) { -- 2.44.2