mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-18 18:05:07 +00:00
(msdos-bg-mode): New function.
(msdos-face-setup, make-msdos-frame): Set background-mode and display-type properties for created frames.
This commit is contained in:
parent
ad23b7e113
commit
e2f35ede08
@ -1,6 +1,6 @@
|
|||||||
;;; pc-win.el --- setup support for `PC windows' (whatever that is).
|
;;; pc-win.el --- setup support for `PC windows' (whatever that is).
|
||||||
|
|
||||||
;; Copyright (C) 1994, 1996 Free Software Foundation, Inc.
|
;; Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc.
|
||||||
|
|
||||||
;; Author: Morten Welinder <terra@diku.dk>
|
;; Author: Morten Welinder <terra@diku.dk>
|
||||||
;; Maintainer: FSF
|
;; Maintainer: FSF
|
||||||
@ -206,6 +206,14 @@
|
|||||||
(defvar default-frame-alist nil)
|
(defvar default-frame-alist nil)
|
||||||
(modify-frame-parameters terminal-frame default-frame-alist)
|
(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))))
|
||||||
|
(if (member bg '("black" "blue" "darkgray" "green"))
|
||||||
|
'dark
|
||||||
|
'light)))
|
||||||
|
|
||||||
(defun msdos-face-setup ()
|
(defun msdos-face-setup ()
|
||||||
(modify-frame-parameters terminal-frame default-frame-alist)
|
(modify-frame-parameters terminal-frame default-frame-alist)
|
||||||
|
|
||||||
@ -222,16 +230,25 @@
|
|||||||
(set-face-foreground 'msdos-menu-passive-face "lightgray" 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-active-face "blue" terminal-frame)
|
||||||
(set-face-background 'msdos-menu-passive-face "blue" terminal-frame)
|
(set-face-background 'msdos-menu-passive-face "blue" terminal-frame)
|
||||||
(set-face-background 'msdos-menu-select-face "red" terminal-frame))
|
(set-face-background 'msdos-menu-select-face "red" terminal-frame)
|
||||||
|
(modify-frame-parameters terminal-frame
|
||||||
|
(list (cons 'background-mode
|
||||||
|
(msdos-bg-mode terminal-frame))
|
||||||
|
(cons 'display-type 'color))))
|
||||||
|
|
||||||
;; We have only one font, so...
|
;; We have only one font, so...
|
||||||
(add-hook 'before-init-hook 'msdos-face-setup)
|
(add-hook 'before-init-hook 'msdos-face-setup)
|
||||||
|
|
||||||
;; We create frames as if we were a terminal, but with a twist.
|
;; We create frames as if we were a terminal, but with a twist.
|
||||||
(defun make-msdos-frame (&optional parameters)
|
(defun make-msdos-frame (&optional parameters)
|
||||||
(let ((parms
|
(let* ((parms
|
||||||
(append initial-frame-alist default-frame-alist parameters nil)))
|
(append initial-frame-alist default-frame-alist parameters nil))
|
||||||
(make-terminal-frame parms)))
|
(frame (make-terminal-frame parms)))
|
||||||
|
(modify-frame-parameters frame
|
||||||
|
(list (cons 'background-mode
|
||||||
|
(msdos-bg-mode frame))
|
||||||
|
(cons 'display-type 'color)))
|
||||||
|
frame))
|
||||||
|
|
||||||
(setq frame-creation-function 'make-msdos-frame)
|
(setq frame-creation-function 'make-msdos-frame)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user