From: Eli Zaretskii Date: Tue, 10 Aug 1999 10:21:18 +0000 (+0000) Subject: (msdos-bg-mode): Remove. Call X-Git-Tag: emacs-pretest-21.0.90~7230 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=68a89a250a1a322c14a6e2637f64d2a5432977df;p=emacs.git (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. --- diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el index 0f3cb87e6ea..e1fb6882a89 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)