[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

05/08: ui: 'display-hint' preserves Texinfo formatting.

From: Ludovic Courtès
Subject: 05/08: ui: 'display-hint' preserves Texinfo formatting.
Date: Wed, 7 Mar 2018 05:22:49 -0500 (EST)

civodul pushed a commit to branch master
in repository guix.

commit 16de45557f782d23a87ae2fa394267d5826e834a
Author: Ludovic Courtès <address@hidden>
Date:   Wed Mar 7 10:53:16 2018 +0100

    ui: 'display-hint' preserves Texinfo formatting.
    The previous method would mess up with @example formatting, for
    * guix/ui.scm (display-hint): Parameterize '%text-width' instead of
    using 'fill-paragraph'.
 guix/ui.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/guix/ui.scm b/guix/ui.scm
index 5b87f1e..cb49a15 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -299,8 +299,10 @@ VARIABLE and return it, or #f if none was found."
   "Display MESSAGE, a l10n message possibly containing Texinfo markup, to
   (format port (G_ "hint: ~a~%")
-          (fill-paragraph (texi->plain-text message)
-                          (terminal-columns) 8)))
+          ;; XXX: We should arrange so that the initial indent is wider.
+          (parameterize ((%text-width (max 15
+                                           (- (terminal-columns) 5))))
+            (texi->plain-text message))))
 (define* (report-load-error file args #:optional frame)
   "Report the failure to load FILE, a user-provided Scheme file.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]