From a1798b313c2d7acbbe1e1b52cb615e54bd77457f Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 27 May 2000 00:10:12 +0000 Subject: [PATCH] Implement SKIP-LWSP-BACKWARDS. --- v7/src/imail/imail-util.scm | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/v7/src/imail/imail-util.scm b/v7/src/imail/imail-util.scm index 65b9586f1..55f6bc560 100644 --- a/v7/src/imail/imail-util.scm +++ b/v7/src/imail/imail-util.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-util.scm,v 1.25 2000/05/23 03:55:08 cph Exp $ +;;; $Id: imail-util.scm,v 1.26 2000/05/27 00:10:12 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -126,6 +126,13 @@ (define char-set:lwsp (char-set #\space #\tab)) +(define (skip-lwsp-backwards string start end) + (let loop ((end end)) + (if (and (fix:< start end) + (char-lwsp? (string-ref string (fix:- end 1)))) + (loop (fix:- end 1)) + end))) + (define (quote-lines lines) (map (lambda (line) (string-append "\t" line)) @@ -170,12 +177,6 @@ (if (default-object? line-ending) "\n" line-ending) lines)) -(define (short-name->pathname name) - (merge-pathnames name (current-home-directory))) - -(define (pathname->short-name pathname) - (enough-namestring pathname (current-home-directory))) - (define (write-header-fields headers port) (for-each (lambda (header) (write-header-field header port)) -- 2.25.1