]> code.delx.au - gnu-emacs/commitdiff
Port user-login-name initialization to Qnil == 0
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 27 Mar 2015 18:57:44 +0000 (11:57 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 27 Mar 2015 19:01:56 +0000 (12:01 -0700)
* 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.

src/ChangeLog
src/editfns.c

index 3f9ab4fff438e680f2f65662008c454f6b5ac4cd..61f2a84a9f9e3ef61fab3a6e9a3f9c4d7a7417dd 100644 (file)
@@ -1,5 +1,10 @@
 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
index f463890a98d1b1e5be16537da0f607e50a3b583a..7d3e4620029092b0443d926b60eebd34e41b6c0e 100644 (file)
@@ -1191,7 +1191,7 @@ of the user with that uid, or nil if there is no such user.  */)
   /* 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))
@@ -1214,7 +1214,7 @@ This ignores the environment variables LOGNAME and USER, so it differs from
   /* 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;
 }
@@ -4955,6 +4955,7 @@ functions if all the text being accessed has this property.  */);
 
   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.  */);