]> code.delx.au - gnu-emacs/commitdiff
(Fuser_full_name): Return nil if the specified user doesn't exist.
authorRichard M. Stallman <rms@gnu.org>
Sun, 15 Dec 1996 20:14:13 +0000 (20:14 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sun, 15 Dec 1996 20:14:13 +0000 (20:14 +0000)
(init_editfns): Set Vuser_full_name to "unknown" if the user name
can't be resolved.

src/editfns.c

index 2599dc9d5a1c1204e2156018d7210f3a13477ea6..9ff24cba8f31b52a6b3a94723f6f977aa24f11ee 100644 (file)
@@ -109,6 +109,8 @@ init_editfns ()
   p = (unsigned char *) getenv ("NAME");
   if (p)
     Vuser_full_name = build_string (p);
+  else if (NILP (Vuser_full_name))
+    Vuser_full_name = build_string ("unknown");
 }
 \f
 DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0,
@@ -585,7 +587,7 @@ name, or \"unknown\" if no such user could be found.")
     error ("Invalid UID specification");
 
   if (!pw)
-    return build_string ("unknown");
+    return Qnil;
   
   p = (unsigned char *) USER_FULL_NAME;
   /* Chop off everything after the first comma. */