mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-24 05:22:04 -08:00
Merge from origin/emacs-28
89a82182cbImprove documentation of read-multiple-choice5fccd1e371Explain why we remove stuff from 'user-full-name'
This commit is contained in:
commit
4e2058aec3
2 changed files with 13 additions and 3 deletions
|
|
@ -1233,7 +1233,11 @@ return "unknown".
|
|||
If optional argument UID is an integer, return the full name
|
||||
of the user with that uid, or nil if there is no such user.
|
||||
If UID is a string, return the full name of the user with that login
|
||||
name, or nil if there is no such user. */)
|
||||
name, or nil if there is no such user.
|
||||
|
||||
If the full name includes commas, remove everything starting with
|
||||
the first comma, because the \\='gecos\\=' field of the \\='/etc/passwd\\=' file
|
||||
is in general a comma-separated list. */)
|
||||
(Lisp_Object uid)
|
||||
{
|
||||
struct passwd *pw;
|
||||
|
|
@ -1263,7 +1267,8 @@ name, or nil if there is no such user. */)
|
|||
return Qnil;
|
||||
|
||||
p = USER_FULL_NAME;
|
||||
/* Chop off everything after the first comma. */
|
||||
/* Chop off everything after the first comma, since 'pw_gecos' is a
|
||||
comma-separated list. */
|
||||
q = strchr (p, ',');
|
||||
full = make_string (p, q ? q - p : strlen (p));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue