(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)
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.
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)