From: tomo Date: Fri, 15 Dec 2000 09:55:55 +0000 (+0000) Subject: (eword-encode-divide-into-charset-words): Don't use `char-length' and X-Git-Tag: semi21-1_14_0-1~39 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=005363d653923707152441503ca2c7b7fd63271c;p=elisp%2Flemi.git (eword-encode-divide-into-charset-words): Don't use `char-length' and `char-next-index'. --- diff --git a/mime/eword-encode.el b/mime/eword-encode.el index f7111c1..68cb861 100644 --- a/mime/eword-encode.el +++ b/mime/eword-encode.el @@ -121,19 +121,19 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is (while (> len 0) (let* ((chr (sref string 0)) (charset (eword-encode-char-type chr)) - (i (char-length chr))) + (i 1) + ;; (i (char-length chr)) + ) (while (and (< i len) (setq chr (sref string i)) - (eq charset (eword-encode-char-type chr)) - ) - (setq i (char-next-index chr i)) + (eq charset (eword-encode-char-type chr))) + (setq i (1+ i)) + ;; (setq i (char-next-index chr i)) ) (setq dest (cons (cons charset (substring string 0 i)) dest) string (substring string i) - len (- len i) - ))) - (nreverse dest) - )) + len (- len i)))) + (nreverse dest))) ;;; @ word