annotate lisp/term/pc-win.el @ 10281:44d98e169823

(server-process-filter): Process each line separately. (server-buffer-done): Delete dead buffers from CLIENT list. Wait a while after sending a command to emacsclient. Verify that BUFFER is a buffer.
author Richard M. Stallman <rms@gnu.org>
date Thu, 29 Dec 1994 01:43:50 +0000
parents b37425ecb3f0
children be831ed47a75
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9571
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
1 ;; pc-win.el -- setup support for `PC windows' (whatever that is).
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
2
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
3 ;; Copyright (C) 1994 Free Software Foundation, Inc.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
4
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
5 ;; Author: Morten Welinder <terra@diku.dk>
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
6 ;; Version: 1,00
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
7
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
8 ;; This file is part of GNU Emacs.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
9
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
11 ;; it under the terms of the GNU General Public License as published by
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
12 ;; the Free Software Foundation; either version 2, or (at your option)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
13 ;; any later version.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
14
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
15 ;; GNU Emacs is distributed in the hope that it will be useful,
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
18 ;; GNU General Public License for more details.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
19
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
20 ;; You should have received a copy of the GNU General Public License
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
21 ;; along with GNU Emacs; see the file COPYING. If not, write to
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
22 ;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
23 ;; ---------------------------------------------------------------------------
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
24 (load "term/internal" nil t)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
25
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
26 ;; Color translation -- doesn't really need to be fast
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
27
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
28 (defvar msdos-color-aliases
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
29 '(("purple" . "magenta")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
30 ("firebrick" . "red") ; ?
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
31 ("pink" . "lightred")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
32 ("royalblue" . "blue")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
33 ("cadetblue" . "blue")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
34 ("forestgreen" . "green")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
35 ("darkolivegreen" . "green")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
36 ("darkgoldenrod" . "brown")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
37 ("goldenrod" . "yellow")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
38 ("grey40" . "darkgray")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
39 ("rosybrown" . "brown"))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
40 "List of alternate names for colors.")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
41
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
42 (defun msdos-color-translate (name)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
43 (setq name (downcase name))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
44 (let* ((len (length name))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
45 (val (cdr (assoc name
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
46 '(("black" . 0)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
47 ("blue" . 1)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
48 ("green" . 2)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
49 ("cyan" . 3)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
50 ("red" . 4)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
51 ("magenta" . 5)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
52 ("brown" . 6)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
53 ("lightgray" . 7) ("light gray" . 7)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
54 ("darkgray" . 8) ("dark gray" . 8)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
55 ("lightblue" . 9)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
56 ("lightgreen" . 10)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
57 ("lightcyan" . 11)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
58 ("lightred" . 12)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
59 ("lightmagenta" . 13)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
60 ("yellow" . 14)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
61 ("white" . 15)))))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
62 (try))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
63 (or val
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
64 (and (setq try (cdr (assoc name msdos-color-aliases)))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
65 (msdos-color-translate try))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
66 (and (> len 5)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
67 (string= "light" (substring name 0 4))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
68 (setq try (msdos-color-translate (substring name 5)))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
69 (logior try 8))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
70 (and (> len 6)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
71 (string= "light " (substring name 0 5))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
72 (setq try (msdos-color-translate (substring name 6)))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
73 (logior try 8))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
74 (and (> len 4)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
75 (string= "dark" (substring name 0 3))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
76 (msdos-color-translate (substring name 4)))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
77 (and (> len 5)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
78 (string= "dark " (substring name 0 4))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
79 (msdos-color-translate (substring name 5))))))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
80 ;; ---------------------------------------------------------------------------
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
81 ;; We want to delay setting frame parameters until the faces are setup
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
82 (defvar default-frame-alist nil)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
83
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
84 (defun msdos-face-setup ()
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
85 (modify-frame-parameters (selected-frame) default-frame-alist)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
86
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
87 (set-face-foreground 'bold "white")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
88 (set-face-foreground 'italic "red")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
89 (set-face-foreground 'bold-italic "yellow")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
90 (set-face-foreground 'underline "blue")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
91 (set-face-background 'region "green")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
92
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
93 (make-face 'msdos-menu-active-face)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
94 (make-face 'msdos-menu-passive-face)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
95 (make-face 'msdos-menu-select-face)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
96 (set-face-foreground 'msdos-menu-active-face "white")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
97 (set-face-foreground 'msdos-menu-passive-face "lightgray")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
98 (set-face-background 'msdos-menu-active-face "blue")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
99 (set-face-background 'msdos-menu-passive-face "blue")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
100 (set-face-background 'msdos-menu-select-face "red"))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
101
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
102 ;; We have only one font, so...
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
103 (add-hook 'before-init-hook 'msdos-face-setup)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
104 ;; ---------------------------------------------------------------------------
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
105 ;; More or less useful immitations of certain X-functions. A lot of the
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
106 ;; values returned are questionable, but usually only the form of the
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
107 ;; returned value matters. Also, by the way, recall that `ignore' is
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
108 ;; a useful function for returning 'nil regardless of argument.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
109
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
110 ;; From src/xfns.c
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
111 (defun x-display-color-p () 't)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
112 (fset 'focus-frame 'ignore)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
113 (fset 'unfocus-frame 'ignore)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
114 (defun x-list-fonts (pattern &optional face frame) (list "default"))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
115 (defun x-color-defined-p (color) (numberp (msdos-color-translate color)))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
116 (defun x-display-pixel-width (&optional frame) (* 8 (frame-width frame)))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
117 (defun x-display-pixel-height (&optional frame) (* 8 (frame-height frame)))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
118 (defun x-display-planes (&optional frame) 4) ; 3 for background, actually
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
119 (defun x-display-color-cells (&optional frame) 16) ; ???
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
120 (defun x-server-max-request-size (&optional frame) 1000000) ; ???
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
121 (defun x-server-vendor (&optional frame) t "GNU")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
122 (defun x-server-version (&optional frame) '(1 0 0))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
123 (defun x-display-screens (&optional frame) 1)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
124 (defun x-display-mm-height (&optional frame) 200) ; Guess the size of my
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
125 (defun x-display-mm-width (&optional frame) 253) ; monitor, MW...
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
126 (defun x-display-backing-store (&optional frame) 'not-useful)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
127 (defun x-display-visual-class (&optional frame) 'static-color)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
128 (fset 'x-display-save-under 'ignore)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
129 (fset 'x-get-resource 'ignore)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
130
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
131 ;; From lisp/term/x-win.el
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
132 (setq x-display-name "pc")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
133 (setq split-window-keep-point t)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
134
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
135 ;; From lisp/select.el
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
136 (defun x-get-selection (&rest rest) "")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
137 (fset 'x-set-selection 'ignore)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
138
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
139 ;; From lisp/frame.el
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
140 (fset 'set-default-font 'ignore)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
141 (fset 'set-mouse-color 'ignore) ; We cannot, I think.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
142 (fset 'set-cursor-color 'ignore) ; Hardware determined by char under.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
143 (fset 'set-border-color 'ignore) ; Not useful.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
144 (fset 'auto-raise-mode 'ignore)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
145 (fset 'auto-lower-mode 'ignore)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
146 (defun set-background-color (color-name)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
147 "Set the background color of the selected frame to COLOR.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
148 When called interactively, prompt for the name of the color to use."
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
149 (interactive "sColor: ")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
150 (modify-frame-parameters (selected-frame)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
151 (list (cons 'background-color color-name))))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
152 (defun set-foreground-color (color-name)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
153 "Set the foreground color of the selected frame to COLOR.
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
154 When called interactively, prompt for the name of the color to use."
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
155 (interactive "sColor: ")
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
156 (modify-frame-parameters (selected-frame)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
157 (list (cons 'foreground-color color-name))))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
158 ;; ---------------------------------------------------------------------------
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
159 ;; Handle the X-like command line parameters "-fg" and "-bg"
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
160 (defun msdos-handle-args (args)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
161 (let ((rest nil))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
162 (while args
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
163 (let ((this (car args)))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
164 (setq args (cdr args))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
165 (cond ((or (string= this "-fg") (string= this "-foreground"))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
166 (if args
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
167 (setq default-frame-alist
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
168 (cons (cons 'foreground-color (car args))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
169 default-frame-alist)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
170 args (cdr args))))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
171 ((or (string= this "-bg") (string= this "-background"))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
172 (if args
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
173 (setq default-frame-alist
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
174 (cons (cons 'background-color (car args))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
175 default-frame-alist)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
176 args (cdr args))))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
177 (t (setq rest (cons this rest))))))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
178 (nreverse rest)))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
179
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
180 (setq command-line-args (msdos-handle-args command-line-args))
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
181 ;; ---------------------------------------------------------------------------
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
182 (require 'faces)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
183 (if (msdos-mouse-p)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
184 (progn
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
185 (require 'menu-bar)
b37425ecb3f0 Initial revision
Morten Welinder <terra@diku.dk>
parents:
diff changeset
186 (menu-bar-mode t)))