From b21ceb13a64505b72f58659ffd057f1fb6d97b04 Mon Sep 17 00:00:00 2001 From: teranisi Date: Tue, 3 Oct 2000 01:02:53 +0000 Subject: [PATCH] * wl-draft.el (wl-draft-parse-msg-id-list-string): New function. (wl-draft-reply): Use it. --- wl/ChangeLog | 5 +++++ wl/wl-draft.el | 20 +++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/wl/ChangeLog b/wl/ChangeLog index 5203437..bf28455 100644 --- a/wl/ChangeLog +++ b/wl/ChangeLog @@ -1,3 +1,8 @@ +2000-10-03 Yuuichi Teranishi + + * wl-draft.el (wl-draft-parse-msg-id-list-string): New function. + (wl-draft-reply): Use it. + 2000-10-02 Katsumi Yamaoka * wl-vars.el (wl-icon-dir): Default to $(data-directory)/wl/icons/ diff --git a/wl/wl-draft.el b/wl/wl-draft.el index 3afdd64..34ea888 100644 --- a/wl/wl-draft.el +++ b/wl/wl-draft.el @@ -411,7 +411,7 @@ the `wl-smtp-features' variable." (and (null to) (setq to cc cc nil)) (setq references (delq nil references) references (mapconcat 'identity references " ") - references (wl-parse references "[^<]*\\(<[^>]+>\\)") + references (wl-draft-parse-msg-id-list-string references) references (wl-delete-duplicates references) references (if references (mapconcat 'identity references "\n\t"))) @@ -815,6 +815,24 @@ to find out how to use this." ;; should never happen (t (error "qmail-inject reported unknown failure")))))) +(defun wl-draft-parse-msg-id-list-string (string) + "Get msg-id list from STRING." + (let ((parsed (std11-parse-msg-ids-string string)) + tokens msg-id msg-id-list) + (while parsed + (setq msg-id nil) + (when (eq (car (car parsed)) 'msg-id) + (setq tokens (cdr (car parsed))) + (while tokens + (if (or (eq (car (car tokens)) 'atom) + (eq (car (car tokens)) 'specials)) + (setq msg-id (concat msg-id (cdr (car tokens))))) + (setq tokens (cdr tokens)))) + (if msg-id (setq msg-id-list (cons (concat "<" msg-id ">") + msg-id-list))) + (setq parsed (cdr parsed))) + (nreverse msg-id-list))) + (defun wl-draft-parse-mailbox-list (field &optional remove-group-list) "Get mailbox list of FIELD from current buffer. The buffer is expected to be narrowed to just the headers of the message. -- 1.7.10.4