;;; -*-Scheme-*-
;;;
-;;; $Id: imail-top.scm,v 1.152 2000/06/14 02:24:50 cph Exp $
+;;; $Id: imail-top.scm,v 1.153 2000/06/14 20:16:21 cph Exp $
;;;
;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
;;;
Otherwise, they are inserted into the message body."
#t
boolean?)
+
+(define-variable imail-known-mime-charsets
+ "List of regular expressions matching character-set names.
+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?)
\f
(define-command imail
"Read and edit incoming mail.
imail-forward-using-mime
imail-ignored-headers
imail-kept-headers
+ imail-known-mime-charsets
imail-message-filter
imail-mode-hook
imail-pass-phrase-retention-time
;; This is illegal, but Netscape does it.
encoding
(mime-body-one-part-encoding body)))))
- (if (and (eq? (mime-body-subtype body) 'PLAIN)
+ (if (and (or (not enclosure)
+ (eq? (mime-body-subtype body) 'PLAIN))
(known-mime-encoding? encoding)
- (re-string-match (string-append "\\`"
- (regexp-group "us-ascii"
- "iso-8859-[0-9]+"
- "windows-[0-9]+")
- "\\'")
- (mime-body-parameter body 'CHARSET "us-ascii")
- #t))
+ (re-string-match
+ (string-append "\\`"
+ (apply regexp-group
+ (ref-variable imail-known-mime-charsets
+ mark))
+ "\\'")
+ (mime-body-parameter body 'CHARSET "us-ascii")
+ #t))
(let ((text
(message-mime-body-part
message
;;; -*-Scheme-*-
;;;
-;;; $Id: imail.pkg,v 1.56 2000/06/14 02:24:54 cph Exp $
+;;; $Id: imail.pkg,v 1.57 2000/06/14 20:16:37 cph Exp $
;;;
;;; Copyright (c) 2000 Massachusetts Institute of Technology
;;;
edwin-variable$imail-forward-using-mime
edwin-variable$imail-ignored-headers
edwin-variable$imail-kept-headers
+ edwin-variable$imail-known-mime-charsets
edwin-variable$imail-message-filter
edwin-variable$imail-mode-hook
edwin-variable$imail-pass-phrase-retention-time