From 7a632c5020d1f156239db84be2a061c11baf22a8 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Fri, 22 Jan 1999 08:22:36 +0000 Subject: [PATCH] * (message-reply): Get the references from `In-Reply-To' field if there were no references and `In-Reply-To' field looks promising. (message-yank-original): Try to fetch ID from `In-Reply-To' field if `References' field does not exist. (message-yank-original): Use `std11-narrow-to-header' instead of `message-narrow-to-head'. --- lisp/message.el | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lisp/message.el b/lisp/message.el index 7913af8..b567099 100644 --- a/lisp/message.el +++ b/lisp/message.el @@ -1856,8 +1856,13 @@ be added to \"References\" field." (save-excursion (save-restriction (narrow-to-region (point) (mark t)) - (message-narrow-to-head) - (setq refs (concat (or (message-fetch-field "References") "") + (std11-narrow-to-header) + (unless (setq refs (message-fetch-field "References")) + (if (and (setq refs (message-fetch-field "In-Reply-To")) + (string-match "<[^>]+>" refs)) + (setq refs (match-string 0 refs)) + (setq refs nil))) + (setq refs (concat (or refs "") " " (or (message-fetch-field "Message-ID") ""))) (unless (string-match "^ +$" refs) @@ -3673,7 +3678,7 @@ OTHER-HEADERS is an alist of header/value pairs." from subject date reply-to to cc references message-id follow-to (inhibit-point-motion-hooks t) - mct never-mct gnus-warning) + mct never-mct gnus-warning in-reply-to) (save-restriction (message-narrow-to-head) ;; Allow customizations to have their say. @@ -3696,6 +3701,12 @@ OTHER-HEADERS is an alist of header/value pairs." reply-to (message-fetch-field "reply-to") references (message-fetch-field "references") message-id (message-fetch-field "message-id" t)) + ;; Get the references from "In-Reply-To" field if there were + ;; no references and "In-Reply-To" field looks promising. + (unless references + (when (and (setq in-reply-to (message-fetch-field "in-reply-to")) + (string-match "<[^>]+>" in-reply-to)) + (setq references (match-string 0 in-reply-to)))) ;; Remove any (buggy) Re:'s that are present and make a ;; proper one. (when (string-match message-subject-re-regexp subject) -- 1.7.10.4