Mercurial > emacs
annotate lisp/term/pc-win.el @ 26146:29159179b7fe
(bootstrap): New target.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sat, 23 Oct 1999 13:22:51 +0000 |
parents | 577683f84100 |
children | a0674327c167 |
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) | |
24242
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
178 "Translate color specification in NAME into something DOS terminal groks." |
9571 | 179 (setq name (downcase name)) |
180 (let* ((len (length name)) | |
13924
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
181 (val (- (length x-colors) |
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
182 (length (member name x-colors)))) |
9571 | 183 (try)) |
13924
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
184 (if (or (< val 0) (>= val (length x-colors))) (setq val nil)) |
9571 | 185 (or val |
186 (and (setq try (cdr (assoc name msdos-color-aliases))) | |
187 (msdos-color-translate try)) | |
188 (and (> len 5) | |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
189 (string= "light" (substring name 0 5)) |
9571 | 190 (setq try (msdos-color-translate (substring name 5))) |
191 (logior try 8)) | |
192 (and (> len 6) | |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
193 (string= "light " (substring name 0 6)) |
9571 | 194 (setq try (msdos-color-translate (substring name 6))) |
195 (logior try 8)) | |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
196 (and (> len 4) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
197 (string= "pale" (substring name 0 4)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
198 (setq try (msdos-color-translate (substring name 4))) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
199 (logior try 8)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
200 (and (> len 5) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
201 (string= "pale " (substring name 0 5)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
202 (setq try (msdos-color-translate (substring name 5))) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
203 (logior try 8)) |
15315
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
204 (and (> len 6) |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
205 (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
|
206 (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
|
207 (and (> len 7) |
d46311cef590
(msdos-color-aliases): Define more colors. (msdos-color-translate):
Richard M. Stallman <rms@gnu.org>
parents:
14734
diff
changeset
|
208 (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
|
209 (msdos-color-translate (substring name 7))) |
9571 | 210 (and (> len 4) |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
211 (or (string= "dark" (substring name 0 4)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
212 (string= "deep" (substring name 0 4))) |
9571 | 213 (msdos-color-translate (substring name 4))) |
214 (and (> len 5) | |
19568
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
215 (or (string= "dark " (substring name 0 5)) |
fa099f73f994
(msdos-color-aliases): Add missing colors.
Eli Zaretskii <eliz@gnu.org>
parents:
19290
diff
changeset
|
216 (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
|
217 (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
|
218 (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
|
219 (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
|
220 (and |
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 "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
|
222 (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
|
223 (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
|
224 (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
|
225 (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
|
226 (cond |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
227 ((> 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
|
228 ((> 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
|
229 ((> 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
|
230 (t "black"))))))) |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
231 (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
|
232 (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
|
233 (and |
7fb99affa49a
(msdos-color-aliases): Remove color names which end with a number.
Richard M. Stallman <rms@gnu.org>
parents:
19211
diff
changeset
|
234 (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
|
235 (msdos-color-translate |
24242
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
236 (substring name 0 (match-beginning 0)))))) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
237 (and (= len 7) ;; X-style "#XXYYZZ" color spec |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
238 (eq (aref name 0) ?#) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
239 (member (aref name 1) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
240 '(?0 ?1 ?2 ?3 ?4 ?5 ?6 ?7 ?8 ?9 |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
241 ?A ?B ?C ?D ?E ?F ?a ?b ?c ?d ?e ?f)) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
242 (msdos-color-translate |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
243 (msdos-approximate-color (string-to-number |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
244 (substring name 1) 16))))))) |
25122
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
245 ;;; |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
246 ;;; This is copied from etc/rgb.txt, except that some values were changed |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
247 ;;; a bit to make them consistent with DOS console colors. The order of |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
248 ;;; the colors is according to the PC text mode color codes. |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
249 ;;; |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
250 ;;; If you want to change the RGB values, keep in mind that various pieces |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
251 ;;; of Emacs think that a color whose RGB values add up to less than 0.6 of |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
252 ;;; the values for WHITE (i.e. less than 459) are ``dark'', otherwise the |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
253 ;;; color is ``light''; see `frame-set-background-mode' in lisp/faces.el for |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
254 ;;; an example. |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
255 (defvar msdos-color-values |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
256 '(("black" 0 0 0) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
257 ("blue" 0 0 255) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
258 ("green" 0 255 0) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
259 ("cyan" 0 255 255) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
260 ("red" 255 0 0) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
261 ("magenta" 139 0 139) ; dark magenta |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
262 ("brown" 165 42 42) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
263 ("lightgray" 211 211 211) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
264 ("darkgray" 102 102 102) ; gray40 |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
265 ("lightblue" 173 216 230) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
266 ("lightgreen" 144 238 144) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
267 ("lightcyan" 224 255 255) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
268 ("lightred" 255 52 179) ; maroon1 |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
269 ("lightmagenta" 238 0 238) ; magenta2 |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
270 ("yellow" 255 255 0) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
271 ("white" 255 255 255)) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
272 "A list of MS-DOS console colors and their RGB values.") |
24242
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
273 |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
274 (defun msdos-approximate-color (num) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
275 "Return a DOS color name which is the best approximation for the number NUM." |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
276 (let ((color-values msdos-color-values) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
277 (candidate (car msdos-color-values)) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
278 (best-distance 16777216) ;; 0xFFFFFF + 1 |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
279 best-color) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
280 (while candidate |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
281 (let* ((values (cdr candidate)) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
282 (value (+ (lsh (car values) 16) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
283 (lsh (car (cdr values)) 8) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
284 (nth 2 values)))) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
285 (if (< (abs (- value num)) best-distance) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
286 (setq best-distance (abs (- value num)) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
287 best-color (car candidate)))) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
288 (setq color-values (cdr color-values)) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
289 (setq candidate (car color-values))) |
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
290 best-color)) |
9571 | 291 ;; --------------------------------------------------------------------------- |
292 ;; We want to delay setting frame parameters until the faces are setup | |
293 (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
|
294 (modify-frame-parameters terminal-frame default-frame-alist) |
9571 | 295 |
296 (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
|
297 (modify-frame-parameters terminal-frame default-frame-alist) |
25122
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
298 (face-clear-tty-colors) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
299 (let ((colors msdos-color-values) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
300 (i 0)) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
301 (while colors |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
302 (face-register-tty-color (car (car colors)) i) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
303 (setq colors (cdr colors) i (1+ i)))) |
9571 | 304 |
25211
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
305 (frame-set-background-mode 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
|
306 (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
|
307 |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
308 (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
|
309 (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
|
310 (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
|
311 (set-face-foreground 'underline "white" terminal-frame) |
9571 | 312 |
313 (make-face 'msdos-menu-active-face) | |
314 (make-face 'msdos-menu-passive-face) | |
315 (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
|
316 (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
|
317 (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
|
318 (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
|
319 (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
|
320 (set-face-background 'msdos-menu-select-face "red" terminal-frame)) |
9571 | 321 |
322 ;; We have only one font, so... | |
323 (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
|
324 |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
325 ;; 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
|
326 (defun make-msdos-frame (&optional parameters) |
18770
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
327 (let* ((parms |
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
328 (append initial-frame-alist default-frame-alist parameters nil)) |
25211
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
329 (frame (make-terminal-frame parms)) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
330 success) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
331 (unwind-protect |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
332 (progn |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
333 (x-handle-reverse-video frame parms) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
334 (frame-set-background-mode frame) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
335 (face-set-after-frame-default frame) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
336 (setq success t)) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
337 (unless success (delete-frame frame))) |
18770
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
338 frame)) |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
339 |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
340 (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
|
341 |
9571 | 342 ;; --------------------------------------------------------------------------- |
14040 | 343 ;; More or less useful imitations of certain X-functions. A lot of the |
9571 | 344 ;; values returned are questionable, but usually only the form of the |
345 ;; returned value matters. Also, by the way, recall that `ignore' is | |
346 ;; a useful function for returning 'nil regardless of argument. | |
347 | |
348 ;; From src/xfns.c | |
13484
be831ed47a75
(x-display-color-p): Accept optional arg.
Richard M. Stallman <rms@gnu.org>
parents:
9571
diff
changeset
|
349 (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
|
350 (defun x-list-fonts (pattern &optional face frame maximum width) |
25264
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
351 (if (or (null width) (and (numberp width) (= width 1))) |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
352 (list "ms-dos") |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
353 (list "no-such-font"))) |
9571 | 354 (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
|
355 (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
|
356 (defun x-display-pixel-height (&optional frame) (frame-height frame)) |
25264
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
357 (defun x-display-planes (&optional frame) 4) ;bg switched to 16 colors as well |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
358 (defun x-display-color-cells (&optional frame) 16) |
9571 | 359 (defun x-server-max-request-size (&optional frame) 1000000) ; ??? |
360 (defun x-server-vendor (&optional frame) t "GNU") | |
361 (defun x-server-version (&optional frame) '(1 0 0)) | |
362 (defun x-display-screens (&optional frame) 1) | |
25264
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
363 (defun x-display-mm-height (&optional frame) 245) ; Guess the size of my |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
364 (defun x-display-mm-width (&optional frame) 322) ; monitor, EZ... |
9571 | 365 (defun x-display-backing-store (&optional frame) 'not-useful) |
366 (defun x-display-visual-class (&optional frame) 'static-color) | |
367 (fset 'x-display-save-under 'ignore) | |
368 (fset 'x-get-resource 'ignore) | |
23461
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
369 |
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
370 (defun x-color-values (color &optional frame) |
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
371 "Return a description of the color named COLOR on frame FRAME.\n\ |
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
372 The value is a list of integer RGB values--(RED GREEN BLUE).\n\ |
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
373 These values range from 0 to 255; white is (255 255 255).\n\ |
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
374 If FRAME is omitted or nil, use the selected frame." |
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
375 (if (x-color-defined-p color) |
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
376 (let ((frame (or frame (selected-frame))) |
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
377 (color-code (msdos-color-translate color))) |
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
378 (cdr (nth color-code msdos-color-values))))) |
9571 | 379 |
380 ;; From lisp/term/x-win.el | |
381 (setq x-display-name "pc") | |
382 (setq split-window-keep-point t) | |
25264
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
383 (defvar x-colors (mapcar 'car msdos-color-values) |
13924
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
384 "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
|
385 (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
|
386 "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
|
387 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
|
388 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
|
389 x-colors) |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
390 |
25122
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
391 (defun face-color-supported-p (color) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
392 (x-color-defined-p color)) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
393 |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
394 (defun face-color-gray-p (color) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
395 (member (msdos-color-translate color) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
396 '("black" "lightgray" "darkgray" "white"))) |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
397 |
21710
70d6549a4105
(x-select-text, x-get-selection-value): Replace win16 with w16.
Eli Zaretskii <eliz@gnu.org>
parents:
20033
diff
changeset
|
398 ;; From lisp/term/w32-win.el |
13924
36aa12b0ea6a
(x-colors): New variable, a list of colors
Richard M. Stallman <rms@gnu.org>
parents:
13628
diff
changeset
|
399 ; |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
400 ;;;; Selections and cut buffers |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
401 ; |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
402 ;;; 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
|
403 ;;; 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
|
404 ;;; from x-cut-buffer-or-selection-value. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
405 (defvar x-last-selected-text nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
406 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
407 (defvar x-select-enable-clipboard t |
25264
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
408 "Non-nil means cutting and pasting uses the clipboard.") |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
409 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
410 (defun x-select-text (text &optional push) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
411 (if x-select-enable-clipboard |
21710
70d6549a4105
(x-select-text, x-get-selection-value): Replace win16 with w16.
Eli Zaretskii <eliz@gnu.org>
parents:
20033
diff
changeset
|
412 (w16-set-clipboard-data text)) |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
413 (setq x-last-selected-text text)) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
414 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
415 ;;; Return the value of the current selection. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
416 ;;; 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
|
417 ;;; as if they were unset. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
418 (defun x-get-selection-value () |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
419 (if x-select-enable-clipboard |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
420 (let (text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
421 ;; 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
|
422 (condition-case c |
21710
70d6549a4105
(x-select-text, x-get-selection-value): Replace win16 with w16.
Eli Zaretskii <eliz@gnu.org>
parents:
20033
diff
changeset
|
423 (setq text (w16-get-clipboard-data)) |
70d6549a4105
(x-select-text, x-get-selection-value): Replace win16 with w16.
Eli Zaretskii <eliz@gnu.org>
parents:
20033
diff
changeset
|
424 (error (message "w16-get-clipboard-data:%s" c))) |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
425 (if (string= text "") (setq text nil)) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
426 (cond |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
427 ((not text) nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
428 ((eq text x-last-selected-text) nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
429 ((string= text x-last-selected-text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
430 ;; 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
|
431 (setq x-last-selected-text text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
432 nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
433 (t |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
434 (setq x-last-selected-text text)))))) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
435 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
436 ;;; 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
|
437 (setq interprogram-cut-function 'x-select-text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
438 (setq interprogram-paste-function 'x-get-selection-value) |
9571 | 439 |
13628
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
440 ;; 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
|
441 ;; 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
|
442 (defun x-frob-font-slant (font which) |
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
443 font) |
25264
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
444 (defun x-frob-font-weight (font which) |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
445 font) |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
446 (defun x-font-family-list () |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
447 "Return a list of available font families on FRAME.\n\ |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
448 If FRAME is omitted or nil, use the selected frame.\n\ |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
449 Value is a list of conses (FAMILY . FIXED-P) where FAMILY\n\ |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
450 is a font family, and FIXED-P is non-nil if fonts of that family\n\ |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
451 are fixed-pitch." |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
452 '(("default" . t))) |
13628
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
453 |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
454 ;; From src/fontset.c: |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
455 (fset 'query-fontset 'ignore) |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
456 |
16643
734b72203ac5
(iconify-or-deiconify-frame): Define to be a
Richard M. Stallman <rms@gnu.org>
parents:
15397
diff
changeset
|
457 ;; 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
|
458 (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
|
459 |
9571 | 460 ;; From lisp/frame.el |
461 (fset 'set-default-font 'ignore) | |
462 (fset 'set-mouse-color 'ignore) ; We cannot, I think. | |
463 (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. | |
464 (fset 'set-border-color 'ignore) ; Not useful. | |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
465 |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
466 ;; From lisp/term/x-win.el: |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
467 (defconst x-long-option-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
468 '(("--name" . "-name") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
469 ("--title" . "-T") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
470 ("--reverse-video" . "-reverse") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
471 ("--foreground-color" . "-fg") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
472 ("--background-color" . "-bg"))) |
9571 | 473 ;; --------------------------------------------------------------------------- |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
474 ;; Handle the X-like command line parameters "-fg", "-bg", "-name", etc. |
9571 | 475 (defun msdos-handle-args (args) |
476 (let ((rest nil)) | |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
477 (message "%s" args) |
9571 | 478 (while args |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
479 (let* ((this (car args)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
480 (orig-this this) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
481 completion argval) |
9571 | 482 (setq args (cdr args)) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
483 ;; Check for long options with attached arguments |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
484 ;; 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
|
485 (if (string-match "^--[^=]*=" this) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
486 (setq argval (substring this (match-end 0)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
487 this (substring this 0 (1- (match-end 0))))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
488 (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
|
489 (if (eq completion t) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
490 ;; Exact match for long option. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
491 (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
|
492 (if (stringp completion) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
493 (let ((elt (assoc completion x-long-option-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
494 ;; Check for abbreviated long option. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
495 (or elt |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
496 (error "Option `%s' is ambiguous" this)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
497 (setq this (cdr elt))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
498 ;; Check for a short option. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
499 (setq argval nil this orig-this))) |
9571 | 500 (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
|
501 (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
|
502 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
503 (cons (cons 'foreground-color argval) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
504 default-frame-alist))) |
9571 | 505 ((or (string= this "-bg") (string= this "-background")) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
506 (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
|
507 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
508 (cons (cons 'background-color argval) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
509 default-frame-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
510 ((or (string= this "-T") (string= this "-name")) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
511 (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
|
512 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
513 (cons |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
514 (cons 'title |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
515 (if (stringp argval) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
516 argval |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
517 (let ((case-fold-search t) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
518 i) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
519 (setq argval (invocation-name)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
520 |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
521 ;; Change any . or * characters in name to |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
522 ;; hyphens, so as to emulate behavior on X. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
523 (while |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
524 (setq i (string-match "[.*]" argval)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
525 (aset argval i ?-)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
526 argval))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
527 default-frame-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
528 ((or (string= this "-r") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
529 (string= this "-rv") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
530 (string= this "-reverse")) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
531 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
532 (cons '(reverse . t) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
533 default-frame-alist))) |
9571 | 534 (t (setq rest (cons this rest)))))) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
535 (nreverse rest))) |
9571 | 536 |
537 (setq command-line-args (msdos-handle-args command-line-args)) | |
538 ;; --------------------------------------------------------------------------- | |
17517 | 539 |
540 ;;; pc-win.el ends here |