Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
2c9ae24e
Commit
2c9ae24e
authored
Feb 11, 1994
by
Karl Heuer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(init_editfns): Look at LOGNAME before USER.
parent
764b979b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
src/editfns.c
src/editfns.c
+4
-4
No files found.
src/editfns.c
View file @
2c9ae24e
...
...
@@ -43,7 +43,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
Lisp_Object
Vsystem_name
;
Lisp_Object
Vuser_real_name
;
/* login name of current user ID */
Lisp_Object
Vuser_full_name
;
/* full name of current user */
Lisp_Object
Vuser_name
;
/* user name from
USER or LOGNAME.
*/
Lisp_Object
Vuser_name
;
/* user name from
LOGNAME or USER
*/
void
init_editfns
()
...
...
@@ -76,9 +76,9 @@ init_editfns ()
/* Get the effective user name, by consulting environment variables,
or the effective uid if those are unset. */
user_name
=
(
char
*
)
getenv
(
"
USER
"
);
user_name
=
(
char
*
)
getenv
(
"
LOGNAME
"
);
if
(
!
user_name
)
user_name
=
(
char
*
)
getenv
(
"
LOGNAME
"
);
user_name
=
(
char
*
)
getenv
(
"
USER
"
);
if
(
!
user_name
)
{
pw
=
(
struct
passwd
*
)
getpwuid
(
geteuid
());
...
...
@@ -483,7 +483,7 @@ If POS is out of range, the value is nil.")
DEFUN
(
"user-login-name"
,
Fuser_login_name
,
Suser_login_name
,
0
,
0
,
0
,
"Return the name under which the user logged in, as a string.
\n
\
This is based on the effective uid, not the real uid.
\n
\
Also, if the environment variable
USER or LOGNAME
is set,
\n
\
Also, if the environment variable
LOGNAME or USER
is set,
\n
\
that determines the value of this function."
)
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment