aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorKaroly Lorentey2005-11-19 19:17:56 +0000
committerKaroly Lorentey2005-11-19 19:17:56 +0000
commit59e085e04d44b0331620b55a64eb94bf99cf81b1 (patch)
treed6c04a67e99ec5ef0229e23b6303596cb1c555b6 /lib-src
parente3362cebc3485806379cac1986b901f3da20d59d (diff)
downloademacs-59e085e04d44b0331620b55a64eb94bf99cf81b1.tar.gz
emacs-59e085e04d44b0331620b55a64eb94bf99cf81b1.zip
Store client's environment in terminal parameters, not server parameters.
* lisp/loadup.el: Don't load server. * lisp/ldefs-boot.el: Update. * lib-src/emacsclient.c (main): Send environment only when a new display is created. * lisp/server.el (server-save-buffers-kill-display): Add autoload cookie. Move stuff not specific to server into `save-buffers-kill-display'. * lisp/files.el (save-buffers-kill-display): New function. (ctl-x-map): Bind it to C-x C-c. * lisp/frame.el (terminal-getenv): New function. * lisp/international/mule-cmds.el (set-locale-environment): Use it. * lisp/frame.el (with-terminal-environment): New macro. * lisp/server.el (server-getenv, server-with-client-environment): Remove. (server-getenv-from, server-with-environment): New functions. (server-process-filter): Change syntax of environment variables. Put environment into terminal parameters, not client parameters. * lisp/term/rxvt.el: Don't require server. (rxvt-set-background-mode): Use terminal-getenv, not server-getenv. * lisp/term/x-win.el (x-initialize-window-system): Ditto. * lisp/term/xterm.el (terminal-init-xterm): Ditto. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-443
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c33
1 files changed, 13 insertions, 20 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 85415eba44a..b6d33c9c2c2 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -695,26 +695,19 @@ To start the server in Emacs, type \"M-x server-start\".\n",
695 fprintf (out, "-version %s ", VERSION); 695 fprintf (out, "-version %s ", VERSION);
696 696
697 /* Send over our environment. */ 697 /* Send over our environment. */
698 { 698 if (!current_frame)
699 extern char **environ; 699 {
700 int i; 700 extern char **environ;
701 for (i = 0; environ[i]; i++) 701 int i;
702 { 702 for (i = 0; environ[i]; i++)
703 char *name = xstrdup (environ[i]); 703 {
704 char *value = strchr (name, '='); 704 char *name = xstrdup (environ[i]);
705 if (value && strlen (value) > 1) 705 char *value = strchr (name, '=');
706 { 706 fprintf (out, "-env ");
707 *value++ = 0; 707 quote_argument (environ[i], out);
708 fprintf (out, "-env "); 708 fprintf (out, " ");
709 quote_argument (name, out); 709 }
710 fprintf (out, " "); 710 }
711 quote_argument (value, out);
712 fprintf (out, " ");
713 fflush (out);
714 }
715 free (name);
716 }
717 }
718 711
719 retry: 712 retry:
720 if (nowait) 713 if (nowait)