From: shuhei-k Date: Mon, 5 Apr 1999 15:42:08 +0000 (+0000) Subject: (TopLevel): Require 'cl when compiling. X-Git-Tag: flim-1_12_6~17 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=a3f9baa54addb5527f8b8ae80145de847fed8898;p=elisp%2Fflim.git (TopLevel): Require 'cl when compiling. (eword-encode-rword-list): Suppress insertion of extra spaces. (eword-encode-msg-id-to-rword-list): Treat surrounding angle brackets atomically. ([tm-ja:4244] by Kazuhiro Ohta ) --- diff --git a/eword-encode.el b/eword-encode.el index bfff8a7..1947a6d 100644 --- a/eword-encode.el +++ b/eword-encode.el @@ -30,6 +30,7 @@ (require 'mime-def) (require 'eword-decode) +(eval-when-compile (require 'cl)) ;;; @ variables ;;; @@ -332,23 +333,28 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is )) (defun eword-encode-rword-list (column rwl) - (let (ret dest ps special str ew-f pew-f) + (let (ret dest ps special str ew-f pew-f bew) (while rwl (setq ew-f (nth 2 (car rwl))) (if (and pew-f ew-f) (setq rwl (cons '(" ") rwl) + bew t pew-f nil) - (setq pew-f ew-f) + (setq pew-f ew-f + bew nil) ) (setq ret (tm-eword::encode-string-1 column rwl)) (setq str (car ret)) (if (eq (elt str 0) ?\n) - (if (eq special ?\() - (progn - (setq dest (concat dest "\n (")) - (setq ret (tm-eword::encode-string-1 2 rwl)) - (setq str (car ret)) - )) + (cond + ((eq special ?\() + (setq dest (concat dest "\n (")) + (setq ret (tm-eword::encode-string-1 2 rwl)) + (setq str (car ret))) + ((eq bew t) + (setq dest (concat dest "\n ")) + (setq ret (tm-eword::encode-string-1 1 (cdr rwl))) + (setq str (car ret)))) (cond ((eq special ? ) (if (string= str "(") (setq ps t) @@ -525,10 +531,12 @@ MODE is allows `text', `comment', `phrase' or nil. Default value is dest)) (defsubst eword-encode-msg-id-to-rword-list (msg-id) - (cons '(" " nil nil) - (cons '("<" nil nil) - (nconc (eword-encode-addr-seq-to-rword-list (cdr msg-id)) - '((">" nil nil)))))) + (list + (list + (concat "<" + (caar (eword-encode-addr-seq-to-rword-list (cdr msg-id))) + ">") + nil nil))) (defsubst eword-encode-in-reply-to-to-rword-list (in-reply-to) (let (dest)