From: Chris Hanson Date: Thu, 1 Jun 2000 20:08:26 +0000 (+0000) Subject: Generalize MESSAGE-MIME-BODY-PART to allow passing selector ending in X-Git-Tag: 20090517-FFI~3640 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=3295d8b134fbfa1c8f608ec98dc987b4706a672c;p=mit-scheme.git Generalize MESSAGE-MIME-BODY-PART to allow passing selector ending in HEADER or TEXT. --- diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index bed90d16a..3e3c69ade 100644 --- a/v7/src/imail/imail-imap.scm +++ b/v7/src/imail/imail-imap.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-imap.scm,v 1.98 2000/06/01 19:29:35 cph Exp $ +;;; $Id: imail-imap.scm,v 1.99 2000/06/01 20:08:26 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -778,14 +778,24 @@ (parse-mime-body (imap-message-bodystructure message))) (define-method message-mime-body-part ((message ) selector) - (let ((section (map (lambda (n) (+ n 1)) selector))) + (let ((section + (map (lambda (x) + (if (exact-nonnegative-integer? x) + (+ x 1) + x)) + selector))) (imap:response:fetch-body-part (imap:command:uid-fetch (imap-folder-connection (message-folder message)) (imap-message-uid message) `(',(string-append "body[" (decorated-string-append - "" "." "" (map number->string section)) + "" "." "" + (map (lambda (x) + (if (exact-nonnegative-integer? x) + (number->string x) + (symbol->string x))) + section)) "]"))) section #f)))