[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 589a403: Port user-login-name initialization to Qni
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] master 589a403: Port user-login-name initialization to Qnil == 0 |
Date: |
Fri, 27 Mar 2015 19:02:00 +0000 |
branch: master
commit 589a4034b7af522c5b8107d5089fb1aec523a1e4
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>
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.
---
src/ChangeLog | 5 +++++
src/editfns.c | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/ChangeLog b/src/ChangeLog
index 3f9ab4f..61f2a84 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
2015-03-27 Paul Eggert <address@hidden>
+ 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
diff --git a/src/editfns.c b/src/editfns.c
index f463890..7d3e462 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -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. */);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 589a403: Port user-login-name initialization to Qnil == 0,
Paul Eggert <=