read-print: Properly indent ‘parameterize’.

Fixes <https://issues.guix.gnu.org/65427>.

* guix/read-print.scm (%special-forms): Add ‘parameterize’.
* tests/read-print.scm: Add test.

Reported-by: Maxime Devos <maximedevos@telenet.be>
Change-Id: I922bffc527ade539cf2eb304acb25bc9c705a459
This commit is contained in:
Ludovic Courtès 2023-11-22 16:32:33 +01:00
parent 9363ec208b
commit 2c5fb13a05
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5
2 changed files with 6 additions and 0 deletions

View file

@ -330,6 +330,7 @@ (define %special-forms
('add-after '(((modify-phases) . 3))) ('add-after '(((modify-phases) . 3)))
('add-before '(((modify-phases) . 3))) ('add-before '(((modify-phases) . 3)))
('replace '(((modify-phases) . 2))) ;different from 'modify-inputs' ('replace '(((modify-phases) . 2))) ;different from 'modify-inputs'
('parameterize 2)
('substitute* 2) ('substitute* 2)
('substitute-keyword-arguments 2) ('substitute-keyword-arguments 2)
('call-with-input-file 2) ('call-with-input-file 2)

View file

@ -173,6 +173,11 @@ (define-syntax-rule (test-pretty-print/sequence str args ...)
'odd) 'odd)
(else #f))") (else #f))")
(test-pretty-print "\
(parameterize ((a 1)
(b 2))
(call f g h))")
(test-pretty-print "\ (test-pretty-print "\
#~(string-append #$coreutils \"/bin/uname\")") #~(string-append #$coreutils \"/bin/uname\")")