diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-10-27 16:01:25 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2023-11-06 00:46:25 +0100 |
commit | f14c80e58da3dcb2fc1249256ff2324649dc9af5 (patch) | |
tree | d3024f7cc03e894e884c62d624140e080405f106 | |
parent | Fix some incorrect strings in documentation. (diff) | |
download | calp-f14c80e58da3dcb2fc1249256ff2324649dc9af5.tar.gz calp-f14c80e58da3dcb2fc1249256ff2324649dc9af5.tar.xz |
Remove unused 'color-if'.
-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)) |