Mercurial > emacs
diff lisp/env.el @ 83640:2aee92eacdab
* server.el (server-process-filter): Likewise.
(server-process-filter): Likewise. Also set COLORFGBG and
COLORTERM.
* frame.el (frame-initialize, make-frame): Likewise.
* faces.el (tty-set-up-initial-frame-faces): Likewise.
* env.el (read-envvar-name): Don't consider the environment frame
param.
(setenv): Set display-environment-variable and
term-environment-variable.
* frame.c (Qterm_environment_variable,
Qdisplay_environment_variable): New variables.
(syms_of_frame): Intern and staticpro them.
* frame.h: Declare them here.
* callproc.c (child_setup): Use the display-environment-variable
and term-environment-variable frame params.
(getenv_internal): Likewise.
(set_initial_environment): Initialise Vprocess_environment.
* frames.texi (Basic Parameters): Add display-environment-variable
and term-environment-variable.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Tue, 03 Jul 2007 04:53:21 +0000 |
parents | 2716535391b7 |
children | 65663fcd2caa |
line wrap: on
line diff
--- a/lisp/env.el Mon Jul 02 02:39:53 2007 +0000 +++ b/lisp/env.el Tue Jul 03 04:53:21 2007 +0000 @@ -55,7 +55,8 @@ (substring enventry 0 (string-match "=" enventry))))) (append process-environment - (frame-parameter (frame-with-environment) 'environment))) + nil ;;(frame-parameter (frame-with-environment) 'environment) + )) nil mustmatch nil 'read-envvar-name-history)) ;; History list for VALUE argument to setenv. @@ -191,9 +192,14 @@ (setq process-environment (setenv-internal process-environment variable value t)) (setq frame (frame-with-environment frame)) - (set-frame-parameter frame 'environment - (setenv-internal (frame-parameter frame 'environment) - variable value nil))) + (cond + ((string-equal "TERM" variable) + (set-frame-parameter frame 'term-environment-variable value)) + ((string-equal "DISPLAY" variable) + (set-frame-parameter frame 'display-environment-variable value)) + (t + (setq process-environment (setenv-internal process-environment + variable value nil))))) value) (defun getenv (variable &optional frame) @@ -238,8 +244,8 @@ `locale-coding-system', i.e. the elements must normally be decoded for use. See `setenv' and `getenv'." (let* ((env (append process-environment - (frame-parameter (frame-with-environment frame) - 'environment) +;; (frame-parameter (frame-with-environment frame) +;; 'environment) nil)) (scan env) prev seen)