aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/term
diff options
context:
space:
mode:
authorRichard M. Stallman1996-06-10 21:19:59 +0000
committerRichard M. Stallman1996-06-10 21:19:59 +0000
commit9000684d2ed66bba1d00a607d06f1ed849e7571f (patch)
tree5d25cf74933a844d0e40a27052e61ce80a039240 /lisp/term
parentbe625e000a33170643bf8ae791be60a4995a8749 (diff)
downloademacs-9000684d2ed66bba1d00a607d06f1ed849e7571f.tar.gz
emacs-9000684d2ed66bba1d00a607d06f1ed849e7571f.zip
(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/term')
-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 @@
204;; --------------------------------------------------------------------------- 204;; ---------------------------------------------------------------------------
205;; We want to delay setting frame parameters until the faces are setup 205;; We want to delay setting frame parameters until the faces are setup
206(defvar default-frame-alist nil) 206(defvar default-frame-alist nil)
207(modify-frame-parameters terminal-frame default-frame-alist)
207 208
208(defun msdos-face-setup () 209(defun msdos-face-setup ()
209 (modify-frame-parameters (selected-frame) default-frame-alist) 210 (modify-frame-parameters terminal-frame default-frame-alist)
210 211
211 (set-face-foreground 'bold "yellow") 212 (set-face-foreground 'bold "yellow" terminal-frame)
212 (set-face-foreground 'italic "red") 213 (set-face-foreground 'italic "red" terminal-frame)
213 (set-face-foreground 'bold-italic "lightred") 214 (set-face-foreground 'bold-italic "lightred" terminal-frame)
214 (set-face-foreground 'underline "white") 215 (set-face-foreground 'underline "white" terminal-frame)
215 (set-face-background 'region "green") 216 (set-face-background 'region "green" terminal-frame)
216 217
217 (make-face 'msdos-menu-active-face) 218 (make-face 'msdos-menu-active-face)
218 (make-face 'msdos-menu-passive-face) 219 (make-face 'msdos-menu-passive-face)
219 (make-face 'msdos-menu-select-face) 220 (make-face 'msdos-menu-select-face)
220 (set-face-foreground 'msdos-menu-active-face "white") 221 (set-face-foreground 'msdos-menu-active-face "white" terminal-frame)
221 (set-face-foreground 'msdos-menu-passive-face "lightgray") 222 (set-face-foreground 'msdos-menu-passive-face "lightgray" terminal-frame)
222 (set-face-background 'msdos-menu-active-face "blue") 223 (set-face-background 'msdos-menu-active-face "blue" terminal-frame)
223 (set-face-background 'msdos-menu-passive-face "blue") 224 (set-face-background 'msdos-menu-passive-face "blue" terminal-frame)
224 (set-face-background 'msdos-menu-select-face "red")) 225 (set-face-background 'msdos-menu-select-face "red" terminal-frame))
225 226
226;; We have only one font, so... 227;; We have only one font, so...
227(add-hook 'before-init-hook 'msdos-face-setup) 228(add-hook 'before-init-hook 'msdos-face-setup)
229
230;; We create frames as if we were a terminal, but with a twist.
231(defun make-msdos-frame (&optional parameters)
232 (let ((parms
233 (append initial-frame-alist default-frame-alist parameters nil)))
234 (make-terminal-frame parms)))
235
236(setq frame-creation-function 'make-msdos-frame)
237
228;; --------------------------------------------------------------------------- 238;; ---------------------------------------------------------------------------
229;; More or less useful imitations of certain X-functions. A lot of the 239;; More or less useful imitations of certain X-functions. A lot of the
230;; values returned are questionable, but usually only the form of the 240;; values returned are questionable, but usually only the form of the
@@ -233,8 +243,6 @@
233 243
234;; From src/xfns.c 244;; From src/xfns.c
235(defun x-display-color-p (&optional display) 't) 245(defun x-display-color-p (&optional display) 't)
236(fset 'focus-frame 'ignore)
237(fset 'unfocus-frame 'ignore)
238(defun x-list-fonts (pattern &optional face frame) (list "default")) 246(defun x-list-fonts (pattern &optional face frame) (list "default"))
239(defun x-color-defined-p (color) (numberp (msdos-color-translate color))) 247(defun x-color-defined-p (color) (numberp (msdos-color-translate color)))
240(defun x-display-pixel-width (&optional frame) (frame-width frame)) 248(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."
292(fset 'set-mouse-color 'ignore) ; We cannot, I think. 300(fset 'set-mouse-color 'ignore) ; We cannot, I think.
293(fset 'set-cursor-color 'ignore) ; Hardware determined by char under. 301(fset 'set-cursor-color 'ignore) ; Hardware determined by char under.
294(fset 'set-border-color 'ignore) ; Not useful. 302(fset 'set-border-color 'ignore) ; Not useful.
295(fset 'auto-raise-mode 'ignore)
296(fset 'auto-lower-mode 'ignore)
297(defun set-background-color (color-name)
298 "Set the background color of the selected frame to COLOR.
299When called interactively, prompt for the name of the color to use."
300 (interactive "sColor: ")
301 (modify-frame-parameters (selected-frame)
302 (list (cons 'background-color color-name))))
303(defun set-foreground-color (color-name)
304 "Set the foreground color of the selected frame to COLOR.
305When called interactively, prompt for the name of the color to use."
306 (interactive "sColor: ")
307 (modify-frame-parameters (selected-frame)
308 (list (cons 'foreground-color color-name))))
309;; --------------------------------------------------------------------------- 303;; ---------------------------------------------------------------------------
310;; Handle the X-like command line parameters "-fg" and "-bg" 304;; Handle the X-like command line parameters "-fg" and "-bg"
311(defun msdos-handle-args (args) 305(defun msdos-handle-args (args)
@@ -330,8 +324,3 @@ When called interactively, prompt for the name of the color to use."
330 324
331(setq command-line-args (msdos-handle-args command-line-args)) 325(setq command-line-args (msdos-handle-args command-line-args))
332;; --------------------------------------------------------------------------- 326;; ---------------------------------------------------------------------------
333(require 'faces)
334(if (msdos-mouse-p)
335 (progn
336 (require 'menu-bar)
337 (menu-bar-mode t)))