aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorEli Zaretskii <[email protected]>1999-08-10 10:21:18 +0000
committerEli Zaretskii <[email protected]>1999-08-10 10:21:18 +0000
commit68a89a250a1a322c14a6e2637f64d2a5432977df (patch)
tree39798efb04610b3fbe9f0ba9a72e76c8059caf5b /lisp/term
parent75014631057ba6ea568b5375b70afb7f0eae7c70 (diff)
(msdos-bg-mode): Remove. Call
frame-set-background-mode instead. All callers changed. (msdos-face-setup): Don't force color display parameter, it is set by frame-set-background-mode. (make-msdos-frame): Call x-handle-reverse-video and face-set-after-frame-default. Delete frame if creation failed.
Diffstat (limited to 'lisp/term')
-rw-r--r--lisp/term/pc-win.el31
1 files changed, 10 insertions, 21 deletions
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index 0f3cb87e6e..e1fb6882a8 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -293,18 +293,6 @@
(defvar default-frame-alist nil)
(modify-frame-parameters terminal-frame default-frame-alist)
-(defun msdos-bg-mode (&optional frame)
- (let* ((frame (or frame (selected-frame)))
- (params (frame-parameters frame))
- (bg (cdr (assq 'background-color params))))
- ;; The list of ``dark'' colors should be consistent with
- ;; `x-color-values' (below) and the dark/light color
- ;; decisions `frame-set-background-mode' in lisp/faces.el.
- (if (member bg
- '("black" "blue" "green" "red" "magenta" "brown" "darkgray"))
- 'dark
- 'light)))
-
(defun msdos-face-setup ()
(modify-frame-parameters terminal-frame default-frame-alist)
(face-clear-tty-colors)
@@ -314,10 +302,7 @@
(face-register-tty-color (car (car colors)) i)
(setq colors (cdr colors) i (1+ i))))
- (modify-frame-parameters terminal-frame
- (list (cons 'background-mode
- (msdos-bg-mode terminal-frame))
- (cons 'display-type 'color)))
+ (frame-set-background-mode terminal-frame)
(face-set-after-frame-default terminal-frame)
(set-face-foreground 'bold "yellow" terminal-frame)
@@ -341,11 +326,15 @@
(defun make-msdos-frame (&optional parameters)
(let* ((parms
(append initial-frame-alist default-frame-alist parameters nil))
- (frame (make-terminal-frame parms)))
- (modify-frame-parameters frame
- (list (cons 'background-mode
- (msdos-bg-mode frame))
- (cons 'display-type 'color)))
+ (frame (make-terminal-frame parms))
+ success)
+ (unwind-protect
+ (progn
+ (x-handle-reverse-video frame parms)
+ (frame-set-background-mode frame)
+ (face-set-after-frame-default frame)
+ (setq success t))
+ (unless success (delete-frame frame)))
frame))
(setq frame-creation-function 'make-msdos-frame)