diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-06-01 21:56:52 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-06-01 21:56:58 +0200 |
commit | b0d552ffe3e336606de907897181a0f0718b3149 (patch) | |
tree | f08d02b8bdead2106f1ca2377cd422f3694e3aa2 /module/vcomponent/output.scm | |
parent | Rename {terminal => vulgar}. (diff) | |
download | calp-b0d552ffe3e336606de907897181a0f0718b3149.tar.gz calp-b0d552ffe3e336606de907897181a0f0718b3149.tar.xz |
Reword terminal output to better modularization.
Diffstat (limited to 'module/vcomponent/output.scm')
-rw-r--r-- | module/vcomponent/output.scm | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/module/vcomponent/output.scm b/module/vcomponent/output.scm index db4d4f33..77ca2ffb 100644 --- a/module/vcomponent/output.scm +++ b/module/vcomponent/output.scm @@ -7,19 +7,7 @@ #:use-module (srfi srfi-26) #:use-module (ice-9 format) #:export (print-vcomponent - serialize-vcomponent - color-if - STR-YELLOW STR-RESET)) - -(define STR-YELLOW "\x1b[0;33m") -(define STR-RESET "\x1b[m") - -(define-syntax-rule (color-if pred color body ...) - (let ((pred-value pred)) - (format #f "~a~a~a" - (if pred-value color "") - (begin body ...) - (if pred-value STR-RESET "")))) + serialize-vcomponent)) (define* (print-vcomponent comp #:optional (port #t) #:key (descend? #t) (depth 0)) (let ((kvs (map (lambda (key) (cons key (attr* comp key))) |