From: yamaoka Date: Fri, 22 Jan 1999 08:22:36 +0000 (+0000) Subject: * (message-reply): Get the references from `In-Reply-To' field if there were X-Git-Tag: gnus-6_10-199901221900~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=7a632c5020d1f156239db84be2a061c11baf22a8;p=elisp%2Fgnus.git- * (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'. --- 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)