summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-06-10 21:19:59 +0000
committerRichard M. Stallman <rms@gnu.org>1996-06-10 21:19:59 +0000
commita2fea1ab5c1b37dab00969ce5eef98c60cdedf09 (patch)
treedf28917e57b39b6a7e4e3af68a0eb2813e2d0bd2 /lisp
parentaad6e09926e0a890a29b52745faa3b56c594e29a (diff)
downloademacs-a2fea1ab5c1b37dab00969ce5eef98c60cdedf09.tar.gz
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
(make-msdos-frame): New MSDOS-specific frame creation function. (focus-frame, unfocus-frame): Don't set to 'ignore. (auto-raise-mode, auto-lower-mode): Likewise. (set-background-color, set-foreground-color): Definitions deleted.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/term/pc-win.el53
1 files changed, 21 insertions, 32 deletions
diff --git a/lisp/term/pc-win.el b/lisp/term/pc-win.el
index 18ba27a9a1c..57ba7eb1568 100644
--- a/lisp/term/pc-win.el
+++ b/lisp/term/pc-win.el
@@ -204,27 +204,37 @@
;; ---------------------------------------------------------------------------
;; We want to delay setting frame parameters until the faces are setup
(defvar default-frame-alist nil)
+(modify-frame-parameters terminal-frame default-frame-alist)
(defun msdos-face-setup ()
- (modify-frame-parameters (selected-frame) default-frame-alist)
+ (modify-frame-parameters terminal-frame default-frame-alist)
- (set-face-foreground 'bold "yellow")
- (set-face-foreground 'italic "red")
- (set-face-foreground 'bold-italic "lightred")
- (set-face-foreground 'underline "white")
- (set-face-background 'region "green")
+ (set-face-foreground 'bold "yellow" terminal-frame)
+ (set-face-foreground 'italic "red" terminal-frame)
+ (set-face-foreground 'bold-italic "lightred" terminal-frame)
+ (set-face-foreground 'underline "white" terminal-frame)
+ (set-face-background 'region "green" terminal-frame)
(make-face 'msdos-menu-active-face)
(make-face 'msdos-menu-passive-face)
(make-face 'msdos-menu-select-face)
- (set-face-foreground 'msdos-menu-active-face "white")
- (set-face-foreground 'msdos-menu-passive-face "lightgray")
- (set-face-background 'msdos-menu-active-face "blue")
- (set-face-background 'msdos-menu-passive-face "blue")
- (set-face-background 'msdos-menu-select-face "red"))
+ (set-face-foreground 'msdos-menu-active-face "white" terminal-frame)
+ (set-face-foreground 'msdos-menu-passive-face "lightgray" terminal-frame)
+ (set-face-background 'msdos-menu-active-face "blue" terminal-frame)
+ (set-face-background 'msdos-menu-passive-face "blue" terminal-frame)
+ (set-face-background 'msdos-menu-select-face "red" terminal-frame))
;; We have only one font, so...
(add-hook 'before-init-hook 'msdos-face-setup)
+
+;; We create frames as if we were a terminal, but with a twist.
+(defun make-msdos-frame (&optional parameters)
+ (let ((parms
+ (append initial-frame-alist default-frame-alist parameters nil)))
+ (make-terminal-frame parms)))
+
+(setq frame-creation-function 'make-msdos-frame)
+
;; ---------------------------------------------------------------------------
;; More or less useful imitations of certain X-functions. A lot of the
;; values returned are questionable, but usually only the form of the
@@ -233,8 +243,6 @@
;; From src/xfns.c
(defun x-display-color-p (&optional display) 't)
-(fset 'focus-frame 'ignore)
-(fset 'unfocus-frame 'ignore)
(defun x-list-fonts (pattern &optional face frame) (list "default"))
(defun x-color-defined-p (color) (numberp (msdos-color-translate color)))
(defun x-display-pixel-width (&optional frame) (frame-width frame))
@@ -292,20 +300,6 @@ The value may be different for frames on different X displays."
(fset 'set-mouse-color 'ignore) ; We cannot, I think.
(fset 'set-cursor-color 'ignore) ; Hardware determined by char under.
(fset 'set-border-color 'ignore) ; Not useful.
-(fset 'auto-raise-mode 'ignore)
-(fset 'auto-lower-mode 'ignore)
-(defun set-background-color (color-name)
- "Set the background color of the selected frame to COLOR.
-When called interactively, prompt for the name of the color to use."
- (interactive "sColor: ")
- (modify-frame-parameters (selected-frame)
- (list (cons 'background-color color-name))))
-(defun set-foreground-color (color-name)
- "Set the foreground color of the selected frame to COLOR.
-When called interactively, prompt for the name of the color to use."
- (interactive "sColor: ")
- (modify-frame-parameters (selected-frame)
- (list (cons 'foreground-color color-name))))
;; ---------------------------------------------------------------------------
;; Handle the X-like command line parameters "-fg" and "-bg"
(defun msdos-handle-args (args)
@@ -330,8 +324,3 @@ When called interactively, prompt for the name of the color to use."
(setq command-line-args (msdos-handle-args command-line-args))
;; ---------------------------------------------------------------------------
-(require 'faces)
-(if (msdos-mouse-p)
- (progn
- (require 'menu-bar)
- (menu-bar-mode t)))