From 2c5fb13a0504df593b64c416d952df90fb4a5f3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 22 Nov 2023 16:32:33 +0100 Subject: [PATCH] =?UTF-8?q?read-print:=20Properly=20indent=20=E2=80=98para?= =?UTF-8?q?meterize=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes . * guix/read-print.scm (%special-forms): Add ‘parameterize’. * tests/read-print.scm: Add test. Reported-by: Maxime Devos Change-Id: I922bffc527ade539cf2eb304acb25bc9c705a459 --- guix/read-print.scm | 1 + tests/read-print.scm | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/guix/read-print.scm b/guix/read-print.scm index 7faad82c94..690f5dacdd 100644 --- a/guix/read-print.scm +++ b/guix/read-print.scm @@ -330,6 +330,7 @@ (define %special-forms ('add-after '(((modify-phases) . 3))) ('add-before '(((modify-phases) . 3))) ('replace '(((modify-phases) . 2))) ;different from 'modify-inputs' + ('parameterize 2) ('substitute* 2) ('substitute-keyword-arguments 2) ('call-with-input-file 2) diff --git a/tests/read-print.scm b/tests/read-print.scm index c8b8eb73fe..c1006a8a68 100644 --- a/tests/read-print.scm +++ b/tests/read-print.scm @@ -173,6 +173,11 @@ (define-syntax-rule (test-pretty-print/sequence str args ...) 'odd) (else #f))") +(test-pretty-print "\ +(parameterize ((a 1) + (b 2)) + (call f g h))") + (test-pretty-print "\ #~(string-append #$coreutils \"/bin/uname\")")