From: Chris Hanson Date: Mon, 26 Jun 2000 15:28:37 +0000 (+0000) Subject: Implement variable imail-mime-show-alternatives. X-Git-Tag: 20090517-FFI~3448 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=9c50cc6f210f4afb4b4993f7c8a657e19b701f6f;p=mit-scheme.git Implement variable imail-mime-show-alternatives. --- diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index a3a1cdeae..6e4a032f0 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.188 2000/06/24 01:39:16 cph Exp $ +;;; $Id: imail-top.scm,v 1.189 2000/06/26 15:28:25 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -180,6 +180,13 @@ Otherwise, simple dashed-line separators are used." Either #F or a pathname." #f (lambda (x) (or (not x) (string? x) (pathname? x)))) + +(define-variable imail-mime-show-alternatives + "If true, all parts of a multipart/alternative message are shown. +\(Only one of the parts will be shown in line; the others as attachments.) +Otherwise, only one of the parts is shown." + #f + boolean?) (define-command imail "Read and edit incoming mail. @@ -1998,7 +2005,9 @@ Negative argument means search in reverse." body (if (ref-variable imail-use-original-mime-boundaries mark) (mime-body-parameter body 'BOUNDARY "----------") - 'SIMPLE)))) + 'SIMPLE))) + (show-alternatives? + (ref-variable imail-mime-show-alternatives mark))) (do ((parts (mime-body-multipart-parts body) (cdr parts)) (i 0 (fix:+ i 1))) ((null? parts)) @@ -2006,8 +2015,9 @@ Negative argument means search in reverse." (selector `(,@selector ,i))) (if (and (fix:> i 0) (eq? (mime-body-subtype body) 'ALTERNATIVE)) - (insert-mime-message-attachment 'ALTERNATIVE part selector context - mark) + (if show-alternatives? + (insert-mime-message-attachment 'ALTERNATIVE part selector + context mark)) (insert-mime-message-part message part selector context mark)))))) (define-method insert-mime-message-part diff --git a/v7/src/imail/imail.pkg b/v7/src/imail/imail.pkg index 8920961a4..11d0a9904 100644 --- a/v7/src/imail/imail.pkg +++ b/v7/src/imail/imail.pkg @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail.pkg,v 1.65 2000/06/20 19:27:27 cph Exp $ +;;; $Id: imail.pkg,v 1.66 2000/06/26 15:28:14 cph Exp $ ;;; ;;; Copyright (c) 2000 Massachusetts Institute of Technology ;;; @@ -271,6 +271,7 @@ edwin-variable$imail-pass-phrase-retention-time edwin-variable$imail-primary-folder edwin-variable$imail-reply-with-re + edwin-variable$imail-mime-show-alternatives edwin-variable$imail-summary-highlight-message edwin-variable$imail-summary-mode-hook edwin-variable$imail-summary-pop-up-message diff --git a/v7/src/imail/todo.txt b/v7/src/imail/todo.txt index dc2e651d4..e8ec7f0b5 100644 --- a/v7/src/imail/todo.txt +++ b/v7/src/imail/todo.txt @@ -1,5 +1,5 @@ IMAIL To-Do List -$Id: todo.txt,v 1.96 2000/06/23 19:29:07 cph Exp $ +$Id: todo.txt,v 1.97 2000/06/26 15:28:37 cph Exp $ Bug fixes --------- @@ -31,12 +31,6 @@ New features Use this to extend M-x imail-rename-folder to work in all cases by using copy/delete when rename inapplicable. -* Add variable to control how multipart/alternative shows the - secondary alternatives. - -* For multipart/alternative, choose the part to show by examining each - part looking for highest-quality one that is allowed to be inlined. - * Examine spec for text/enriched and see if it can be incorporated into the reader.