diff src/editfns.c @ 16683:6802dbd07a80

(Fuser_full_name): Return nil if the specified user doesn't exist. (init_editfns): Set Vuser_full_name to "unknown" if the user name can't be resolved.
author Richard M. Stallman <rms@gnu.org>
date Sun, 15 Dec 1996 20:14:13 +0000
parents 912ff9d36bb1
children 0b914fcd97a1
line wrap: on
line diff
--- a/src/editfns.c	Sun Dec 15 18:48:23 1996 +0000
+++ b/src/editfns.c	Sun Dec 15 20:14:13 1996 +0000
@@ -109,6 +109,8 @@
   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");
 }
 
 DEFUN ("char-to-string", Fchar_to_string, Schar_to_string, 1, 1, 0,
@@ -585,7 +587,7 @@
     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. */