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-23  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * 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  <lapis-lazuli@pop06.odn.ne.jp>
 
        * modb-entity.el (elmo-msgdb-create-message-entity-from-buffer):
 
                     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)))
 
     (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)))
          (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"))) ">"))))
 
 
                     (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)