From 4813886bbc46cf70b0dd8108efc6a763774b8d40 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 3 Dec 2003 21:55:50 +0000 Subject: [PATCH] Synch to Gnus 200312032131. --- lisp/ChangeLog | 5 +++++ lisp/mml.el | 29 ++++++++++++----------------- texi/ChangeLog | 4 ++++ texi/emacs-mime.texi | 14 ++++++++------ 4 files changed, 29 insertions(+), 23 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 374dedf..45ad111 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2003-12-03 Simon Josefsson + + * mml.el (mml-generate-mime-1): Only flow encode messages when + use-hard-newlines is set. + 2003-12-03 Katsumi Yamaoka * dns.el: Fix misplaced eval-when-compile. diff --git a/lisp/mml.el b/lisp/mml.el index a2a487a..6a728d9 100644 --- a/lisp/mml.el +++ b/lisp/mml.el @@ -442,23 +442,18 @@ If MML is non-nil, return the buffer up till the correspondent mml tag." ;; ignore 0x1b, it is part of iso-2022-jp (setq encoding (mm-body-7-or-8)))) (t - ;; Only perform format=flowed filling on text/plain - ;; parts where there either isn't a format parameter - ;; 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") - (or (null (assq 'format cont)) - (string= (cdr (assq 'format cont)) - "flowed")) - (setq use-hard-newlines - (text-property-any - (point-min) (point-max) 'hard 't))) - (fill-flowed-encode) - ;; Indicate that `mml-insert-mime-headers' should - ;; insert a "; format=flowed" string unless the - ;; user has already specified it. - (setq flowed (null (assq 'format cont))))) + ;; Perform format=flowed filling on text/plain + ;; parts when use-hard-newlines is enabled, and + ;; there are hard newlines in the buffer (they + ;; must be present on, e.g., the headers). + (when (and use-hard-newlines (string= type "text/plain") + (text-property-any (point-min) (point-max) + 'hard 't)) + (fill-flowed-encode) + ;; Indicate that `mml-insert-mime-headers' should + ;; insert a "; format=flowed" string unless the + ;; user has already specified it. + (setq flowed (null (assq 'format cont)))) (setq charset (mm-encode-body charset)) (setq encoding (mm-body-encoding charset (cdr (assq 'encoding cont)))))) diff --git a/texi/ChangeLog b/texi/ChangeLog index 671fd94..45cd99e 100644 --- a/texi/ChangeLog +++ b/texi/ChangeLog @@ -1,3 +1,7 @@ +2003-12-03 Simon Josefsson + + * emacs-mime.texi (Flowed text): Fix. + 2003-12-02 Simon Josefsson * gnus.texi (Agent Variables): Fix. diff --git a/texi/emacs-mime.texi b/texi/emacs-mime.texi index 0a33296..92fa8b4 100644 --- a/texi/emacs-mime.texi +++ b/texi/emacs-mime.texi @@ -942,12 +942,14 @@ variable (@pxref{Hard and Soft Newlines, ,Hard and Soft Newlines, emacs, Emacs Manual}) when encoding a message, and the ``format=flowed'' Content-Type parameter when decoding a message. -On encoding text, lines terminated by soft newline characters are -filled together and wrapped after the column decided by -@code{fill-flowed-encode-column}. This variable controls how the text -will look in a client that does not support flowed text, the default -is to wrap after 66 characters. If hard newline characters are not -present in the buffer, no flow encoding occurs. +On encoding text, if @code{use-hard-newlines} is enabled, lines +terminated by soft newline characters are filled together and wrapped +after the column decided by @code{fill-flowed-encode-column}. +Quotation marks (matching @samp{^>* ?}) are respected. The variable +controls how the text will look in a client that does not support +flowed text, the default is to wrap after 66 characters. If hard +newline characters are not present in the buffer, no flow encoding +occurs. On decoding flowed text, lines with soft newline characters are filled together and wrapped after the column decided by -- 1.7.10.4