From f948487059db5a1a292bec7d531a0aa39c09e8f4 Mon Sep 17 00:00:00 2001 From: yoichi Date: Mon, 18 Oct 2004 03:58:18 +0000 Subject: [PATCH] * modb-entity.el (elmo-msgdb-prefer-in-reply-to-for-parent): New variable. (elmo-msgdb-create-message-entity-from-buffer): Use it. --- elmo/ChangeLog | 6 ++++++ elmo/modb-entity.el | 19 +++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index ef08514..10b562b 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -1,3 +1,9 @@ +2004-10-18 Yoichi NAKAYAMA + + * 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 * elmo-filter.el (elmo-filter-folder-copy-flag-count): New diff --git a/elmo/modb-entity.el b/elmo/modb-entity.el index b65594a..b5fede0 100644 --- a/elmo/modb-entity.el +++ b/elmo/modb-entity.el @@ -43,6 +43,12 @@ :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)) -- 1.7.10.4