From: Nick Gasson Date: Thu, 29 Jul 2021 13:24:13 +0000 (+0800) Subject: Avoid errors in rmailsum for messages without "From" X-Git-Tag: emacs-28.0.90~1663 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7e8d1b08e3e23bc783cad10e620c2ebe6536965c;p=emacs.git Avoid errors in rmailsum for messages without "From" * lisp/mail/rmailsum.el (rmail-header-summary): Be defensive about the presence of the "From" header. (Bug#49770) Copyright-paperwork-exempt: yes --- diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 44cff21b062..ac933b9706d 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -758,7 +758,8 @@ the message being processed." len mch lo newline) ;; If there are multiple lines in FROM, ;; discard up to the last newline in it. - (while (setq newline (string-match "\n" from)) + (while (and (stringp from) + (setq newline (string-match "\n" from))) (setq from (substring from (1+ newline)))) (if (or (null from) (string-match