mml: add mml-enable-flowed
authorJulien Danjou <julien@danjou.info>
Fri, 15 Oct 2010 18:18:30 +0000 (20:18 +0200)
committerJulien Danjou <julien@danjou.info>
Fri, 15 Oct 2010 18:19:58 +0000 (20:19 +0200)
Signed-off-by: Julien Danjou <julien@danjou.info>
lisp/ChangeLog
lisp/mml.el

index 4583953..7bc0e51 100644 (file)
@@ -6,6 +6,11 @@
 
        * shr.el (shr-tag-img): Ignore images with no data.
 
+2010-10-15  Julien Danjou  <julien@danjou.info>
+
+       * mml.el (mml-generate-mime-1): Add `mml-enable-flow' variable to add a
+       possibility to disable format=flow encoding when using hard newlines.
+
 2010-10-15  Katsumi Yamaoka  <yamaoka@jpl.org>
 
        * shr.el (shr-insert): Remove space inserted before or after a
index 43e86cb..1975af4 100644 (file)
@@ -128,6 +128,14 @@ It is necessary to work against a bug in certain clients."
   :type 'boolean
   :group 'message)
 
+(defcustom mml-enable-flowed t
+  "If non-nil, enable format=flowed usage when encoding a message.
+This is only performed when filling on text/plain with hard
+newlines in the text."
+  :version "24.1"
+  :type 'boolean
+  :group 'message)
+
 (defvar mml-tweak-type-alist nil
   "A list of (TYPE . FUNCTION) for tweaking MML parts.
 TYPE is a string containing a regexp to match the MIME type.  FUNCTION
@@ -546,7 +554,8 @@ If MML is non-nil, return the buffer up till the correspondent mml tag."
                    ;; in the mml tag or it says "flowed" and there
                    ;; actually are hard newlines in the text.
                    (let (use-hard-newlines)
-                     (when (and (string= type "text/plain")
+                     (when (and mml-enable-flowed
+                                 (string= type "text/plain")
                                 (not (string= (cdr (assq 'sign cont)) "pgp"))
                                 (or (null (assq 'format cont))
                                     (string= (cdr (assq 'format cont))