From: yamaoka Date: Wed, 26 Apr 2000 00:51:22 +0000 (+0000) Subject: Sync. X-Git-Tag: t-gnus-6_14-quimby-before-AC-changed-~105 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d6a28a45920aa988230cad4701b69acb2e172b8;p=elisp%2Fgnus.git- Sync. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 6b7ab63..45b4275 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2000-04-25 20:12:17 Shenghuo ZHU + + * rfc2047.el (rfc2047-dissect-region): Don't include LWS ahead of + word if not necessary. + (rfc2047-encode-region): Put space between encoded words. + 2000-04-24 21:11:48 Shenghuo ZHU * gnus-util.el (gnus-netrc-machine): Another default to nntp. diff --git a/lisp/rfc2047.el b/lisp/rfc2047.el index 8875891..52bd83e 100644 --- a/lisp/rfc2047.el +++ b/lisp/rfc2047.el @@ -158,11 +158,9 @@ Should be called narrowed to the head of the message." (while (not (eobp)) (cond ((not state) - (if (memq (char-after) blank-list) - (setq state 'blank) - (setq state 'word) - (if (not (eq (setq cs (mm-charset-after)) 'ascii)) - (setq current cs))) + (setq state 'word) + (if (not (eq (setq cs (mm-charset-after)) 'ascii)) + (setq current cs)) (setq b (point))) ((eq state 'blank) (cond @@ -171,6 +169,8 @@ Should be called narrowed to the head of the message." ((memq (char-after) blank-list)) (t (setq state 'word) + (unless b + (setq b (point))) (if (not (eq (setq cs (mm-charset-after)) 'ascii)) (setq current cs))))) ((eq state 'word) @@ -181,9 +181,11 @@ Should be called narrowed to the head of the message." (setq current nil)) ((memq (char-after) blank-list) (setq state 'blank) - (push (list b (point) current) words) - (setq current nil) - (setq b (point))) + (if (not current) + (setq b nil) + (push (list b (point) current) words) + (setq b (point)) + (setq current nil))) ((or (eq (setq cs (mm-charset-after)) 'ascii) (if current (eq current cs) @@ -207,7 +209,10 @@ Should be called narrowed to the head of the message." (if (equal (nth 2 word) current) (setq beg (nth 0 word)) (when current - (rfc2047-encode beg end current)) + (when (prog1 (and (eq beg (nth 1 word)) (nth 2 word)) + (rfc2047-encode beg end current)) + (goto-char beg) + (insert " "))) (setq current (nth 2 word) beg (nth 0 word) end (nth 1 word))))