aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-13 20:52:08 +0000
committerRichard M. Stallman1997-07-13 20:52:08 +0000
commite2f35ede084bfe561f2f843c890ed622d78339ac (patch)
treeee3d30f8fdd284736cd3d93f22806a256b1c6e86
parentad23b7e11398ce1ffd3cfd3255d5979dfd6bf42f (diff)
downloademacs-e2f35ede084bfe561f2f843c890ed622d78339ac.tar.gz
emacs-e2f35ede084bfe561f2f843c890ed622d78339ac.zip
(msdos-bg-mode): New function.
(msdos-face-setup, make-msdos-frame): Set background-mode and display-type properties for created frames.
-rw-r--r--lisp/term/pc-win.el27
1 files changed, 22 insertions, 5 deletions
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index 332952bc42b..fccb693c452 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -1,6 +1,6 @@
1;;; pc-win.el --- setup support for `PC windows' (whatever that is). 1;;; pc-win.el --- setup support for `PC windows' (whatever that is).
2 2
3;; Copyright (C) 1994, 1996 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
4 4
5;; Author: Morten Welinder <terra@diku.dk> 5;; Author: Morten Welinder <terra@diku.dk>
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -206,6 +206,14 @@
206(defvar default-frame-alist nil) 206(defvar default-frame-alist nil)
207(modify-frame-parameters terminal-frame default-frame-alist) 207(modify-frame-parameters terminal-frame default-frame-alist)
208 208
209(defun msdos-bg-mode (&optional frame)
210 (let* ((frame (or frame (selected-frame)))
211 (params (frame-parameters frame))
212 (bg (cdr (assq 'background-color params))))
213 (if (member bg '("black" "blue" "darkgray" "green"))
214 'dark
215 'light)))
216
209(defun msdos-face-setup () 217(defun msdos-face-setup ()
210 (modify-frame-parameters terminal-frame default-frame-alist) 218 (modify-frame-parameters terminal-frame default-frame-alist)
211 219
@@ -222,16 +230,25 @@
222 (set-face-foreground 'msdos-menu-passive-face "lightgray" terminal-frame) 230 (set-face-foreground 'msdos-menu-passive-face "lightgray" terminal-frame)
223 (set-face-background 'msdos-menu-active-face "blue" terminal-frame) 231 (set-face-background 'msdos-menu-active-face "blue" terminal-frame)
224 (set-face-background 'msdos-menu-passive-face "blue" terminal-frame) 232 (set-face-background 'msdos-menu-passive-face "blue" terminal-frame)
225 (set-face-background 'msdos-menu-select-face "red" terminal-frame)) 233 (set-face-background 'msdos-menu-select-face "red" terminal-frame)
234 (modify-frame-parameters terminal-frame
235 (list (cons 'background-mode
236 (msdos-bg-mode terminal-frame))
237 (cons 'display-type 'color))))
226 238
227;; We have only one font, so... 239;; We have only one font, so...
228(add-hook 'before-init-hook 'msdos-face-setup) 240(add-hook 'before-init-hook 'msdos-face-setup)
229 241
230;; We create frames as if we were a terminal, but with a twist. 242;; We create frames as if we were a terminal, but with a twist.
231(defun make-msdos-frame (&optional parameters) 243(defun make-msdos-frame (&optional parameters)
232 (let ((parms 244 (let* ((parms
233 (append initial-frame-alist default-frame-alist parameters nil))) 245 (append initial-frame-alist default-frame-alist parameters nil))
234 (make-terminal-frame parms))) 246 (frame (make-terminal-frame parms)))
247 (modify-frame-parameters frame
248 (list (cons 'background-mode
249 (msdos-bg-mode frame))
250 (cons 'display-type 'color)))
251 frame))
235 252
236(setq frame-creation-function 'make-msdos-frame) 253(setq frame-creation-function 'make-msdos-frame)
237 254