summaryrefslogtreecommitdiff
path: root/guix/ui.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2019-04-14 19:48:19 +0200
committerLudovic Courtès <ludo@gnu.org>2019-04-14 23:40:52 +0200
commitc1c5d68a94e219d0e56d5dc0e0d6ed9b08076a30 (patch)
tree52906eba28ea4b35a11976aa65968fabc597bb81 /guix/ui.scm
parenta5c72da46c302511ef77f02ed9725e701ab82687 (diff)
downloadpatches-c1c5d68a94e219d0e56d5dc0e0d6ed9b08076a30.tar
patches-c1c5d68a94e219d0e56d5dc0e0d6ed9b08076a30.tar.gz
colors: Add 'highlight'.
* guix/colors.scm (%highlight-color): New variable. (highlight): New procedure. * guix/ui.scm (%highlight-argument)[highlight]: Remove. (%highlight-color): Remove.
Diffstat (limited to 'guix/ui.scm')
-rw-r--r--guix/ui.scm11
1 files changed, 2 insertions, 9 deletions
diff --git a/guix/ui.scm b/guix/ui.scm
index 2481a1b78b..39b13fd4bc 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -155,16 +155,10 @@ is a trivial format string."
(define* (%highlight-argument arg #:optional (port (guix-warning-port)))
"Highlight ARG, a format string argument, if PORT supports colors."
- (define highlight
- (if (color-output? port)
- (lambda (str)
- (colorize-string str %highlight-color))
- identity))
-
(cond ((string? arg)
- (highlight arg))
+ (highlight arg port))
((symbol? arg)
- (highlight (symbol->string arg)))
+ (highlight (symbol->string arg) port))
(else arg)))
(define-syntax define-diagnostic
@@ -220,7 +214,6 @@ messages."
(define %info-color (color BOLD))
(define %error-color (color BOLD RED))
(define %hint-color (color BOLD CYAN))
-(define %highlight-color (color BOLD))
(define* (print-diagnostic-prefix prefix #:optional location
#:key (colors (color)))