]> granicus.if.org Git - neomutt/commitdiff
Use the EMAIL environment variable as the default for $from.
authorThomas Roessler <roessler@does-not-exist.org>
Mon, 11 Jun 2001 16:55:57 +0000 (16:55 +0000)
committerThomas Roessler <roessler@does-not-exist.org>
Mon, 11 Jun 2001 16:55:57 +0000 (16:55 +0000)
doc/mutt.man
doc/muttbug.man
init.c
init.h

index 66c87e1e05682a2528af23e17efc46d49368f932..0766c01b2a5539b6a48a5338187b03799f134317 100644 (file)
@@ -17,7 +17,7 @@
 .\"     along with this program; if not, write to the Free Software
 .\"     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
 .\"
-.TH mutt 1 "July 2000" Unix "User Manuals"
+.TH mutt 1 "June 2001" Unix "User Manuals"
 .SH NAME
 .PP
 mutt \- The Mutt Mail User Agent
@@ -97,6 +97,8 @@ command which contains new mail.
 .PP
 .IP "EDITOR"
 Editor to invoke when composing a message.
+.IP "EMAIL"
+The user's e-mail address.
 .IP "HOME"
 Full path of the user's home directory.
 .IP "MAIL"
index 27f92a48e6fb64f046f50b964cb99df07cc73a43..5b9aad8eefe49f8d066e31757597306e6257a03d 100644 (file)
@@ -1,7 +1,7 @@
 .\" -*-nroff-*-
 .\"
 .\"
-.\"     Copyright (C) 1996-2000 Thomas Roessler <roessler@guug.de>
+.\"     Copyright (C) 1996-2000 Thomas Roessler <roessler@does-not-exist.org>
 .\" 
 .\"     This program is free software; you can redistribute it and/or modify
 .\"     it under the terms of the GNU General Public License as published by
@@ -197,4 +197,4 @@ AUTHOR
 .PP
 .B flea
 and this manual page were written by Thomas Roessler
-<roessler@guug.de>.
+<roessler@does-not-exist.org>.
diff --git a/init.c b/init.c
index 3200851aeae5c994d21e75a5a43d7c24e24fd749..792b16c8e8705b27cf6825200cde91f202e5686d 100644 (file)
--- a/init.c
+++ b/init.c
@@ -1808,6 +1808,9 @@ void mutt_init (int skip_sys_rc, LIST *commands)
     FREE (&token.data);
   }
 
+  if ((p = getenv ("EMAIL")) != NULL)
+    From = rfc822_parse_adrlist (NULL, p);
+  
   mutt_set_langinfo_charset ();
   mutt_set_charset (Charset);
   
diff --git a/init.h b/init.h
index a4bbeea0a7962357ac390c20f054686c64b7458e..41291401ee32e2a53ec287a1f703bb7a3479560c 100644 (file)
--- a/init.h
+++ b/init.h
@@ -577,12 +577,14 @@ struct option_t MuttVars[] = {
   { "forw_quote",      DT_SYN,  R_NONE, UL "forward_quote", 0 },
   /*
   */
-  { "from",            DT_ADDR, R_NONE, UL &From, UL "" },
+  { "from",            DT_ADDR, R_NONE, UL &From, 0 },
   /*
   ** .pp
   ** When set, this variable contains a default from address.  It
   ** can be overridden using my_hdr (including from send-hooks) and
   ** ``$$reverse_name''.
+  ** .pp
+  ** Defaults to the EMAIL environment variable's content.
   */
   { "gecos_mask",      DT_RX,   R_NONE, UL &GecosMask, UL "^[^,]*" },
   /*