diff options
author | Karoly Lorentey <lorentey@elte.hu> | 2005-12-29 04:31:04 +0000 |
---|---|---|
committer | Karoly Lorentey <lorentey@elte.hu> | 2005-12-29 04:31:04 +0000 |
commit | da8e8fc14f3166ec596e34f43fbfea866d1176df (patch) | |
tree | 9c31affcb4b837cac4793f10acbafc562bfd08e4 /lisp/server.el | |
parent | 86f5ca04d94ad551d3aa726e15281e75ef0189ed (diff) | |
download | emacs-da8e8fc14f3166ec596e34f43fbfea866d1176df.tar.gz emacs-da8e8fc14f3166ec596e34f43fbfea866d1176df.tar.bz2 emacs-da8e8fc14f3166ec596e34f43fbfea866d1176df.zip |
Store local environment in frame (not terminal) parameters.
* src/callproc.c (child_setup, getenv_internal, Fgetenv_internal):
Store the local environment in a frame (not terminal) parameter.
Update doc strings.
(syms_of_callproc): Update doc strings.
(Qenvironment): Moved to frame.c.
* lisp/env.el (read-envvar-name, setenv, getenv, environment): Use frame
parameters to store the local environment, not terminal parameters.
* server.el (server-process-filter): Store the local environment in a
frame (not terminal) parameter. Do not try to decode environment
strings.
* lisp/frame.el (make-frame): Set up the 'environment frame parameter,
when needed.
* src/frame.c (Qenvironment): Move here from callproc.c.
(Fdelete_frame): Don't allow other frames to refer to a deleted frame
in their 'environment parameter.
(Fframe_with_environment): New function.
(syms_of_frame): Defsubr it. Initialize and staticpro Qenvironment.
* frame.h (Qenvironment): Declare.
* lisp.h (Fframe_with_environment): EXFUN it.
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-467
Diffstat (limited to 'lisp/server.el')
-rw-r--r-- | lisp/server.el | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/server.el b/lisp/server.el index fb587b640a3..f98be109c92 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -620,8 +620,8 @@ The following commands are accepted by the client: ;; emacsclient quits while also preventing ;; `server-save-buffers-kill-display' from unexpectedly ;; killing emacs on that frame. - (list (cons 'client 'nowait)) - (list (cons 'client proc))))) + (list (cons 'client 'nowait) (cons 'environment env)) + (list (cons 'client proc) (cons 'environment env))))) (setq frame (make-frame-on-display (or display (frame-parameter nil 'display) @@ -637,7 +637,6 @@ The following commands are accepted by the client: (select-frame frame) (server-client-set client 'frame frame) (server-client-set client 'device (frame-display frame)) - (set-terminal-parameter frame 'environment env) (setq dontkill t)) ;; This emacs does not support X. (server-log "Window system unsupported" proc) @@ -684,12 +683,12 @@ The following commands are accepted by the client: (setq frame (make-frame-on-tty tty type ;; Ignore nowait here; we always need to clean ;; up opened ttys when the client dies. - `((client . ,proc))))) + `((client . ,proc) + (environment . ,env))))) (select-frame frame) (server-client-set client 'frame frame) (server-client-set client 'tty (display-name frame)) (server-client-set client 'device (frame-display frame)) - (set-terminal-parameter frame 'environment env) ;; Reply with our pid. (server-send-string proc (concat "-emacs-pid " (number-to-string (emacs-pid)) "\n")) @@ -740,8 +739,7 @@ The following commands are accepted by the client: ;; -env NAME=VALUE: An environment variable. ((and (equal "-env" arg) (string-match "\\([^ ]+\\) " request)) (let ((var (server-unquote-arg (match-string 1 request)))) - (when coding-system - (setq var (decode-coding-string var coding-system))) + ;; XXX Variables should be encoded as in getenv/setenv. (setq request (substring request (match-end 0))) (setq env (cons var env)))) |