diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-12-15 20:14:13 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-12-15 20:14:13 +0000 |
commit | 3347526ce7af0facc2a10c346b7f65880cd9f684 (patch) | |
tree | ddad607e352100fe79b6f195520adc1e18f357b3 | |
parent | 0a26b136cd6b721be4270edba5b52dbd712a2665 (diff) | |
download | emacs-3347526ce7af0facc2a10c346b7f65880cd9f684.tar.gz emacs-3347526ce7af0facc2a10c346b7f65880cd9f684.tar.bz2 emacs-3347526ce7af0facc2a10c346b7f65880cd9f684.zip |
(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.
-rw-r--r-- | src/editfns.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/editfns.c b/src/editfns.c index 2599dc9d5a1..9ff24cba8f3 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -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"); } 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. */ |