Commit 88b46d84 authored by Juanma Barranquero's avatar Juanma Barranquero

(get_server_config) [WINDOWSNT]: Search the server file on APPDATA

if it doesn't exist on HOME, even if HOME is defined.
parent 1d1c19ca
2006-11-07 Juanma Barranquero <lekktu@gmail.com>
* emacsclient.c (get_server_config) [WINDOWSNT]: Look for the server
file on APPDATA if it doesn't exist on HOME, even if HOME is defined.
* emacsclient.c (get_server_config): Extract also the Emacs pid
from the server file. On Windows, try to force the Emacs frame to
the foreground.
......
......@@ -449,16 +449,21 @@ get_server_config (server, authentication)
else
{
char *home = getenv ("HOME");
#ifdef WINDOWSNT
if (! home)
home = getenv ("APPDATA");
#endif
if (home)
{
char *path = alloca (32 + strlen (home) + strlen (server_file));
sprintf (path, "%s/.emacs.d/server/%s", home, server_file);
config = fopen (path, "rb");
}
#ifdef WINDOWSNT
if (!config && (home = getenv ("APPDATA")))
{
char *path = alloca (32 + strlen (home) + strlen (server_file));
sprintf (path, "%s/.emacs.d/server/%s", home, server_file);
config = fopen (path, "rb");
}
#endif
}
if (! config)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment