summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--guix/read-print.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/guix/read-print.scm b/guix/read-print.scm
index 1f7902c546..e8caa2cfef 100644
--- a/guix/read-print.scm
+++ b/guix/read-print.scm
@@ -604,7 +604,13 @@ FORMAT-VERTICAL-SPACE; a useful value of 'canonicalize-vertical-space'."
(display (make-string indent #\space) port))
(let ((column (if newline? indent column)))
(print tail
- (keyword? item) ;keep #:key value next to one another
+ (and (keyword? item) ;keep #:key VALUE next to one another
+ ;; An exception to which is a G-expression immediately
+ ;; following a package argument such as #:phases.
+ (match tail
+ ((('gexp . _) . _)
+ (not (prefix? '(list arguments package) context)))
+ (_ #t)))
(blank? item)
(loop indent column
(or newline? delimited?)