From 621eb410aa43dd2d8009a08fc17e18517b1f372d Mon Sep 17 00:00:00 2001 From: morioka Date: Sat, 21 Jun 1997 14:25:21 +0000 Subject: [PATCH] Function `tm-eword::parse-lc-word' was abolished. (tm-eword::split-to-lc-words): New implementation. --- eword-encode.el | 40 +++++++++++++++++----------------------- 1 file changed, 17 insertions(+), 23 deletions(-) diff --git a/eword-encode.el b/eword-encode.el index 8c110e3..da911a0 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -3,7 +3,7 @@ ;; Copyright (C) 1995,1996,1997 Free Software Foundation, Inc. ;; Author: MORIOKA Tomohiko -;; Version: $Revision: 0.19 $ +;; Version: $Revision: 0.20 $ ;; Keywords: encoded-word, MIME, multilingual, header, mail, news ;; This file is part of SEMI (SEMI is Emacs MIME Interfaces). @@ -36,7 +36,7 @@ ;;; (defconst eword-encode-RCS-ID - "$Id: eword-encode.el,v 0.19 1997-06-21 13:47:35 morioka Exp $") + "$Id: eword-encode.el,v 0.20 1997-06-21 14:25:21 morioka Exp $") (defconst eword-encode-version (get-version-string eword-encode-RCS-ID)) @@ -119,29 +119,23 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is (char-charset character) )) -(defun tm-eword::parse-lc-word (str) - (let* ((chr (sref str 0)) - (lc (eword-encode-char-type chr)) - (i (char-bytes chr)) - (len (length str)) - ) - (while (and (< i len) - (setq chr (sref str i)) - (eq lc (eword-encode-char-type chr)) - ) - (setq i (+ i (char-bytes chr))) - ) - (cons (cons lc (substring str 0 i)) (substring str i)) - )) - (defun tm-eword::split-to-lc-words (str) (let (ret dest) - (while (and (not (string= str "")) - (setq ret (tm-eword::parse-lc-word str)) - ) - (setq dest (cons (car ret) dest)) - (setq str (cdr ret)) - ) + (while (not (string= str "")) + (let* ((chr (sref str 0)) + (charset (eword-encode-char-type chr)) + (i (char-bytes chr)) + (len (length str)) + ) + (while (and (< i len) + (setq chr (sref str i)) + (eq charset (eword-encode-char-type chr)) + ) + (setq i (+ i (char-bytes chr))) + ) + (setq dest (cons (cons charset (substring str 0 i)) dest) + str (substring str i)) + )) (reverse dest) )) -- 1.7.10.4