* modb-entity.el (elmo-msgdb-prefer-in-reply-to-for-parent): New
authoryoichi <yoichi>
Mon, 18 Oct 2004 03:58:18 +0000 (03:58 +0000)
committeryoichi <yoichi>
Mon, 18 Oct 2004 03:58:18 +0000 (03:58 +0000)
variable.
(elmo-msgdb-create-message-entity-from-buffer): Use it.

elmo/ChangeLog
elmo/modb-entity.el

index ef08514..10b562b 100644 (file)
@@ -1,3 +1,9 @@
+2004-10-18  Yoichi NAKAYAMA  <yoichi@geiin.org>
+
+       * modb-entity.el (elmo-msgdb-prefer-in-reply-to-for-parent): New
+       variable.
+       (elmo-msgdb-create-message-entity-from-buffer): Use it.
+
 2004-10-16  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * elmo-filter.el (elmo-filter-folder-copy-flag-count): New
index b65594a..b5fede0 100644 (file)
   :type 'symbol
   :group 'elmo)
 
+(defcustom elmo-msgdb-prefer-in-reply-to-for-parent nil
+  "*Non-nil to prefer In-Reply-To header for finding parent message on thread,
+rather than References header."
+  :type 'boolean
+  :group 'elmo)
+
 (defvar modb-entity-default-cache-internal nil)
 
 (defun elmo-message-entity-handler (&optional entity)
@@ -213,10 +219,15 @@ Header region is supposed to be narrowed.")
           (setq charset (intern-soft charset))
           (setq default-mime-charset charset))
       (setq references
-           (or (elmo-msgdb-get-last-message-id
-                (elmo-field-body "in-reply-to"))
-               (elmo-msgdb-get-last-message-id
-                (elmo-field-body "references")))
+           (if elmo-msgdb-prefer-in-reply-to-for-parent
+               (or (elmo-msgdb-get-last-message-id
+                    (elmo-field-body "in-reply-to"))
+                   (elmo-msgdb-get-last-message-id
+                    (elmo-field-body "references")))
+             (or (elmo-msgdb-get-last-message-id
+                  (elmo-field-body "references"))
+                 (elmo-msgdb-get-last-message-id
+                  (elmo-field-body "in-reply-to"))))
            from (elmo-replace-in-string
                  (elmo-mime-string (or (elmo-field-body "from")
                                        elmo-no-from))