From 8ed8ef307d9a28f6c3336a448c7fbdfe8a733d83 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Wed, 15 Feb 2017 20:23:07 -0500 Subject: [PATCH] Handle user-mail-address being the empty string * lisp/mail/feedmail.el (feedmail-fiddle-from): * lisp/mail/rmail.el (rmail-unknown-mail-followup-to): * lisp/mail/rmailsum.el (rmail-header-summary): Belated update for 2002-09-29 startup.el change, 680ebfa, where the value of user-mail-address during initialization was changed from nil to the empty string. --- lisp/mail/feedmail.el | 3 ++- lisp/mail/rmail.el | 9 +++++---- lisp/mail/rmailsum.el | 9 +++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/lisp/mail/feedmail.el b/lisp/mail/feedmail.el index 1402db40951..53791565bb1 100644 --- a/lisp/mail/feedmail.el +++ b/lisp/mail/feedmail.el @@ -2768,7 +2768,8 @@ return that value." ((eq t feedmail-from-line) (let ((feedmail-from-line (let ((at-stuff - (if user-mail-address user-mail-address + (if (> (length user-mail-address) 0) + user-mail-address (concat (user-login-name) "@" (or mail-host-address (system-name)))))) (cond diff --git a/lisp/mail/rmail.el b/lisp/mail/rmail.el index aeaba5862fc..695638fa062 100644 --- a/lisp/mail/rmail.el +++ b/lisp/mail/rmail.el @@ -2666,10 +2666,11 @@ Ask the user whether to add that list name to `mail-mailing-lists'." (regexp-quote (user-login-name)) "\\($\\|@\\)\\|" (regexp-quote - (or user-mail-address - (concat (user-login-name) "@" - (or mail-host-address - (system-name))))) + (if (> (length user-mail-address) 0) + user-mail-address + (concat (user-login-name) "@" + (or mail-host-address + (system-name))))) "\\>\\)")) addr)) (y-or-n-p diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 7c7c9f48e70..729538173a0 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -757,10 +757,11 @@ the message being processed." ;; Don't lose if run from init file ;; where user-mail-address is not ;; set yet. - (or user-mail-address - (concat (user-login-name) "@" - (or mail-host-address - (system-name))))) + (if (> (length user-mail-address) 0) + user-mail-address + (concat (user-login-name) "@" + (or mail-host-address + (system-name))))) "\\>\\)")) from)) ;; No From field, or it's this user. -- 2.39.5