From: hmurata Date: Thu, 23 Oct 2003 08:03:47 +0000 (+0000) Subject: * elmo-msgdb.el (elmo-msgdb-get-message-id-from-buffer): Abolish X-Git-Tag: wl-2_11_20~5 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=d54a9b6f88c7d1b67c19c0d8f17e8ca63b049b4f;p=elisp%2Fwanderlust.git * elmo-msgdb.el (elmo-msgdb-get-message-id-from-buffer): Abolish duplicate definition. * elmo-util.el (elmo-unfold-field-body): New function. (elmo-msgdb-get-message-id-from-buffer): Use it. * modb-entity.el (elmo-msgdb-create-message-entity-from-buffer): Fixed the last change; Use elmo-unfold-field-body. --- diff --git a/elmo/ChangeLog b/elmo/ChangeLog index fc25554..c4996f0 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,14 @@ +2003-10-23 Hiroya Murata + + * elmo-msgdb.el (elmo-msgdb-get-message-id-from-buffer): Abolish + duplicate definition. + + * elmo-util.el (elmo-unfold-field-body): New function. + (elmo-msgdb-get-message-id-from-buffer): Use it. + + * modb-entity.el (elmo-msgdb-create-message-entity-from-buffer): + Fixed the last change; Use elmo-unfold-field-body. + 2003-10-22 Hiroya Murata * modb-entity.el (elmo-msgdb-create-message-entity-from-buffer): diff --git a/elmo/elmo-msgdb.el b/elmo/elmo-msgdb.el index 851ff8d..901eee7 100644 --- a/elmo/elmo-msgdb.el +++ b/elmo/elmo-msgdb.el @@ -369,18 +369,6 @@ header separator." elmo-msgdb-directory) alist)) -(defun elmo-msgdb-get-message-id-from-buffer () - (let ((msgid (elmo-field-body "message-id"))) - (if msgid - (if (string-match "<\\(.+\\)>$" msgid) - msgid - (concat "<" msgid ">")) ; Invaild message-id. - ;; no message-id, so put dummy msgid. - (concat "<" (timezone-make-date-sortable - (elmo-field-body "date")) - (nth 1 (eword-extract-address-components - (or (elmo-field-body "from") "nobody"))) ">")))) - (defsubst elmo-folder-get-info (folder &optional hashtb) (elmo-get-hash-val folder (or hashtb elmo-folder-info-hashtb))) diff --git a/elmo/elmo-util.el b/elmo/elmo-util.el index 6e9e5da..24dca71 100644 --- a/elmo/elmo-util.el +++ b/elmo/elmo-util.el @@ -1254,6 +1254,11 @@ SPEC is a list as followed (LABEL MAX-VALUE [FORMAT])." (defalias 'elmo-field-body 'std11-fetch-field) ;;no narrow-to-region (defalias 'elmo-field-body 'std11-field-body)) +(defun elmo-unfold-field-body (name) + (let ((value (elmo-field-body name))) + (and value + (std11-unfold-string value)))) + (defun elmo-address-quote-specials (word) "Make quoted string of WORD if needed." (let ((lal (std11-lexical-analyze word))) @@ -1993,7 +1998,7 @@ If ALIST is nil, `elmo-obsolete-variable-alist' is used." (concat "<" msgid ">")) ; Invaild message-id. ;; no message-id, so put dummy msgid. (concat "<" (timezone-make-date-sortable - (elmo-field-body "date")) + (elmo-unfold-field-body "date")) (nth 1 (eword-extract-address-components (or (elmo-field-body "from") "nobody"))) ">")))) diff --git a/elmo/modb-entity.el b/elmo/modb-entity.el index 43aa235..b44cc02 100644 --- a/elmo/modb-entity.el +++ b/elmo/modb-entity.el @@ -223,7 +223,7 @@ Header region is supposed to be narrowed.") (elmo-mime-string (or (elmo-field-body "subject") elmo-no-subject)) "\t" " ") - date (std11-unfold-string (elmo-field-body "date")) + date (elmo-unfold-field-body "date") to (mapconcat 'identity (elmo-multiple-field-body "to") ",") cc (mapconcat 'identity (elmo-multiple-field-body "cc") ",")) (unless (elmo-msgdb-message-entity-field handler entity 'size)