From 0b4f2b9e016f19a1abfd0b426730d9af712e5962 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Mon, 10 May 2004 22:56:18 +0000 Subject: [PATCH] (mime-encode-header-in-buffer): Don't ignore a space char at the beginning of a field body in order to honor the 76-column rule which is described in RFC 2047 section 2. --- ChangeLog | 6 ++++++ eword-encode.el | 16 +++++----------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index b4a4c9a..a80cde0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-05-10 Katsumi Yamaoka + + * eword-encode.el (mime-encode-header-in-buffer): Don't ignore a + space char at the beginning of a field body in order to honor the + 76-column rule which is described in RFC 2047 section 2. + 2004-04-15 MORIOKA Tomohiko * eword-decode.el (eword-decode-encoded-text): Fix bug when diff --git a/eword-encode.el b/eword-encode.el index 6cee2d6..3c51166 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -680,8 +680,7 @@ encoded-word. ASCII token is not encoded." ;;;###autoload (defun mime-encode-header-in-buffer (&optional code-conversion) "Encode header fields to network representation, such as MIME encoded-word. - -It refer variable `mime-field-encoding-method-alist'." +It refers the `mime-field-encoding-method-alist' variable." (interactive "*") (save-excursion (save-restriction @@ -689,11 +688,10 @@ It refer variable `mime-field-encoding-method-alist'." (goto-char (point-min)) (let ((default-cs (mime-charset-to-coding-system default-mime-charset)) bbeg end field-name) - (while (re-search-forward - (concat "\\(" std11-field-head-regexp "\\)" " ?") - nil t) + (while (re-search-forward std11-field-head-regexp nil t) (setq bbeg (match-end 0) - field-name (buffer-substring (match-beginning 0) (1- (match-end 1))) + field-name (buffer-substring-no-properties (match-beginning 0) + (1- bbeg)) end (std11-field-end)) (and (delq 'ascii (find-charset-region bbeg end)) (let ((method (eword-find-field-encoding-method @@ -714,11 +712,7 @@ It refer variable `mime-field-encoding-method-alist'." (or (mime-charset-to-coding-system method) default-cs))) - (encode-coding-region bbeg end cs) - ))) - )) - )) - ))) + (encode-coding-region bbeg end cs))))))))))) (defalias 'eword-encode-header 'mime-encode-header-in-buffer) (make-obsolete 'eword-encode-header 'mime-encode-header-in-buffer) -- 1.7.10.4