aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLudovic Courtès2008-10-09 23:50:53 +0200
committerLudovic Courtès2008-10-09 23:50:53 +0200
commite5d47bade42f49e744c67f3c05b6885abb14df08 (patch)
tree208f3b07a2ce171f09b13fe2ba20e988263ddd1c /src
parent6947c9f728597380990aebc4ae51156f8513339d (diff)
downloadskribilo-e5d47bade42f49e744c67f3c05b6885abb14df08.tar.gz
skribilo-e5d47bade42f49e744c67f3c05b6885abb14df08.tar.lz
skribilo-e5d47bade42f49e744c67f3c05b6885abb14df08.zip
justify: Remove unused bindings.
* src/guile/skribilo/utils/justify.scm (*justifiers*, pre-output, post-output, strtok, my-string-append): Remove. (tokens-justify)[reverse-line]: Remove. (tokens-justify): Use `string-concatenate' instead of `apply string-append'.
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/utils/justify.scm44
1 files changed, 8 insertions, 36 deletions
diff --git a/src/guile/skribilo/utils/justify.scm b/src/guile/skribilo/utils/justify.scm
index 969cd30..de9bbda 100644
--- a/src/guile/skribilo/utils/justify.scm
+++ b/src/guile/skribilo/utils/justify.scm
@@ -20,6 +20,7 @@
;;; USA.
(define-module (skribilo utils justify)
+ :use-module (srfi srfi-13)
:export (make-justifier output-flush
*text-column-width*
@@ -86,11 +87,6 @@
(lambda ()
(output str)))))
-;*---------------------------------------------------------------------*/
-;* *justifiers* ... */
-;*---------------------------------------------------------------------*/
-(define *justifiers* (list (make-justifier *text-column-width*
- *text-justification*)))
(define *margin* 0)
;*---------------------------------------------------------------------*/
@@ -113,19 +109,7 @@
;*---------------------------------------------------------------------*/
(define (output-newline)
((car *justifiers*) 'newline))
-
-;*---------------------------------------------------------------------*/
-;* pre-output ... */
-;*---------------------------------------------------------------------*/
-(define (pre-output val)
- ((car *justifiers*) 'pre val))
-
-;*---------------------------------------------------------------------*/
-;* post-output ... */
-;*---------------------------------------------------------------------*/
-(define (post-output val)
- ((car *justifiers*) 'post val))
-
+
;*---------------------------------------------------------------------*/
;* output-flush ... */
;*---------------------------------------------------------------------*/
@@ -176,12 +160,6 @@
(define *spaces* '(#\Space #\Tab #\Newline))
;*---------------------------------------------------------------------*/
-;* strtok ... */
-;*---------------------------------------------------------------------*/
-(define (strtok str delims)
- (reverse (kotrts str delims)))
-
-;*---------------------------------------------------------------------*/
;* kotrts ... */
;*---------------------------------------------------------------------*/
(define (kotrts str delims)
@@ -314,13 +292,6 @@
;* tokens-justify ... */
;*---------------------------------------------------------------------*/
(define (tokens-justify justifier tokens width)
- (define (reverse-line lines)
- (let ((nl (string #\Newline)))
- (let loop ((ls lines)
- (acc ""))
- (if (null? ls)
- acc
- (loop (cdr ls) (string-append (car ls) nl acc))))))
(let loop ((tokens tokens)
(line-len 0)
(line '())
@@ -372,7 +343,7 @@
((newline)
(set! tokens (cons "\n" tokens)))
((flush)
- (let ((str (apply string-append (reverse! tokens))))
+ (let ((str (string-concatenate (reverse! tokens))))
(set! tokens '())
(list str)))
((width)
@@ -426,10 +397,11 @@
(else
(error "justifier" "Illegal command" cmd))))))))
-(define (my-string-append . s)
- (newline (current-error-port))
- (format (current-error-port) "s: ~a~%" s)
- (apply string-append s))
+;*---------------------------------------------------------------------*/
+;* *justifiers* ... */
+;*---------------------------------------------------------------------*/
+(define *justifiers* (list (make-justifier *text-column-width*
+ *text-justification*)))
;;; justify.scm ends here