diff options
-rw-r--r-- | doc/ref/vulgar/color.texi | 6 | ||||
-rw-r--r-- | module/vulgar/color.scm | 9 |
2 files changed, 1 insertions, 14 deletions
diff --git a/doc/ref/vulgar/color.texi b/doc/ref/vulgar/color.texi index 611f4c54..a9114466 100644 --- a/doc/ref/vulgar/color.texi +++ b/doc/ref/vulgar/color.texi @@ -5,12 +5,6 @@ ANSI escape sequence for removing all current formatting, as a string. @end defvar -@defmac color-if predicate color body ... -@code{(begin body ...)} is run, coloring it's return value using the -ANSI escape sequence @var{color}, if @var{predicate} is true, and -uncolored otherwise. -@end defmac - @defun color-escape n Generates an RGB color escape code. @var{n} can either be @code{#f}, in which case the empty string is returned, or a a 24 bit color code diff --git a/module/vulgar/color.scm b/module/vulgar/color.scm index 91bd977f..bf6959be 100644 --- a/module/vulgar/color.scm +++ b/module/vulgar/color.scm @@ -1,15 +1,8 @@ (define-module (vulgar color) - :export (color-if color-escape)) + :export (color-escape)) (define-public 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 "")))) - (define (color-escape n) (cond ((not n) "") ((char=? #\# (string-ref n 0)) |