]> git.eshelyaron.com Git - emacs.git/commitdiff
(rmail-make-in-reply-to-field): Don't cause an
authorRichard M. Stallman <rms@gnu.org>
Tue, 12 Aug 1997 05:49:26 +0000 (05:49 +0000)
committerRichard M. Stallman <rms@gnu.org>
Tue, 12 Aug 1997 05:49:26 +0000 (05:49 +0000)
error if the `From:' line has no valid email addresses.

lisp/mail/rmail.el

index 2b2e8cac3feaa1657af155d190293d3cf2bf01f2..2b4c8c6553a7e967bd129cd999a64e3ba3bf34df 100644 (file)
@@ -2527,12 +2527,14 @@ which is an element of rmail-msgref-vector."
          (require 'rfc822)
          (let ((tem (car (rfc822-addresses from))))
            (if message-id
-               (if (string-match
-                    (regexp-quote (if (string-match "@[^@]*\\'" tem)
-                                      (substring tem 0 (match-beginning 0))
-                                      tem))
-                    message-id)
-                   ;; Message-ID is sufficiently informative
+               (if (or (not tem)
+                      (string-match
+                       (regexp-quote (if (string-match "@[^@]*\\'" tem)
+                                         (substring tem 0
+                                                    (match-beginning 0))
+                                       tem))
+                       message-id))
+                   ;; missing From, or Message-ID is sufficiently informative
                    message-id
                    (concat message-id " (" tem ")"))
             ;; Copy TEM, discarding text properties.