Mercurial > emacs
annotate lisp/term/pc-win.el @ 32600:faadf96091b5
*** empty log message ***
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 18 Oct 2000 01:55:32 +0000 |
parents | 946f66d4b38b |
children | b7b3acac61b8 |
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 | |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
29 ;;; This is copied from etc/rgb.txt, except that some values were changed |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
30 ;;; a bit to make them consistent with DOS console colors, and the RGB |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
31 ;;; values were scaled up to 16 bits, as `tty-define-color' requires. |
25122
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
32 ;;; |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
33 ;;; The mapping between the 16 standard EGA/VGA colors and X color names |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
34 ;;; was done by running a Unix version of Emacs inside an X client and a |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
35 ;;; DJGPP-compiled Emacs on the same PC. The names of X colors used to |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
36 ;;; define the pixel values are shown as comments to each color below. |
25122
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
37 ;;; |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
38 ;;; 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
|
39 ;;; of Emacs think that a color whose RGB values add up to less than 0.6 of |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
40 ;;; the values for WHITE (i.e. less than 117963) are ``dark'', otherwise the |
25122
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
41 ;;; 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
|
42 ;;; an example. |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
43 (defvar msdos-color-values |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
44 '(("white" 15 65535 65535 65535) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
45 ("yellow" 14 65535 65535 0) ; Yellow |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
46 ("lightmagenta" 13 65535 0 65535) ; Magenta |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
47 ("lightred" 12 65535 0 0) ; Red |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
48 ("lightcyan" 11 0 65535 65535) ; Cyan |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
49 ("lightgreen" 10 0 65535 0) ; Green |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
50 ("lightblue" 9 0 0 65535) ; Blue |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
51 ("darkgray" 8 26112 26112 26112) ; Gray40 |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
52 ("lightgray" 7 48640 48640 48640) ; Gray |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
53 ("brown" 6 40960 20992 11520) ; Sienna |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
54 ("magenta" 5 35584 0 35584) ; DarkMagenta |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
55 ("red" 4 45568 8704 8704) ; FireBrick |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
56 ("cyan" 3 0 52736 53504) ; DarkTurquoise |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
57 ("green" 2 8704 35584 8704) ; ForestGreen |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
58 ("blue" 1 0 0 52480) ; MediumBlue |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
59 ("black" 0 0 0 0)) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
60 "A list of MS-DOS console colors, their indices and 16-bit RGB values.") |
24242
2dd79725f0c5
(msdos-approximate-color): New function.
Eli Zaretskii <eliz@gnu.org>
parents:
23461
diff
changeset
|
61 |
9571 | 62 ;; --------------------------------------------------------------------------- |
63 ;; We want to delay setting frame parameters until the faces are setup | |
64 (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
|
65 (modify-frame-parameters terminal-frame default-frame-alist) |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
66 (tty-color-clear) |
9571 | 67 |
68 (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
|
69 (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
|
70 (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
|
71 (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
|
72 (set-face-foreground 'underline "white" terminal-frame) |
9571 | 73 |
74 (make-face 'msdos-menu-active-face) | |
75 (make-face 'msdos-menu-passive-face) | |
76 (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
|
77 (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
|
78 (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
|
79 (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
|
80 (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
|
81 (set-face-background 'msdos-menu-select-face "red" terminal-frame)) |
9571 | 82 |
83 (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
|
84 |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
85 (defun msdos-handle-reverse-video (frame parameters) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
86 "Handle the reverse-video frame parameter on MS-DOS frames." |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
87 (when (cdr (assq 'reverse parameters)) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
88 (let* ((params (frame-parameters frame)) |
32547
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
89 (fg (cdr (assq 'foreground-color params))) |
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
90 (bg (cdr (assq 'background-color params)))) |
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
91 (if (equal fg (cdr (assq 'mouse-color params))) |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
92 (modify-frame-parameters frame |
32547
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
93 (list (cons 'mouse-color bg)))) |
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
94 (if (equal fg (cdr (assq 'cursor-color params))) |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
95 (modify-frame-parameters frame |
32547
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
96 (list (cons 'cursor-color bg))))))) |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
97 |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
98 ;; This must run after all the default colors are inserted into |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
99 ;; tty-color-alist, since msdos-handle-reverse-video needs to know the |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
100 ;; actual frame colors. tty-color-alist is set up by startup.el, but |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
101 ;; only after it runs before-init-hook and after-init-hook. |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
102 (defun msdos-setup-initial-frame () |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
103 (modify-frame-parameters terminal-frame default-frame-alist) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
104 ;; This remembers the screen colors after applying default-frame-alist, |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
105 ;; so that all subsequent frames could begin with those colors. |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
106 (msdos-remember-default-colors terminal-frame) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
107 (modify-frame-parameters terminal-frame initial-frame-alist) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
108 (msdos-handle-reverse-video terminal-frame |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
109 (frame-parameters terminal-frame)) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
110 |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
111 (frame-set-background-mode terminal-frame) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
112 (face-set-after-frame-default terminal-frame)) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
113 |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
114 (add-hook 'term-setup-hook 'msdos-setup-initial-frame) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
115 |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
116 ;; 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
|
117 (defun make-msdos-frame (&optional parameters) |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
118 (let ((frame (make-terminal-frame parameters)) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
119 success) |
25211
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
120 (unwind-protect |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
121 (progn |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
122 (msdos-handle-reverse-video frame (frame-parameters frame)) |
25211
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
123 (frame-set-background-mode frame) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
124 (face-set-after-frame-default frame) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
125 (setq success t)) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
126 (unless success (delete-frame frame))) |
18770
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
127 frame)) |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
128 |
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
129 (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
|
130 |
9571 | 131 ;; --------------------------------------------------------------------------- |
14040 | 132 ;; More or less useful imitations of certain X-functions. A lot of the |
9571 | 133 ;; values returned are questionable, but usually only the form of the |
134 ;; returned value matters. Also, by the way, recall that `ignore' is | |
135 ;; a useful function for returning 'nil regardless of argument. | |
136 | |
137 ;; From src/xfns.c | |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
138 (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
|
139 (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
|
140 (list "ms-dos") |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
141 (list "no-such-font"))) |
14520
e46b1e676418
(x-display-pixel-height, x-display-pixel-width):
Richard M. Stallman <rms@gnu.org>
parents:
14170
diff
changeset
|
142 (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
|
143 (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
|
144 (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
|
145 (defun x-display-color-cells (&optional frame) 16) |
9571 | 146 (defun x-server-max-request-size (&optional frame) 1000000) ; ??? |
147 (defun x-server-vendor (&optional frame) t "GNU") | |
148 (defun x-server-version (&optional frame) '(1 0 0)) | |
149 (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
|
150 (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
|
151 (defun x-display-mm-width (&optional frame) 322) ; monitor, EZ... |
9571 | 152 (defun x-display-backing-store (&optional frame) 'not-useful) |
153 (defun x-display-visual-class (&optional frame) 'static-color) | |
154 (fset 'x-display-save-under 'ignore) | |
155 (fset 'x-get-resource 'ignore) | |
23461
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
156 |
9571 | 157 ;; From lisp/term/x-win.el |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
158 (defvar x-display-name "pc" |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
159 "The display name specifying the MS-DOS display and frame type.") |
9571 | 160 (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
|
161 (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
|
162 "The list of colors available on a PC display under MS-DOS.") |
25122
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
163 |
21710
70d6549a4105
(x-select-text, x-get-selection-value): Replace win16 with w16.
Eli Zaretskii <eliz@gnu.org>
parents:
20033
diff
changeset
|
164 ;; 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
|
165 ; |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
166 ;;;; Selections and cut buffers |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
167 ; |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
168 ;;; 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
|
169 ;;; 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
|
170 ;;; from x-cut-buffer-or-selection-value. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
171 (defvar x-last-selected-text nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
172 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
173 (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
|
174 "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
|
175 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
176 (defun x-select-text (text &optional push) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
177 (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
|
178 (w16-set-clipboard-data text)) |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
179 (setq x-last-selected-text text)) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
180 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
181 ;;; Return the value of the current selection. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
182 ;;; 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
|
183 ;;; as if they were unset. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
184 (defun x-get-selection-value () |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
185 (if x-select-enable-clipboard |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
186 (let (text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
187 ;; 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
|
188 (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
|
189 (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
|
190 (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
|
191 (if (string= text "") (setq text nil)) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
192 (cond |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
193 ((not text) nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
194 ((eq text x-last-selected-text) nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
195 ((string= text x-last-selected-text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
196 ;; 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
|
197 (setq x-last-selected-text text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
198 nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
199 (t |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
200 (setq x-last-selected-text text)))))) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
201 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
202 ;;; 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
|
203 (setq interprogram-cut-function 'x-select-text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
204 (setq interprogram-paste-function 'x-get-selection-value) |
9571 | 205 |
13628
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
206 ;; 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
|
207 ;; 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
|
208 (defun x-frob-font-slant (font which) |
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
209 font) |
25264
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
210 (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
|
211 font) |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
212 (defun x-font-family-list () |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
213 "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
|
214 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
|
215 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
|
216 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
|
217 are fixed-pitch." |
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
218 '(("default" . t))) |
13628
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
219 |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
220 ;; From src/fontset.c: |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
221 (fset 'query-fontset 'ignore) |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
222 |
16643
734b72203ac5
(iconify-or-deiconify-frame): Define to be a
Richard M. Stallman <rms@gnu.org>
parents:
15397
diff
changeset
|
223 ;; 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
|
224 (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
|
225 |
9571 | 226 ;; From lisp/frame.el |
227 (fset 'set-default-font 'ignore) | |
228 (fset 'set-mouse-color 'ignore) ; We cannot, I think. | |
229 (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. | |
230 (fset 'set-border-color 'ignore) ; Not useful. | |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
231 |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
232 ;; From lisp/term/x-win.el: |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
233 (defconst x-long-option-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
234 '(("--name" . "-name") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
235 ("--title" . "-T") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
236 ("--reverse-video" . "-reverse") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
237 ("--foreground-color" . "-fg") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
238 ("--background-color" . "-bg"))) |
9571 | 239 ;; --------------------------------------------------------------------------- |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
240 ;; Handle the X-like command line parameters "-fg", "-bg", "-name", etc. |
9571 | 241 (defun msdos-handle-args (args) |
242 (let ((rest nil)) | |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
243 (message "%s" args) |
9571 | 244 (while args |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
245 (let* ((this (car args)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
246 (orig-this this) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
247 completion argval) |
9571 | 248 (setq args (cdr args)) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
249 ;; Check for long options with attached arguments |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
250 ;; 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
|
251 (if (string-match "^--[^=]*=" this) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
252 (setq argval (substring this (match-end 0)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
253 this (substring this 0 (1- (match-end 0))))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
254 (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
|
255 (if (eq completion t) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
256 ;; Exact match for long option. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
257 (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
|
258 (if (stringp completion) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
259 (let ((elt (assoc completion x-long-option-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
260 ;; Check for abbreviated long option. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
261 (or elt |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
262 (error "Option `%s' is ambiguous" this)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
263 (setq this (cdr elt))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
264 ;; Check for a short option. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
265 (setq argval nil this orig-this))) |
9571 | 266 (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
|
267 (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
|
268 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
269 (cons (cons 'foreground-color argval) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
270 default-frame-alist))) |
9571 | 271 ((or (string= this "-bg") (string= this "-background")) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
272 (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
|
273 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
274 (cons (cons 'background-color argval) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
275 default-frame-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
276 ((or (string= this "-T") (string= this "-name")) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
277 (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
|
278 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
279 (cons |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
280 (cons 'title |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
281 (if (stringp argval) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
282 argval |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
283 (let ((case-fold-search t) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
284 i) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
285 (setq argval (invocation-name)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
286 |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
287 ;; Change any . or * characters in name to |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
288 ;; hyphens, so as to emulate behavior on X. |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
289 (while |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
290 (setq i (string-match "[.*]" argval)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
291 (aset argval i ?-)) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
292 argval))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
293 default-frame-alist))) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
294 ((or (string= this "-r") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
295 (string= this "-rv") |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
296 (string= this "-reverse")) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
297 (setq default-frame-alist |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
298 (cons '(reverse . t) |
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
299 default-frame-alist))) |
9571 | 300 (t (setq rest (cons this rest)))))) |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
301 (nreverse rest))) |
9571 | 302 |
303 (setq command-line-args (msdos-handle-args command-line-args)) | |
304 ;; --------------------------------------------------------------------------- | |
17517 | 305 |
306 ;;; pc-win.el ends here |