[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/13: read-print: Be more mindful of horizontal space in packages.
From: |
guix-commits |
Subject: |
03/13: read-print: Be more mindful of horizontal space in packages. |
Date: |
Wed, 27 Sep 2023 18:47:00 -0400 (EDT) |
nckx pushed a commit to branch master
in repository guix.
commit 974b04ab8063382f3a91b0cf5e46bac6e0238672
Author: Tobias Geerinckx-Rice <me@tobias.gr>
AuthorDate: Sun Sep 24 02:00:00 2023 +0200
read-print: Be more mindful of horizontal space in packages.
Perhaps due to their staged nature, packages tend to be ‘lopsided’: deeply
nested, with the most elaborate code on the {build,right-hand-,in}side, in
snippets and phases.
When we indent outer forms too eagerly, we can easily run short on
columns by the time we get to the build code, reducing readability. A
few strategically-placed newlines early on can make a big difference.
* guix/read-print.scm (%newline-forms): Add a newline after opening a
<package> source field or an argument list. Compensate by removing the
base32 special case, which is now unnecessary.
---
guix/read-print.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/guix/read-print.scm b/guix/read-print.scm
index 25be289d60..7faad82c94 100644
--- a/guix/read-print.scm
+++ b/guix/read-print.scm
@@ -359,10 +359,11 @@ expressions and blanks that were read."
;; the context in which they must appear. This is similar to a special form
;; of 1, except that indent is 1 instead of 2 columns.
(vhashq
- ('arguments '(package))
- ('sha256 '(origin source package))
- ('base32 '(sha256 origin))
+ ('source '(package))
('git-reference '(uri origin source))
+ ('sha256 '(origin source package))
+ ('arguments '(package))
+ ('list '(arguments package))
('search-paths '(package))
('native-search-paths '(package))
('search-path-specification '())
- 10/13: gnu: minicom: Update package style., (continued)
- 10/13: gnu: minicom: Update package style., guix-commits, 2023/09/27
- 12/13: gnu: rizin: Edit synopsis., guix-commits, 2023/09/27
- 06/13: gnu: astyle: Use G-expressions., guix-commits, 2023/09/27
- 13/13: gnu: 7kaa: Update to 2.15.6., guix-commits, 2023/09/27
- 11/13: gnu: rizin: Update to 0.6.2., guix-commits, 2023/09/27
- 02/13: gnu: nmrpflash: Use G-expressions., guix-commits, 2023/09/27
- 09/13: gnu: minicom: Update to 2.9., guix-commits, 2023/09/27
- 05/13: gnu: astyle: Omit static libraries., guix-commits, 2023/09/27
- 07/13: gnu: astyle: Don't build static or debug libraries., guix-commits, 2023/09/27
- 04/13: gnu: astyle: Update to 3.4.8., guix-commits, 2023/09/27
- 03/13: read-print: Be more mindful of horizontal space in packages.,
guix-commits <=
- 01/13: gnu: nmrpflash: Update to 0.9.21., guix-commits, 2023/09/27