aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorKaroly Lorentey2004-05-08 16:20:28 +0000
committerKaroly Lorentey2004-05-08 16:20:28 +0000
commit2cd1371d9b0a3217db747b3c7485dd7f3cd6dda5 (patch)
treea8afcaf1b4c727c9a8c928cf2f654819bc2a8a86 /lisp/term
parent52f9ab73a16c71ffe7f8a1c25f9432bbe32f10cf (diff)
downloademacs-2cd1371d9b0a3217db747b3c7485dd7f3cd6dda5.tar.gz
emacs-2cd1371d9b0a3217db747b3c7485dd7f3cd6dda5.zip
Fixed environment variable handling during terminal initialization.
lisp/server.el (server-getenv): New inline function. lisp/term/rxvt.el (rxvt-set-background-mode): Use server-getenv instead of getenv. lisp/term/x-win.el (x-initialize-window-system): Ditto. lisp/term/xterm.el (xterm-rxvt-set-background-mode): Ditto. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-158
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/rxvt.el4
-rw-r--r--lisp/term/x-win.el4
-rw-r--r--lisp/term/xterm.el8
3 files changed, 11 insertions, 5 deletions
diff --git a/lisp/term/rxvt.el b/lisp/term/rxvt.el
index 7839ebba95d..3dbea1d46b2 100644
--- a/lisp/term/rxvt.el
+++ b/lisp/term/rxvt.el
@@ -26,6 +26,8 @@
26 26
27;;; Code: 27;;; Code:
28 28
29(eval-when-compile (require 'server))
30
29;; Set up function-key-map entries that termcap and terminfo don't know. 31;; Set up function-key-map entries that termcap and terminfo don't know.
30(let ((map (make-sparse-keymap))) 32(let ((map (make-sparse-keymap)))
31 (define-key map "\e[A" [up]) 33 (define-key map "\e[A" [up])
@@ -148,7 +150,7 @@ for the currently selected frame."
148;; intelligent way than the default guesswork in startup.el. 150;; intelligent way than the default guesswork in startup.el.
149(defun rxvt-set-background-mode () 151(defun rxvt-set-background-mode ()
150 "Set background mode as appropriate for the default rxvt colors." 152 "Set background mode as appropriate for the default rxvt colors."
151 (let ((fgbg (getenv "COLORFGBG")) 153 (let ((fgbg (server-getenv "COLORFGBG"))
152 bg rgb) 154 bg rgb)
153 (setq frame-background-mode 'light) ; default 155 (setq frame-background-mode 'light) ; default
154 (when (and fgbg 156 (when (and fgbg
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 381ee606300..55ad3800e0b 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -84,6 +84,8 @@
84(require 'fontset) 84(require 'fontset)
85(require 'x-dnd) 85(require 'x-dnd)
86 86
87(eval-when-compile (require 'server))
88
87(defvar x-invocation-args) 89(defvar x-invocation-args)
88 90
89(defvar x-command-line-resources nil) 91(defvar x-command-line-resources nil)
@@ -2365,7 +2367,7 @@ order until succeed.")
2365 (aset x-resource-name i ?-)))) 2367 (aset x-resource-name i ?-))))
2366 2368
2367 (x-open-connection (or x-display-name 2369 (x-open-connection (or x-display-name
2368 (setq x-display-name (getenv "DISPLAY"))) 2370 (setq x-display-name (server-getenv "DISPLAY")))
2369 x-command-line-resources 2371 x-command-line-resources
2370 ;; Exit Emacs with fatal error if this fails and we 2372 ;; Exit Emacs with fatal error if this fails and we
2371 ;; are the initial display. 2373 ;; are the initial display.
diff --git a/lisp/term/xterm.el b/lisp/term/xterm.el
index 5c387cb4148..e05b2f27324 100644
--- a/lisp/term/xterm.el
+++ b/lisp/term/xterm.el
@@ -26,6 +26,8 @@
26 26
27;;; Code: 27;;; Code:
28 28
29(eval-when-compile (require 'server))
30
29(let ((map (make-sparse-keymap))) 31(let ((map (make-sparse-keymap)))
30 (define-key map "\e[A" [up]) 32 (define-key map "\e[A" [up])
31 (define-key map "\e[B" [down]) 33 (define-key map "\e[B" [down])
@@ -208,7 +210,7 @@ versions of xterm."
208;; intelligent way than the default guesswork in startup.el. 210;; intelligent way than the default guesswork in startup.el.
209(defun xterm-rxvt-set-background-mode () 211(defun xterm-rxvt-set-background-mode ()
210 "Set background mode as appropriate for the default rxvt colors." 212 "Set background mode as appropriate for the default rxvt colors."
211 (let ((fgbg (getenv "COLORFGBG")) 213 (let ((fgbg (server-getenv "COLORFGBG"))
212 bg rgb) 214 bg rgb)
213 (setq frame-background-mode 'light) ; default 215 (setq frame-background-mode 'light) ; default
214 (when (and fgbg 216 (when (and fgbg
@@ -230,8 +232,8 @@ versions of xterm."
230(xterm-register-default-colors) 232(xterm-register-default-colors)
231;; If this xterm is actually a disguised rxvt, be more intelligent about 233;; If this xterm is actually a disguised rxvt, be more intelligent about
232;; determining the background mode. 234;; determining the background mode.
233(and (getenv "COLORTERM") 235(and (server-getenv "COLORTERM")
234 (string-match "\\`rxvt" (getenv "COLORTERM")) 236 (string-match "\\`rxvt" (server-getenv "COLORTERM"))
235 (xterm-rxvt-set-background-mode)) 237 (xterm-rxvt-set-background-mode))
236;; This recomputes all the default faces given the colors we've just set up. 238;; This recomputes all the default faces given the colors we've just set up.
237(tty-set-up-initial-frame-faces) 239(tty-set-up-initial-frame-faces)