Add support in emacsclient for EMACS_SOCKET_NAME
If the '--socket-name' argument is unspecified, the environment variable 'EMACS_SOCKET_NAME' is now consulted with the same semantics. This mirrors the behavior of the '--server-file' argument, and allows for easier configuration of emacsclient when the socket is in a location other than 'TMPDIR' or '/tmp'. * emacsclient.c (set_socket): Add support for the EMACS_SOCKET_NAME environment variable. (Bug#33095) * misc.texi (emacsclient Options): * emacsclient.1: Document the EMACS_SOCKET_NAME environment variable. * etc/NEWS: Announce the new feature. Copyright-paperwork-exempt: yes
This commit is contained in:
parent
8fffac14b1
commit
3e81e9a0e7
4 changed files with 14 additions and 0 deletions
|
@ -1409,6 +1409,9 @@ set_socket (int no_exit_if_error)
|
|||
|
||||
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
|
||||
/* Explicit --socket-name argument. */
|
||||
if (!socket_name)
|
||||
socket_name = egetenv ("EMACS_SOCKET_NAME");
|
||||
|
||||
if (socket_name)
|
||||
{
|
||||
s = set_local_socket (socket_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue