[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#56898] [PATCH 02/13] read-print: Add System and Home special forms.
From: |
Ludovic Courtès |
Subject: |
[bug#56898] [PATCH 02/13] read-print: Add System and Home special forms. |
Date: |
Tue, 2 Aug 2022 23:44:08 +0200 |
* guix/read-print.scm (%special-forms): Add System and Home forms.
(%newline-forms): Add 'services'.
---
guix/read-print.scm | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
diff --git a/guix/read-print.scm b/guix/read-print.scm
index 69ab8ac8b3..949a713ca2 100644
--- a/guix/read-print.scm
+++ b/guix/read-print.scm
@@ -156,7 +156,6 @@ (define %special-forms
('unless 2)
('package 1)
('origin 1)
- ('operating-system 1)
('modify-inputs 2)
('modify-phases 2)
('add-after '(((modify-phases) . 3)))
@@ -167,7 +166,22 @@ (define %special-forms
('call-with-input-file 2)
('call-with-output-file 2)
('with-output-to-file 2)
- ('with-input-from-file 2)))
+ ('with-input-from-file 2)
+ ('with-directory-excursion 2)
+
+ ;; (gnu system) and (gnu services).
+ ('operating-system 1)
+ ('bootloader-configuration 1)
+ ('mapped-device 1)
+ ('file-system 1)
+ ('swap-space 1)
+ ('user-account 1)
+ ('user-group 1)
+ ('setuid-program 1)
+ ('modify-services 2)
+
+ ;; (gnu home).
+ ('home-environment 1)))
(define %newline-forms
;; List heads that must be followed by a newline. The second argument is
@@ -180,7 +194,11 @@ (define %newline-forms
('git-reference '(uri origin source))
('search-paths '(package))
('native-search-paths '(package))
- ('search-path-specification '())))
+ ('search-path-specification '())
+
+ ('services '(operating-system))
+ ('set-xorg-configuration '())
+ ('services '(home-environment))))
(define (prefix? candidate lst)
"Return true if CANDIDATE is a prefix of LST."
--
2.37.1
- [bug#56898] [PATCH 00/13] Put the pretty printer to good use, Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 01/13] style: Move reader and printer to (guix read-print)., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 02/13] read-print: Add System and Home special forms.,
Ludovic Courtès <=
- [bug#56898] [PATCH 03/13] read-print: Expose comment constructor., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 04/13] read-print: Introduce <blank> parent class of <comment>., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 07/13] read-print: Recognize page breaks., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 05/13] style: Adjust test to not emit blank lines., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 09/13] read-print: 'canonicalize-comment' leaves top-level comments unchanged., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 13/13] installer: Add comments and vertical space to the generated config., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 11/13] read-print: Support printing multi-line comments., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 08/13] read-print: Add code to read and write sequences of expressions/blanks., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 06/13] read-print: Read and render vertical space., Ludovic Courtès, 2022/08/02
- [bug#56898] [PATCH 10/13] style: Add '--whole-file' option., Ludovic Courtès, 2022/08/02