changeset 5907:5fdb226fe9a4

(init_editfns): Look at LOGNAME before USER.
author Karl Heuer <kwzh@gnu.org>
date Fri, 11 Feb 1994 21:51:23 +0000
parents 5b5d6e2f65d1
children b091dfc9cb4d
files src/editfns.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/editfns.c	Fri Feb 11 21:32:49 1994 +0000
+++ b/src/editfns.c	Fri Feb 11 21:51:23 1994 +0000
@@ -43,7 +43,7 @@
 Lisp_Object Vsystem_name;
 Lisp_Object Vuser_real_name;	/* login name of current user ID */
 Lisp_Object Vuser_full_name;	/* full name of current user */
-Lisp_Object Vuser_name;		/* user name from USER or LOGNAME.  */
+Lisp_Object Vuser_name;		/* user name from LOGNAME or USER */
 
 void
 init_editfns ()
@@ -76,9 +76,9 @@
 
   /* Get the effective user name, by consulting environment variables,
      or the effective uid if those are unset.  */
-  user_name = (char *) getenv ("USER");
+  user_name = (char *) getenv ("LOGNAME");
   if (!user_name)
-    user_name = (char *) getenv ("LOGNAME");
+    user_name = (char *) getenv ("USER");
   if (!user_name)
     {
       pw = (struct passwd *) getpwuid (geteuid ());
@@ -483,7 +483,7 @@
 DEFUN ("user-login-name", Fuser_login_name, Suser_login_name, 0, 0, 0,
   "Return the name under which the user logged in, as a string.\n\
 This is based on the effective uid, not the real uid.\n\
-Also, if the environment variable USER or LOGNAME is set,\n\
+Also, if the environment variable LOGNAME or USER is set,\n\
 that determines the value of this function.")
   ()
 {