aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2015-03-27 11:57:44 -0700
committerPaul Eggert2015-03-27 12:01:56 -0700
commit589a4034b7af522c5b8107d5089fb1aec523a1e4 (patch)
tree95a0624a0c92c7d838a613701cc980a01519c45a /src
parent84c7c6fd2b9604fa28e0b834caa46423114b9c5b (diff)
downloademacs-589a4034b7af522c5b8107d5089fb1aec523a1e4.tar.gz
emacs-589a4034b7af522c5b8107d5089fb1aec523a1e4.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/editfns.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3f9ab4fff43..61f2a84a9f9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,10 @@
12015-03-27 Paul Eggert <eggert@cs.ucla.edu> 12015-03-27 Paul Eggert <eggert@cs.ucla.edu>
2 2
3 Port user-login-name initialization to Qnil == 0
4 * editfns.c (Fuser_login_name, Fuser_real_login_name)
5 (syms_of_editfns): Don't rely on all-bits-zero being an Elisp integer,
6 as this is no longer true now that Qnil == 0.
7
3 Assume !BROKEN_NON_BLOCKING_CONNECT 8 Assume !BROKEN_NON_BLOCKING_CONNECT
4 From a suggestion by Eli Zaretskii in: 9 From a suggestion by Eli Zaretskii in:
5 http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00824.html 10 http://lists.gnu.org/archive/html/emacs-devel/2015-03/msg00824.html
diff --git a/src/editfns.c b/src/editfns.c
index f463890a98d..7d3e4620029 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. */)
1191 /* Set up the user name info if we didn't do it before. 1191 /* Set up the user name info if we didn't do it before.
1192 (That can happen if Emacs is dumpable 1192 (That can happen if Emacs is dumpable
1193 but you decide to run `temacs -l loadup' and not dump. */ 1193 but you decide to run `temacs -l loadup' and not dump. */
1194 if (INTEGERP (Vuser_login_name)) 1194 if (NILP (Vuser_login_name))
1195 init_editfns (); 1195 init_editfns ();
1196 1196
1197 if (NILP (uid)) 1197 if (NILP (uid))
@@ -1214,7 +1214,7 @@ This ignores the environment variables LOGNAME and USER, so it differs from
1214 /* Set up the user name info if we didn't do it before. 1214 /* Set up the user name info if we didn't do it before.
1215 (That can happen if Emacs is dumpable 1215 (That can happen if Emacs is dumpable
1216 but you decide to run `temacs -l loadup' and not dump. */ 1216 but you decide to run `temacs -l loadup' and not dump. */
1217 if (INTEGERP (Vuser_login_name)) 1217 if (NILP (Vuser_login_name))
1218 init_editfns (); 1218 init_editfns ();
1219 return Vuser_real_login_name; 1219 return Vuser_real_login_name;
1220} 1220}
@@ -4955,6 +4955,7 @@ functions if all the text being accessed has this property. */);
4955 4955
4956 DEFVAR_LISP ("user-login-name", Vuser_login_name, 4956 DEFVAR_LISP ("user-login-name", Vuser_login_name,
4957 doc: /* The user's name, taken from environment variables if possible. */); 4957 doc: /* The user's name, taken from environment variables if possible. */);
4958 Vuser_login_name = Qnil;
4958 4959
4959 DEFVAR_LISP ("user-real-login-name", Vuser_real_login_name, 4960 DEFVAR_LISP ("user-real-login-name", Vuser_real_login_name,
4960 doc: /* The user's name, based upon the real uid only. */); 4961 doc: /* The user's name, based upon the real uid only. */);