From 7a698da0d04d75f1c49f9ae9f358070acab0f781 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 17 Sep 2022 16:15:17 +0200 Subject: read-print: Correctly support multiple same-named newline forms. Previously (home-environment (services ...)) would not be considered a "newline form". This fixes it. * guix/read-print.scm (newline-form?): Use 'vhash-foldq*' instead of 'vhash-assq' and iterate over candidates. * tests/read-print.scm: Add test. --- tests/read-print.scm | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/read-print.scm b/tests/read-print.scm index ca3f3193f7..ea52a52145 100644 --- a/tests/read-print.scm +++ b/tests/read-print.scm @@ -294,6 +294,11 @@ (define-syntax-rule (test-pretty-print/sequence str args ...) ;; page break above end)") +(test-pretty-print "\ +(home-environment + (services + (list (service-type home-bash-service-type))))") + (test-pretty-print/sequence "\ ;;; This is a top-level comment. -- cgit v1.2.3