[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
09/11: ui: Delay use of (guix build syscalls).
From: |
guix-commits |
Subject: |
09/11: ui: Delay use of (guix build syscalls). |
Date: |
Mon, 15 Apr 2024 17:40:55 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit 657107cb90708aae8adadcba047b6e7eaf6b4cef
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Mon Apr 1 16:19:17 2024 +0200
ui: Delay use of (guix build syscalls).
This ensures (guix build syscalls) is loaded only when needed.
* guix/ui.scm (%text-width): Unconditionally alias ‘*line-width*’.
Remove initialization.
<top level>: Remove code for Guile < 2.2.7.
(package->recutils): Change default #:width to (terminal-columns).
Change-Id: I990a1b5b0f20a6243e47e314d1d3d4f8298b7151
---
guix/ui.scm | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index 34ff210930..d82fa533cc 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1473,23 +1473,9 @@ converted to a space; sequences of more than one line
break are preserved."
;;;
(define %text-width
- ;; '*line-width*' was introduced in Guile 2.2.7/3.0.1. On older versions of
- ;; Guile, monkey-patch 'wrap*' below.
- (if (defined? '*line-width*)
- (let ((parameter (fluid->parameter *line-width*)))
- (parameter (terminal-columns))
- parameter)
- (make-parameter (terminal-columns))))
-
-(unless (defined? '*line-width*) ;Guile < 2.2.7
- (set! (@@ (texinfo plain-text) wrap*)
- ;; XXX: Monkey patch this private procedure to let 'package->recutils'
- ;; parameterize the fill of description field correctly.
- (lambda strings
- (let ((indent (fluid-ref (@@ (texinfo plain-text) *indent*))))
- (fill-string (string-concatenate strings)
- #:line-width (%text-width) #:initial-indent indent
- #:subsequent-indent indent)))))
+ ;; '*line-width*' was introduced in Guile 2.2.7/3.0.1. Keep this alias for
+ ;; backward-compatibility and for convenience.
+ (fluid->parameter *line-width*))
(define (texi->plain-text str)
"Return a plain-text representation of texinfo fragment STR."
@@ -1535,7 +1521,7 @@ followed by \"+ \", which makes for a valid multi-line
field value in the
'()
str)))
-(define* (package->recutils p port #:optional (width (%text-width))
+(define* (package->recutils p port #:optional (width (terminal-columns))
#:key
(hyperlinks? (supports-hyperlinks? port))
(extra-fields '())
- branch master updated (a8353e9d6b -> 8a74bb8030), guix-commits, 2024/04/15
- 05/11: channels: Autoload (git …) modules., guix-commits, 2024/04/15
- 06/11: guix system: Autoload some more., guix-commits, 2024/04/15
- 11/11: Autoload (gcrypt hash)., guix-commits, 2024/04/15
- 10/11: Autoload (guix build syscalls)., guix-commits, 2024/04/15
- 01/11: channels: Use SRFI-71 instead of SRFI-11., guix-commits, 2024/04/15
- 03/11: channels: Move ‘commit-short-id’ to (guix git)., guix-commits, 2024/04/15
- 08/11: guix: Delay loading of (gnutls)., guix-commits, 2024/04/15
- 09/11: ui: Delay use of (guix build syscalls).,
guix-commits <=
- 02/11: git: Add ‘repository-info’ and use it in (guix channels)., guix-commits, 2024/04/15
- 07/11: utils: Don’t re-export ‘call-with-temporary-output-file’., guix-commits, 2024/04/15
- 04/11: git: Add ‘tag->commit’ and use it in (guix channels)., guix-commits, 2024/04/15