+2004-06-11 Katsumi Yamaoka <yamaoka@jpl.org>
+
+ * rfc2047.el (rfc2047-encode-message-header): Remove useless
+ goto-char.
+ (rfc2047-encode): Fold the line before encoding.
+
2004-06-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* rfc2047.el (rfc2047-encode-message-header): Disabled header
(eq (car elem) t))
(setq alist nil
method (cdr elem))))
- (goto-char (point-min))
(re-search-forward "^[^:]+: *" nil t)
(cond
((eq method 'address-mime)
(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)
'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
(goto-char b))
e)
(insert eword)
+ (set-marker b nil)
+ (set-marker e nil)
(unless (or (eolp)
(looking-at "[ \t\n)]"))
(insert " "))))