2015-03-27 Paul Eggert <eggert@cs.ucla.edu>
+ Port user-login-name initialization to Qnil == 0
+ * editfns.c (Fuser_login_name, Fuser_real_login_name)
+ (syms_of_editfns): Don't rely on all-bits-zero being an Elisp integer,
+ as this is no longer true now that Qnil == 0.
+
Assume !BROKEN_NON_BLOCKING_CONNECT
From a suggestion by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00824.html
/* Set up the user name info if we didn't do it before.
(That can happen if Emacs is dumpable
but you decide to run `temacs -l loadup' and not dump. */
- if (INTEGERP (Vuser_login_name))
+ if (NILP (Vuser_login_name))
init_editfns ();
if (NILP (uid))
/* Set up the user name info if we didn't do it before.
(That can happen if Emacs is dumpable
but you decide to run `temacs -l loadup' and not dump. */
- if (INTEGERP (Vuser_login_name))
+ if (NILP (Vuser_login_name))
init_editfns ();
return Vuser_real_login_name;
}
DEFVAR_LISP ("user-login-name", Vuser_login_name,
doc: /* The user's name, taken from environment variables if possible. */);
+ Vuser_login_name = Qnil;
DEFVAR_LISP ("user-real-login-name", Vuser_real_login_name,
doc: /* The user's name, based upon the real uid only. */);