Mercurial > emacs
annotate lisp/term/pc-win.el @ 21333:a6119c0748e9
(follow-scroll-up): Cope if `window-end' returns nil.
(follow-select-if-end-visible): Likewise.
(follow-mode-version): Variable removed.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 02 Apr 1998 03:37:18 +0000 |
parents | 2c0e89d1488b |
children | 70d6549a4105 |
rev | line source |
---|---|
17517 | 1 ;;; pc-win.el --- setup support for `PC windows' (whatever that is). |
9571 | 2 |
18770
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
3 ;; Copyright (C) 1994, 1996, 1997 Free Software Foundation, Inc. |
9571 | 4 |
5 ;; Author: Morten Welinder <terra@diku.dk> | |
14734 | 6 ;; Maintainer: FSF |
9571 | 7 |
8 ;; This file is part of GNU Emacs. | |
9 | |
10 ;; GNU Emacs is free software; you can redistribute it and/or modify | |
11 ;; it under the terms of the GNU General Public License as published by | |
12 ;; the Free Software Foundation; either version 2, or (at your option) | |
13 ;; any later version. | |
14 | |
15 ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 ;; GNU General Public License for more details. | |
19 | |
20 ;; You should have received a copy of the GNU General Public License | |
14170
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
14040
diff
changeset
|
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
14040
diff
changeset
|
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
14040
diff
changeset
|
23 ;; Boston, MA 02111-1307, USA. |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
14040
diff
changeset
|
24 |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
14040
diff
changeset
|
25 ;;; Code: |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
14040
diff
changeset
|
26 |
9571 | 27 (load "term/internal" nil t) |
28 | |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
29 ;; Color translation -- doesn't really need to be fast. |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
30 ;; Colors listed here do not include the "light-", |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
31 ;; "medium-" and "dark-" prefixes that are accounted for |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
32 ;; by `msdos-color-translate', which see below). |
9571 | 33 |
34 (defvar msdos-color-aliases | |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
35 '(("snow" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
36 ("ghost white" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
37 ("ghostwhite" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
38 ("white smoke" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
39 ("whitesmoke" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
40 ("gainsboro" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
41 ("floral white" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
42 ("floralwhite" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
43 ("old lace" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
44 ("oldlace" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
45 ("linen" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
46 ("antique white" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
47 ("antiquewhite" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
48 ("papaya whip" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
49 ("papayawhip" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
50 ("blanched almond" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
51 ("blanchedalmond" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
52 ("bisque" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
53 ("peach puff" . "lightred") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
54 ("peachpuff" . "lightred") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
55 ("navajo white" . "lightred") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
56 ("navajowhite" . "lightred") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
57 ("moccasin" . "lightred") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
58 ("cornsilk" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
59 ("ivory" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
60 ("lemon chiffon" . "yellow") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
61 ("lemonchiffon" . "yellow") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
62 ("seashell" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
63 ("honeydew" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
64 ("mint cream" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
65 ("mintcream" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
66 ("azure" . "lightcyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
67 ("alice blue" . "lightcyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
68 ("aliceblue" . "lightcyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
69 ("lavender" . "lightcyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
70 ("lavender blush" . "lightcyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
71 ("lavenderblush" . "lightcyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
72 ("misty rose" . "lightred") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
73 ("mistyrose" . "lightred") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
74 ("aquamarine" . "blue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
75 ("cadet blue" . "blue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
76 ("cadetblue" . "blue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
77 ("cornflower blue" . "lightblue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
78 ("cornflowerblue" . "lightblue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
79 ("midnight blue" . "blue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
80 ("midnightblue" . "blue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
81 ("navy blue" . "cyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
82 ("navyblue" . "cyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
83 ("navy" . "cyan") |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
84 ("royalblue" . "blue") |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
85 ("royal blue" . "blue") |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
86 ("sky blue" . "lightblue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
87 ("skyblue" . "lightblue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
88 ("dodger blue" . "blue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
89 ("dodgerblue" . "blue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
90 ("powder blue" . "lightblue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
91 ("powderblue" . "lightblue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
92 ("slate blue" . "cyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
93 ("slateblue" . "cyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
94 ("steel blue" . "blue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
95 ("steelblue" . "blue") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
96 ("coral" . "lightred") |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
97 ("tomato" . "lightred") |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
98 ("firebrick" . "red") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
99 ("gold" . "yellow") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
100 ("goldenrod" . "yellow") |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
101 ("goldenrod yellow" . "yellow") |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
102 ("goldenrodyellow" . "yellow") |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
103 ("pale goldenrod" . "yellow") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
104 ("palegoldenrod" . "yellow") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
105 ("olive green" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
106 ("olivegreen" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
107 ("olive drab" . "green") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
108 ("olivedrab" . "green") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
109 ("forest green" . "green") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
110 ("forestgreen" . "green") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
111 ("lime green" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
112 ("limegreen" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
113 ("sea green" . "lightcyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
114 ("seagreen" . "lightcyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
115 ("spring green" . "green") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
116 ("springgreen" . "green") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
117 ("lawn green" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
118 ("lawngreen" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
119 ("chartreuse" . "yellow") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
120 ("yellow green" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
121 ("yellowgreen" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
122 ("green yellow" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
123 ("greenyellow" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
124 ("slate grey" . "lightgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
125 ("slategrey" . "lightgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
126 ("slate gray" . "lightgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
127 ("slategray" . "lightgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
128 ("dim grey" . "darkgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
129 ("dimgrey" . "darkgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
130 ("dim gray" . "darkgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
131 ("dimgray" . "darkgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
132 ("light grey" . "lightgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
133 ("lightgrey" . "lightgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
134 ("light gray" . "lightgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
135 ("gray" . "darkgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
136 ("grey" . "darkgray") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
137 ("khaki" . "green") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
138 ("maroon" . "red") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
139 ("orange" . "brown") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
140 ("orchid" . "brown") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
141 ("saddle brown" . "red") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
142 ("saddlebrown" . "red") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
143 ("peru" . "red") |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
144 ("burlywood" . "brown") |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
145 ("sandy brown" . "brown") |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
146 ("sandybrown" . "brown") |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
147 ("pink" . "lightred") |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
148 ("hotpink" . "lightred") |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
149 ("hot pink" ."lightred") |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
150 ("plum" . "magenta") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
151 ("indian red" . "red") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
152 ("indianred" . "red") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
153 ("violet red" . "magenta") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
154 ("violetred" . "magenta") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
155 ("orange red" . "red") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
156 ("orangered" . "red") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
157 ("salmon" . "lightred") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
158 ("sienna" . "lightred") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
159 ("tan" . "lightred") |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
160 ("chocolate" . "brown") |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
161 ("thistle" . "magenta") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
162 ("turquoise" . "lightgreen") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
163 ("pale turquoise" . "cyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
164 ("paleturquoise" . "cyan") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
165 ("violet" . "magenta") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
166 ("blue violet" . "lightmagenta") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
167 ("blueviolet" . "lightmagenta") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
168 ("wheat" . "white") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
169 ("green yellow" . "yellow") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
170 ("greenyellow" . "yellow") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
171 ("purple" . "magenta") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
172 ("rosybrown" . "brown") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
173 ("rosy brown" . "brown") |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
174 ("beige" . "brown")) |
9571 | 175 "List of alternate names for colors.") |
176 | |
177 (defun msdos-color-translate (name) | |
178 (setq name (downcase name)) | |
179 (let* ((len (length name)) | |
13924
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
180 (val (- (length x-colors) |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
181 (length (member name x-colors)))) |
9571 | 182 (try)) |
13924
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
183 (if (or (< val 0) (>= val (length x-colors))) (setq val nil)) |
9571 | 184 (or val |
185 (and (setq try (cdr (assoc name msdos-color-aliases))) | |
186 (msdos-color-translate try)) | |
187 (and (> len 5) | |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
188 (string= "light" (substring name 0 5)) |
9571 | 189 (setq try (msdos-color-translate (substring name 5))) |
190 (logior try 8)) | |
191 (and (> len 6) | |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
192 (string= "light " (substring name 0 6)) |
9571 | 193 (setq try (msdos-color-translate (substring name 6))) |
194 (logior try 8)) | |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
195 (and (> len 4) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
196 (string= "pale" (substring name 0 4)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
197 (setq try (msdos-color-translate (substring name 4))) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
198 (logior try 8)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
199 (and (> len 5) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
200 (string= "pale " (substring name 0 5)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
201 (setq try (msdos-color-translate (substring name 5))) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
202 (logior try 8)) |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
203 (and (> len 6) |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
204 (string= "medium" (substring name 0 6)) |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
205 (msdos-color-translate (substring name 6))) |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
206 (and (> len 7) |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
207 (string= "medium " (substring name 0 7)) |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
208 (msdos-color-translate (substring name 7))) |
9571 | 209 (and (> len 4) |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
210 (or (string= "dark" (substring name 0 4)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
211 (string= "deep" (substring name 0 4))) |
9571 | 212 (msdos-color-translate (substring name 4))) |
213 (and (> len 5) | |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
214 (or (string= "dark " (substring name 0 5)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
215 (string= "deep " (substring name 0 5))) |
19290
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
216 (msdos-color-translate (substring name 5))) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
217 (and (> len 4) ;; gray shades: gray0 to gray100 |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
218 (save-match-data |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
219 (and |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
220 (string-match "gr[ae]y[0-9]" name) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
221 (string-match "[0-9]+\\'" name) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
222 (let ((num (string-to-int |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
223 (substring name (match-beginning 0))))) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
224 (msdos-color-translate |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
225 (cond |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
226 ((> num 90) "white") |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
227 ((> num 50) "lightgray") |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
228 ((> num 10) "darkgray") |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
229 (t "black"))))))) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
230 (and (> len 1) ;; purple1 to purple4 and the like |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
231 (save-match-data |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
232 (and |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
233 (string-match "[1-4]\\'" name) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
234 (msdos-color-translate |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
235 (substring name 0 (match-beginning 0))))))))) |
9571 | 236 ;; --------------------------------------------------------------------------- |
237 ;; We want to delay setting frame parameters until the faces are setup | |
238 (defvar default-frame-alist nil) | |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
239 (modify-frame-parameters terminal-frame default-frame-alist) |
9571 | 240 |
18770
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
241 (defun msdos-bg-mode (&optional frame) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
242 (let* ((frame (or frame (selected-frame))) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
243 (params (frame-parameters frame)) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
244 (bg (cdr (assq 'background-color params)))) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
245 (if (member bg '("black" "blue" "darkgray" "green")) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
246 'dark |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
247 'light))) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
248 |
9571 | 249 (defun msdos-face-setup () |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
250 (modify-frame-parameters terminal-frame default-frame-alist) |
9571 | 251 |
19290
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
252 (modify-frame-parameters terminal-frame |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
253 (list (cons 'background-mode |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
254 (msdos-bg-mode terminal-frame)) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
255 (cons 'display-type 'color))) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
256 (face-set-after-frame-default terminal-frame) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
257 |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
258 (set-face-foreground 'bold "yellow" terminal-frame) |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
259 (set-face-foreground 'italic "red" terminal-frame) |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
260 (set-face-foreground 'bold-italic "lightred" terminal-frame) |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
261 (set-face-foreground 'underline "white" terminal-frame) |
9571 | 262 |
263 (make-face 'msdos-menu-active-face) | |
264 (make-face 'msdos-menu-passive-face) | |
265 (make-face 'msdos-menu-select-face) | |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
266 (set-face-foreground 'msdos-menu-active-face "white" terminal-frame) |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
267 (set-face-foreground 'msdos-menu-passive-face "lightgray" terminal-frame) |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
268 (set-face-background 'msdos-menu-active-face "blue" terminal-frame) |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
269 (set-face-background 'msdos-menu-passive-face "blue" terminal-frame) |
19290
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
270 (set-face-background 'msdos-menu-select-face "red" terminal-frame)) |
9571 | 271 |
272 ;; We have only one font, so... | |
273 (add-hook 'before-init-hook 'msdos-face-setup) | |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
274 |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
275 ;; We create frames as if we were a terminal, but with a twist. |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
276 (defun make-msdos-frame (&optional parameters) |
18770
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
277 (let* ((parms |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
278 (append initial-frame-alist default-frame-alist parameters nil)) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
279 (frame (make-terminal-frame parms))) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
280 (modify-frame-parameters frame |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
281 (list (cons 'background-mode |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
282 (msdos-bg-mode frame)) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
283 (cons 'display-type 'color))) |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
284 frame)) |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
285 |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
286 (setq frame-creation-function 'make-msdos-frame) |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
287 |
9571 | 288 ;; --------------------------------------------------------------------------- |
14040 | 289 ;; More or less useful imitations of certain X-functions. A lot of the |
9571 | 290 ;; values returned are questionable, but usually only the form of the |
291 ;; returned value matters. Also, by the way, recall that `ignore' is | |
292 ;; a useful function for returning 'nil regardless of argument. | |
293 | |
294 ;; From src/xfns.c | |
13484
be831ed47a75
(x-display-color-p): Accept optional arg.
Richard M. Stallman <rms@gnu.org>
parents:
9571
diff
changeset
|
295 (defun x-display-color-p (&optional display) 't) |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
296 (defun x-list-fonts (pattern &optional face frame maximum width) |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
297 (if (and (numberp width) (= width 1)) |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
298 (list "default") |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
299 (list "no-such-font"))) |
9571 | 300 (defun x-color-defined-p (color) (numberp (msdos-color-translate color))) |
14520
e46b1e676418
(x-display-pixel-height, x-display-pixel-width):
Richard M. Stallman <rms@gnu.org>
parents:
14170
diff
changeset
|
301 (defun x-display-pixel-width (&optional frame) (frame-width frame)) |
e46b1e676418
(x-display-pixel-height, x-display-pixel-width):
Richard M. Stallman <rms@gnu.org>
parents:
14170
diff
changeset
|
302 (defun x-display-pixel-height (&optional frame) (frame-height frame)) |
9571 | 303 (defun x-display-planes (&optional frame) 4) ; 3 for background, actually |
304 (defun x-display-color-cells (&optional frame) 16) ; ??? | |
305 (defun x-server-max-request-size (&optional frame) 1000000) ; ??? | |
306 (defun x-server-vendor (&optional frame) t "GNU") | |
307 (defun x-server-version (&optional frame) '(1 0 0)) | |
308 (defun x-display-screens (&optional frame) 1) | |
309 (defun x-display-mm-height (&optional frame) 200) ; Guess the size of my | |
310 (defun x-display-mm-width (&optional frame) 253) ; monitor, MW... | |
311 (defun x-display-backing-store (&optional frame) 'not-useful) | |
312 (defun x-display-visual-class (&optional frame) 'static-color) | |
313 (fset 'x-display-save-under 'ignore) | |
314 (fset 'x-get-resource 'ignore) | |
315 | |
316 ;; From lisp/term/x-win.el | |
317 (setq x-display-name "pc") | |
318 (setq split-window-keep-point t) | |
13924
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
319 (defvar x-colors '("black" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
320 "blue" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
321 "green" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
322 "cyan" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
323 "red" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
324 "magenta" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
325 "brown" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
326 "lightgray" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
327 "darkgray" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
328 "lightblue" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
329 "lightgreen" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
330 "lightcyan" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
331 "lightred" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
332 "lightmagenta" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
333 "yellow" |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
334 "white") |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
335 "The list of colors available on a PC display under MS-DOS.") |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
336 (defun x-defined-colors (&optional frame) |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
337 "Return a list of colors supported for a particular frame. |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
338 The argument FRAME specifies which frame to try. |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
339 The value may be different for frames on different X displays." |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
340 x-colors) |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
341 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
342 ;; From lisp/term/win32-win.el |
13924
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
343 ; |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
344 ;;;; Selections and cut buffers |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
345 ; |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
346 ;;; We keep track of the last text selected here, so we can check the |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
347 ;;; current selection against it, and avoid passing back our own text |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
348 ;;; from x-cut-buffer-or-selection-value. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
349 (defvar x-last-selected-text nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
350 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
351 (defvar x-select-enable-clipboard t |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
352 "Non-nil means cutting and pasting uses the clipboard. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
353 This is in addition to the primary selection.") |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
354 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
355 (defun x-select-text (text &optional push) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
356 (if x-select-enable-clipboard |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
357 (win16-set-clipboard-data text)) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
358 (setq x-last-selected-text text)) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
359 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
360 ;;; Return the value of the current selection. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
361 ;;; Consult the selection, then the cut buffer. Treat empty strings |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
362 ;;; as if they were unset. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
363 (defun x-get-selection-value () |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
364 (if x-select-enable-clipboard |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
365 (let (text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
366 ;; Don't die if x-get-selection signals an error. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
367 (condition-case c |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
368 (setq text (win16-get-clipboard-data)) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
369 (error (message "win16-get-clipboard-data:%s" c))) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
370 (if (string= text "") (setq text nil)) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
371 (cond |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
372 ((not text) nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
373 ((eq text x-last-selected-text) nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
374 ((string= text x-last-selected-text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
375 ;; Record the newer string, so subsequent calls can use the 'eq' test. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
376 (setq x-last-selected-text text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
377 nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
378 (t |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
379 (setq x-last-selected-text text)))))) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
380 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
381 ;;; Arrange for the kill and yank functions to set and check the clipboard. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
382 (setq interprogram-cut-function 'x-select-text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
383 (setq interprogram-paste-function 'x-get-selection-value) |
9571 | 384 |
13628
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
385 ;; From lisp/faces.el: we only have one font, so always return |
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
386 ;; it, no matter which variety they've asked for. |
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
387 (defun x-frob-font-slant (font which) |
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
388 font) |
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
389 |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
390 ;; From src/fontset.c: |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
391 (fset 'query-fontset 'ignore) |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
392 |
16643
734b72203ac5
(iconify-or-deiconify-frame): Define to be a
Richard M. Stallman <rms@gnu.org>
parents:
15397
diff
changeset
|
393 ;; From lisp/term/x-win.el: make iconify-or-deiconify-frame a no-op. |
734b72203ac5
(iconify-or-deiconify-frame): Define to be a
Richard M. Stallman <rms@gnu.org>
parents:
15397
diff
changeset
|
394 (fset 'iconify-or-deiconify-frame 'ignore) |
734b72203ac5
(iconify-or-deiconify-frame): Define to be a
Richard M. Stallman <rms@gnu.org>
parents:
15397
diff
changeset
|
395 |
9571 | 396 ;; From lisp/frame.el |
397 (fset 'set-default-font 'ignore) | |
398 (fset 'set-mouse-color 'ignore) ; We cannot, I think. | |
399 (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. | |
400 (fset 'set-border-color 'ignore) ; Not useful. | |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
401 |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
402 ;; From lisp/term/x-win.el: |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
403 (defconst x-long-option-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
404 '(("--name" . "-name") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
405 ("--title" . "-T") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
406 ("--reverse-video" . "-reverse") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
407 ("--foreground-color" . "-fg") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
408 ("--background-color" . "-bg"))) |
9571 | 409 ;; --------------------------------------------------------------------------- |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
410 ;; Handle the X-like command line parameters "-fg", "-bg", "-name", etc. |
9571 | 411 (defun msdos-handle-args (args) |
412 (let ((rest nil)) | |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
413 (message "%s" args) |
9571 | 414 (while args |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
415 (let* ((this (car args)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
416 (orig-this this) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
417 completion argval) |
9571 | 418 (setq args (cdr args)) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
419 ;; Check for long options with attached arguments |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
420 ;; and separate out the attached option argument into argval. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
421 (if (string-match "^--[^=]*=" this) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
422 (setq argval (substring this (match-end 0)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
423 this (substring this 0 (1- (match-end 0))))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
424 (setq completion (try-completion this x-long-option-alist)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
425 (if (eq completion t) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
426 ;; Exact match for long option. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
427 (setq this (cdr (assoc this x-long-option-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
428 (if (stringp completion) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
429 (let ((elt (assoc completion x-long-option-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
430 ;; Check for abbreviated long option. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
431 (or elt |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
432 (error "Option `%s' is ambiguous" this)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
433 (setq this (cdr elt))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
434 ;; Check for a short option. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
435 (setq argval nil this orig-this))) |
9571 | 436 (cond ((or (string= this "-fg") (string= this "-foreground")) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
437 (or argval (setq argval (car args) args (cdr args))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
438 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
439 (cons (cons 'foreground-color argval) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
440 default-frame-alist))) |
9571 | 441 ((or (string= this "-bg") (string= this "-background")) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
442 (or argval (setq argval (car args) args (cdr args))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
443 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
444 (cons (cons 'background-color argval) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
445 default-frame-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
446 ((or (string= this "-T") (string= this "-name")) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
447 (or argval (setq argval (car args) args (cdr args))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
448 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
449 (cons |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
450 (cons 'title |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
451 (if (stringp argval) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
452 argval |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
453 (let ((case-fold-search t) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
454 i) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
455 (setq argval (invocation-name)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
456 |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
457 ;; Change any . or * characters in name to |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
458 ;; hyphens, so as to emulate behavior on X. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
459 (while |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
460 (setq i (string-match "[.*]" argval)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
461 (aset argval i ?-)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
462 argval))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
463 default-frame-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
464 ((or (string= this "-r") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
465 (string= this "-rv") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
466 (string= this "-reverse")) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
467 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
468 (cons '(reverse . t) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
469 default-frame-alist))) |
9571 | 470 (t (setq rest (cons this rest)))))) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
471 (nreverse rest))) |
9571 | 472 |
473 (setq command-line-args (msdos-handle-args command-line-args)) | |
474 ;; --------------------------------------------------------------------------- | |
17517 | 475 |
476 ;;; pc-win.el ends here |