From b7e5f8466a3212e6b0f32504c6f3070a6b82aa86 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 15 Jun 2000 16:20:25 +0000 Subject: [PATCH] Implement variable imail-inline-mime-text-subtypes. --- v7/src/imail/imail-top.scm | 18 +++++++++++++++--- v7/src/imail/imail.pkg | 3 ++- v7/src/imail/todo.txt | 5 +---- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index 34fb3bc28..875fc1752 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.159 2000/06/15 15:40:21 cph Exp $ +;;; $Id: imail-top.scm,v 1.160 2000/06/15 16:19:53 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -143,7 +143,7 @@ Otherwise, the text is left as is." Otherwise, only the header fields normally shown by IMAIL are sent." #f boolean?) - + (define-variable imail-forward-using-mime "If true, forwarded email messages are sent as MIME attachments. Otherwise, they are inserted into the message body." @@ -156,6 +156,16 @@ Text messages using these character sets are displayed inline; when other character sets are used, the text is treated as an attachment." (list "us-ascii" "iso-8859-[0-9]+" "windows-[0-9]+") list-of-strings?) + +(define-variable imail-inline-mime-text-subtypes + "List of MIME text subtypes that should be shown inline. +The value of this variable is a list of symbols. +A text entity that appears at the top level of a message + is always shown inline, regardless of its subtype. +Likewise, a text/plain entity is always shown inline. +Note that this variable does not affect subparts of multipart/alternative." + '(HTML ENRICHED) + list-of-strings?) (define-command imail "Read and edit incoming mail. @@ -1186,7 +1196,9 @@ With prefix argument N moves backward N messages with these flags." encoding (mime-body-one-part-encoding body))))) (if (and (or (not enclosure) - (eq? (mime-body-subtype body) 'PLAIN)) + (let ((subtype (mime-body-subtype body))) + (or (eq? subtype 'PLAIN) + (memq subtype imail-inline-mime-text-subtypes)))) (known-mime-encoding? encoding) (re-string-match (string-append "\\`" diff --git a/v7/src/imail/imail.pkg b/v7/src/imail/imail.pkg index d6abdffd0..82e142aa5 100644 --- a/v7/src/imail/imail.pkg +++ b/v7/src/imail/imail.pkg @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail.pkg,v 1.61 2000/06/15 15:40:37 cph Exp $ +;;; $Id: imail.pkg,v 1.62 2000/06/15 16:20:02 cph Exp $ ;;; ;;; Copyright (c) 2000 Massachusetts Institute of Technology ;;; @@ -262,6 +262,7 @@ edwin-variable$imail-forward-all-headers edwin-variable$imail-forward-using-mime edwin-variable$imail-ignored-headers + edwin-variable$imail-inline-mime-text-subtypes edwin-variable$imail-kept-headers edwin-variable$imail-known-mime-charsets edwin-variable$imail-message-filter diff --git a/v7/src/imail/todo.txt b/v7/src/imail/todo.txt index 0ea483c3c..4b4f172e6 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.83 2000/06/15 15:40:03 cph Exp $ +$Id: todo.txt,v 1.84 2000/06/15 16:20:25 cph Exp $ Bug fixes --------- @@ -38,9 +38,6 @@ New features * Command to save an attachment should work on inline entities too. -* Add variable saying what type/subtype combinations should be - inlined. Can this be combined with the known-charsets variable? - * Support the "flagged" message flag by highlighting messages with this flag in the summary buffer. -- 2.25.1