Simplifying docs.

This commit is contained in:
Alex Shinn 2014-07-29 22:00:39 +09:00
parent 07d2c8333b
commit 8d1250dc43

View file

@ -27,18 +27,6 @@
;;> \section{Library} ;;> \section{Library}
;;> \procedure{(black-escape)}
;;> \procedure{(red-escape)}
;;> \procedure{(green-escape)}
;;> \procedure{(yellow-escape)}
;;> \procedure{(blue-escape)}
;;> \procedure{(magenta-escape)}
;;> \procedure{(cyan-escape)}
;;> \procedure{(white-escape)}
;;>
;;> Return a string consisting of an ANSI escape code to select the
;;> specified text color.
(define black-escape (define black-escape
(make-simple-escape-procedure 30)) (make-simple-escape-procedure 30))
(define red-escape (define red-escape
@ -56,6 +44,10 @@
(define white-escape (define white-escape
(make-simple-escape-procedure 37)) (make-simple-escape-procedure 37))
;;> Return a string consisting of an ANSI escape code to select the
;;> specified text color.
;;/
;;> Return a string consisting of an ANSI escape code to select the ;;> Return a string consisting of an ANSI escape code to select the
;;> text color specified by the \var{red-level}, \var{green-level}, ;;> text color specified by the \var{red-level}, \var{green-level},
;;> and \var{blue-level} arguments, each of which must be an exact ;;> and \var{blue-level} arguments, each of which must be an exact
@ -90,29 +82,12 @@
(number->string (+ gray-level 232)) (number->string (+ gray-level 232))
"m")) "m"))
;;> \procedure{(reset-color-escape)}
;;>
;;> Return a string consisting of an ANSI escape code to select the ;;> Return a string consisting of an ANSI escape code to select the
;;> default text color. ;;> default text color.
(define reset-color-escape (define reset-color-escape
(make-simple-escape-procedure 39)) (make-simple-escape-procedure 39))
;;> \procedure{(black str)}
;;> \procedure{(red str)}
;;> \procedure{(green str)}
;;> \procedure{(yellow str)}
;;> \procedure{(blue str)}
;;> \procedure{(magenta str)}
;;> \procedure{(cyan str)}
;;> \procedure{(white str)}
;;>
;;> If ANSI escapes are enabled, return a string consisting of the
;;> string \var{str} with a prefix that selects specified text color
;;> and a suffix that selects the default text color.
;;>
;;> If ANSI escapes are not enabled, return \var{str}.
(define black (define black
(make-wrap-procedure (black-escape) (make-wrap-procedure (black-escape)
(reset-color-escape))) (reset-color-escape)))
@ -138,6 +113,13 @@
(make-wrap-procedure (white-escape) (make-wrap-procedure (white-escape)
(reset-color-escape))) (reset-color-escape)))
;;> If ANSI escapes are enabled, return a string consisting of the
;;> string \var{str} with a prefix that selects specified text color
;;> and a suffix that selects the default text color.
;;>
;;> If ANSI escapes are not enabled, return \var{str}.
;;/
;;> Returns a procedure which takes a single argument, a string, and ;;> Returns a procedure which takes a single argument, a string, and
;;> which when called behaves as follows. ;;> which when called behaves as follows.
;;> ;;>
@ -177,18 +159,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;> \procedure{(black-background-escape)}
;;> \procedure{(red-background-escape)}
;;> \procedure{(green-background-escape)}
;;> \procedure{(yellow-background-escape)}
;;> \procedure{(blue-background-escape)}
;;> \procedure{(magenta-background-escape)}
;;> \procedure{(cyan-background-escape)}
;;> \procedure{(white-background-escape)}
;;>
;;> Return a string consisting of an ANSI escape code to select the
;;> specified background color.
(define black-background-escape (define black-background-escape
(make-simple-escape-procedure 40)) (make-simple-escape-procedure 40))
(define red-background-escape (define red-background-escape
@ -206,6 +176,10 @@
(define white-background-escape (define white-background-escape
(make-simple-escape-procedure 47)) (make-simple-escape-procedure 47))
;;> Return a string consisting of an ANSI escape code to select the
;;> specified background color.
;;/
;;> Return a string consisting of an ANSI escape code to select the ;;> Return a string consisting of an ANSI escape code to select the
;;> background color specified by the \var{red-level}, \var{green-level}, ;;> background color specified by the \var{red-level}, \var{green-level},
;;> and \var{blue-level} arguments, each of which must be an exact ;;> and \var{blue-level} arguments, each of which must be an exact
@ -248,21 +222,6 @@
(define reset-background-color-escape (define reset-background-color-escape
(make-simple-escape-procedure 49)) (make-simple-escape-procedure 49))
;;> \procedure{(black-background str)}
;;> \procedure{(red-background str)}
;;> \procedure{(green-background str)}
;;> \procedure{(yellow-background str)}
;;> \procedure{(blue-background str)}
;;> \procedure{(magenta-background str)}
;;> \procedure{(cyan-background str)}
;;> \procedure{(white-background str)}
;;>
;;> If ANSI escapes are enabled, return a string consisting of the
;;> string \var{str} with a prefix that selects specified background
;;> color and a suffix that selects the default background color.
;;>
;;> If ANSI escapes are not enabled, return \var{str}.
(define black-background (define black-background
(make-wrap-procedure (black-background-escape) (make-wrap-procedure (black-background-escape)
(reset-background-color-escape))) (reset-background-color-escape)))
@ -288,6 +247,13 @@
(make-wrap-procedure (white-background-escape) (make-wrap-procedure (white-background-escape)
(reset-background-color-escape))) (reset-background-color-escape)))
;;> If ANSI escapes are enabled, return a string consisting of the
;;> string \var{str} with a prefix that selects specified background
;;> color and a suffix that selects the default background color.
;;>
;;> If ANSI escapes are not enabled, return \var{str}.
;;/
;;> Returns a procedure which takes a single argument, a string, and ;;> Returns a procedure which takes a single argument, a string, and
;;> which when called behaves as follows. ;;> which when called behaves as follows.
;;> ;;>
@ -327,24 +293,18 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;> \procedure{(bold-escape)}
;;>
;;> Return a string consisting of an ANSI escape code to select bold ;;> Return a string consisting of an ANSI escape code to select bold
;;> style. ;;> style.
(define bold-escape (define bold-escape
(make-simple-escape-procedure 1)) (make-simple-escape-procedure 1))
;;> \procedure{(reset-bold-escape)}
;;>
;;> Return a string consisting of an ANSI escape code to select non-bold ;;> Return a string consisting of an ANSI escape code to select non-bold
;;> style. ;;> style.
(define reset-bold-escape (define reset-bold-escape
(make-simple-escape-procedure 22)) (make-simple-escape-procedure 22))
;;> \procedure{(bold str)}
;;>
;;> If ANSI escapes are enabled, return a string consisting of the ;;> If ANSI escapes are enabled, return a string consisting of the
;;> string \var{str} with a prefix that selects bold style and a suffix ;;> string \var{str} with a prefix that selects bold style and a suffix
;;> that selects non-bold style. ;;> that selects non-bold style.
@ -356,24 +316,18 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;> \procedure{(underline-escape)}
;;>
;;> Return a string consisting of an ANSI escape code to select ;;> Return a string consisting of an ANSI escape code to select
;;> underlined style. ;;> underlined style.
(define underline-escape (define underline-escape
(make-simple-escape-procedure 4)) (make-simple-escape-procedure 4))
;;> \procedure{(reset-underline-escape)}
;;>
;;> Return a string consisting of an ANSI escape code to select ;;> Return a string consisting of an ANSI escape code to select
;;> non-underlined style. ;;> non-underlined style.
(define reset-underline-escape (define reset-underline-escape
(make-simple-escape-procedure 24)) (make-simple-escape-procedure 24))
;;> \procedure{(underline str)}
;;>
;;> If ANSI escapes are enabled, return a string consisting of the ;;> If ANSI escapes are enabled, return a string consisting of the
;;> string \var{str} with a prefix that selects underlined style and ;;> string \var{str} with a prefix that selects underlined style and
;;> a suffix that selects non-underlined style. ;;> a suffix that selects non-underlined style.
@ -385,8 +339,6 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;> \procedure{(negative-escape)}
;;>
;;> Return a string consisting of an ANSI escape code to select negative ;;> Return a string consisting of an ANSI escape code to select negative
;;> style (text in the background color and background in the text ;;> style (text in the background color and background in the text
;;> color). ;;> color).
@ -394,8 +346,6 @@
(define negative-escape (define negative-escape
(make-simple-escape-procedure 7)) (make-simple-escape-procedure 7))
;;> \procedure{(reset-negative-escape)}
;;>
;;> Return a string consisting of an ANSI escape code to select positive ;;> Return a string consisting of an ANSI escape code to select positive
;;> style (text in the text color and background in the background ;;> style (text in the text color and background in the background
;;> color). ;;> color).
@ -403,8 +353,6 @@
(define reset-negative-escape (define reset-negative-escape
(make-simple-escape-procedure 27)) (make-simple-escape-procedure 27))
;;> \procedure{(negative str)}
;;>
;;> If ANSI escapes are enabled, return a string consisting of the ;;> If ANSI escapes are enabled, return a string consisting of the
;;> string \var{str} with a prefix that selects negative style (text ;;> string \var{str} with a prefix that selects negative style (text
;;> in the background color and background in the text color) and a ;;> in the background color and background in the text color) and a