From d2ff4d072aa8a17d832017cf3b358de14d9ba31a Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Sun, 11 Mar 2007 22:26:45 +0000 Subject: [PATCH] New Edwin variable IMAIL-INLINE-MIME-TEXT-LIMIT, to prevent gargantuan text parts that satisfy all the other rules for in-line display from screwing Edwin. This affects the main body of the message, too, however. We could work around this easily for unipart messges, although anything else would require a little more effort. In any case, although it is a minor annoyance to have to type `C-c C-t C-e' to show the body of a very long message, it is a much more major annoyance for Edwin to lose spectacularly for a message too large to fit in its heap. --- v7/src/imail/imail-top.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index 6964f177f..4b1af433d 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.297 2007/03/11 01:11:33 riastradh Exp $ +$Id: imail-top.scm,v 1.298 2007/03/11 22:26:45 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -181,6 +181,13 @@ Note that this variable does not affect subparts of multipart/alternative." '(HTML ENRICHED) list-of-strings?) +(define-variable imail-inline-mime-text-limit + "Size limit in octets for showing MIME text message parts in-line. +MIME text message parts less than this size are shown in-line by default. +This variable can also be #F; then all parts will be shown in-line." + 8192 + (lambda (x) (or (boolean? x) (exact-nonnegative-integer? x)))) + (define-variable imail-mime-attachment-directory "Default directory in which to store MIME attachments. Either #F or a pathname." @@ -2486,7 +2493,10 @@ Negative argument means search in reverse." mark)) "\\'") (mime-body-parameter body 'CHARSET "us-ascii") - #t))) + #t) + (let ((limit (ref-variable imail-inline-mime-text-limit mark))) + (or (not limit) + (< (mime-body-one-part-n-octets body) limit))))) (define-method walk-mime-message-part (message (body ) selector context mark) -- 2.25.1