mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-25 05:48:07 -05:00
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
This commit is contained in:
parent
44de6d3990
commit
657107cb90
1 changed files with 4 additions and 18 deletions
22
guix/ui.scm
22
guix/ui.scm
|
@ -1473,23 +1473,9 @@ (define (maybe-break chr result)
|
|||
;;;
|
||||
|
||||
(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 @@ (define (string->recutils str)
|
|||
'()
|
||||
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 '())
|
||||
|
|
Loading…
Reference in a new issue