From 7636b1759f020c2135a4dcc01ee987776d3bbac9 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 11 Jun 2004 07:40:54 +0000 Subject: [PATCH] Synch to No Gnus 200406110740. --- lisp/ChangeLog | 6 ++++++ lisp/rfc2047.el | 9 ++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 32213b1..c758b89 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2004-06-11 Katsumi Yamaoka + + * rfc2047.el (rfc2047-encode-message-header): Remove useless + goto-char. + (rfc2047-encode): Fold the line before encoding. + 2004-06-10 Lars Magne Ingebrigtsen * rfc2047.el (rfc2047-encode-message-header): Disabled header diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index f8295ac..6e8ce9c 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -187,7 +187,6 @@ Should be called narrowed to the head of the message." (eq (car elem) t)) (setq alist nil method (cdr elem)))) - (goto-char (point-min)) (re-search-forward "^[^:]+: *" nil t) (cond ((eq method 'address-mime) @@ -497,8 +496,7 @@ By default, the string is treated as containing addresses (see (defun rfc2047-encode (b e) "Encode the word(s) in the region B to E. -By default, the region is treated as containing addresses (see -`rfc2047-encoding-type')." +Point moves to the end of the region." (let ((mime-charset (or (mm-find-mime-charset-region b e) (list 'us-ascii))) cs encoding space eword) (cond ((> (length mime-charset) 1) @@ -522,6 +520,9 @@ By default, the region is treated as containing addresses (see 'Q))) (widen) (goto-char b) + (setq b (point-marker) + e (set-marker (make-marker) e)) + (rfc2047-fold-region (point-at-bol) b) (unless (= 0 (skip-chars-backward " \t")) (setq space (buffer-substring-no-properties (point) b))) (setq eword (rfc2047-encode-1 @@ -541,6 +542,8 @@ By default, the region is treated as containing addresses (see (goto-char b)) e) (insert eword) + (set-marker b nil) + (set-marker e nil) (unless (or (eolp) (looking-at "[ \t\n)]")) (insert " ")))) -- 1.7.10.4