From 6c343d0d0f6b8560e9eb594ce1d4f984753a35fb Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Mon, 9 Jan 2023 17:04:55 +0100 Subject: read-print: Do not use extended notation when printing '1+', '1-', etc. * guix/read-print.scm (%special-non-extended-symbols): New variable. (symbol->display-string): New procedure. (pretty-print-with-comments): Use it in lieu of 'string->symbol'. * tests/read-print.scm: Add test. --- tests/read-print.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/read-print.scm') diff --git a/tests/read-print.scm b/tests/read-print.scm index ea52a52145..79a4101be6 100644 --- a/tests/read-print.scm +++ b/tests/read-print.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2021-2022 Ludovic Courtès +;;; Copyright © 2021-2023 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -142,6 +142,11 @@ expressions." (+ x y))" #:max-width 11) +(test-pretty-print "\ +(begin + 1+ 1- 123/ 456* + (1+ 41))") + (test-pretty-print "\ (lambda (x y) ;; This is a procedure. -- cgit v1.2.3