summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2005-12-29 04:31:04 +0000
committerKaroly Lorentey <lorentey@elte.hu>2005-12-29 04:31:04 +0000
commitda8e8fc14f3166ec596e34f43fbfea866d1176df (patch)
tree9c31affcb4b837cac4793f10acbafc562bfd08e4 /lisp/frame.el
parent86f5ca04d94ad551d3aa726e15281e75ef0189ed (diff)
downloademacs-da8e8fc14f3166ec596e34f43fbfea866d1176df.tar.gz
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/frame.el')
-rw-r--r--lisp/frame.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index ecf0697cae4..339100bbff5 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -674,12 +674,20 @@ setup is for focus to follow the pointer."
(cdr (assq 'window-system parameters)))
(t window-system)))
(frame-creation-function (cdr (assq w frame-creation-function-alist)))
+ (oldframe (selected-frame))
frame)
(unless frame-creation-function
(error "Don't know how to create a frame on window system %s" w))
(run-hooks 'before-make-frame-hook)
(setq frame (funcall frame-creation-function (append parameters (cdr (assq w window-system-default-frame-alist)))))
(normal-erase-is-backspace-setup-frame frame)
+ ;; Set up the frame-local environment, if needed.
+ (when (eq (frame-display frame) (frame-display oldframe))
+ (let ((env (frame-parameter oldframe 'environment)))
+ (if (not (framep env))
+ (setq env oldframe))
+ (if env
+ (set-frame-parameter frame 'environment env))))
(run-hook-with-args 'after-make-frame-functions frame)
frame))