summaryrefslogtreecommitdiff
path: root/lisp/mail
diff options
context:
space:
mode:
authorNick Gasson <nick@nickg.me.uk>2021-07-29 21:24:13 +0800
committerEli Zaretskii <eliz@gnu.org>2021-07-29 18:37:21 +0300
commit7e8d1b08e3e23bc783cad10e620c2ebe6536965c (patch)
tree5c6962b7eb7fc9201ffd75217db09d535bc16b5d /lisp/mail
parent314474e2d5f16f609f38c067241280c85955c283 (diff)
downloademacs-7e8d1b08e3e23bc783cad10e620c2ebe6536965c.tar.gz
emacs-7e8d1b08e3e23bc783cad10e620c2ebe6536965c.tar.bz2
emacs-7e8d1b08e3e23bc783cad10e620c2ebe6536965c.zip
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
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/rmailsum.el3
1 files changed, 2 insertions, 1 deletions
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