aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorJuanma Barranquero2006-11-07 11:23:12 +0000
committerJuanma Barranquero2006-11-07 11:23:12 +0000
commit88b46d84315d9a03b22467eccdcc620db05993bf (patch)
tree0857197de2cdd7cdbcfb1c306a266dae25fc3709 /lib-src
parent1d1c19ca25ccb74128132bc30b3fe30b849a20d3 (diff)
downloademacs-88b46d84315d9a03b22467eccdcc620db05993bf.tar.gz
emacs-88b46d84315d9a03b22467eccdcc620db05993bf.zip
(get_server_config) [WINDOWSNT]: Search the server file on APPDATA
if it doesn't exist on HOME, even if HOME is defined.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/ChangeLog3
-rw-r--r--lib-src/emacsclient.c13
2 files changed, 12 insertions, 4 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 9210fa6afba..c2319d6486b 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,5 +1,8 @@
12006-11-07 Juanma Barranquero <lekktu@gmail.com> 12006-11-07 Juanma Barranquero <lekktu@gmail.com>
2 2
3 * emacsclient.c (get_server_config) [WINDOWSNT]: Look for the server
4 file on APPDATA if it doesn't exist on HOME, even if HOME is defined.
5
3 * emacsclient.c (get_server_config): Extract also the Emacs pid 6 * emacsclient.c (get_server_config): Extract also the Emacs pid
4 from the server file. On Windows, try to force the Emacs frame to 7 from the server file. On Windows, try to force the Emacs frame to
5 the foreground. 8 the foreground.
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 76ed21b29f8..3c3b27374fc 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -449,16 +449,21 @@ get_server_config (server, authentication)
449 else 449 else
450 { 450 {
451 char *home = getenv ("HOME"); 451 char *home = getenv ("HOME");
452#ifdef WINDOWSNT 452
453 if (! home)
454 home = getenv ("APPDATA");
455#endif
456 if (home) 453 if (home)
457 { 454 {
458 char *path = alloca (32 + strlen (home) + strlen (server_file)); 455 char *path = alloca (32 + strlen (home) + strlen (server_file));
459 sprintf (path, "%s/.emacs.d/server/%s", home, server_file); 456 sprintf (path, "%s/.emacs.d/server/%s", home, server_file);
460 config = fopen (path, "rb"); 457 config = fopen (path, "rb");
461 } 458 }
459#ifdef WINDOWSNT
460 if (!config && (home = getenv ("APPDATA")))
461 {
462 char *path = alloca (32 + strlen (home) + strlen (server_file));
463 sprintf (path, "%s/.emacs.d/server/%s", home, server_file);
464 config = fopen (path, "rb");
465 }
466#endif
462 } 467 }
463 468
464 if (! config) 469 if (! config)