From 0d77d7f483889ad42a38f8e05deffc2ff7d527c9 Mon Sep 17 00:00:00 2001 From: Mike Kupfer Date: Fri, 26 Nov 2021 13:59:14 -0800 Subject: [PATCH] Fix Subject when forwarding message with 2-line From * lisp/mh-e/mh-comp.el (mh-forwarded-letter-subject): Collapse two-line From headers into a single line (SF#266). Based on a suggestion from Lester Buck (many thanks!). --- lisp/mh-e/mh-comp.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 404b6b3ce7..e44c42e280 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -638,6 +638,8 @@ mh-forward (defun mh-forwarded-letter-subject (from subject) "Return a Subject suitable for a forwarded message. Original message has headers FROM and SUBJECT." + ;; Join continued lines. + (setq from (replace-regexp-in-string "\\s *\n\\s +" " " from)) (let ((addr-start (string-search "<" from)) (comment (string-search "(" from))) (cond ((and addr-start (> addr-start 0)) -- 2.20.1