From: Mike Kupfer Date: Fri, 26 Nov 2021 21:59:14 +0000 (-0800) Subject: Fix Subject when forwarding message with 2-line From X-Git-Tag: emacs-28.0.90~32 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2a4de5e5e5c3bb1d1022baf2b9a6f8b2acab4aa1;p=emacs.git 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!). --- diff --git a/lisp/mh-e/mh-comp.el b/lisp/mh-e/mh-comp.el index 404b6b3ce75..e44c42e2800 100644 --- a/lisp/mh-e/mh-comp.el +++ b/lisp/mh-e/mh-comp.el @@ -638,6 +638,8 @@ See also `mh-compose-forward-as-mime-flag', (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))