Mercurial > emacs
annotate lisp/term/pc-win.el @ 105381:0c7122fb98eb
*** empty log message ***
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Fri, 02 Oct 2009 12:52:17 +0000 |
parents | b564cde0cb8b |
children | 1d1d5d9bd884 |
rev | line source |
---|---|
38412
253f761ad37b
Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents:
36513
diff
changeset
|
1 ;;; pc-win.el --- setup support for `PC windows' (whatever that is) |
9571 | 2 |
64701
34bd8e434dd7
Update years in copyright notice; nfc.
Thien-Thi Nguyen <ttn@gnuvola.org>
parents:
64084
diff
changeset
|
3 ;; Copyright (C) 1994, 1996, 1997, 1999, 2001, 2002, 2003, 2004, |
100908 | 4 ;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
9571 | 5 |
6 ;; Author: Morten Welinder <terra@diku.dk> | |
14734 | 7 ;; Maintainer: FSF |
9571 | 8 |
9 ;; This file is part of GNU Emacs. | |
10 | |
94671
f3ab0c2464f5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify |
9571 | 12 ;; it under the terms of the GNU General Public License as published by |
94671
f3ab0c2464f5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
13 ;; the Free Software Foundation, either version 3 of the License, or |
f3ab0c2464f5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
14 ;; (at your option) any later version. |
9571 | 15 |
16 ;; GNU Emacs is distributed in the hope that it will be useful, | |
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 ;; GNU General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
94671
f3ab0c2464f5
Switch to recommended form of GPLv3 permissions notice.
Glenn Morris <rgm@gnu.org>
parents:
93975
diff
changeset
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
14170
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
14040
diff
changeset
|
23 |
38412
253f761ad37b
Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents:
36513
diff
changeset
|
24 ;;; Commentary: |
253f761ad37b
Some fixes to follow coding conventions in files maintained by FSF.
Pavel Janík <Pavel@Janik.cz>
parents:
36513
diff
changeset
|
25 |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
26 ;; This file is preloaded into Emacs by loadup.el. The functions in |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
27 ;; this file are then called during startup from startup.el. This |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
28 ;; means that just loading this file should not have any side effects |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
29 ;; besides defining functions and variables, and in particular should |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
30 ;; NOT initialize any window systems. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
31 |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
32 ;; The main entry points to this file's features are msdos-handle-args, |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
33 ;; msdos-create-frame-with-faces, msdos-initialize-window-system, |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
34 ;; terminal-init-internal. The last one is not supposed to be called, |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
35 ;; so it just errors out. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
36 |
14170
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
14040
diff
changeset
|
37 ;;; Code: |
23cc3f54e536
Update FSF's office address.
Erik Naggum <erik@naggum.no>
parents:
14040
diff
changeset
|
38 |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
39 (if (not (fboundp 'msdos-remember-default-colors)) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
40 (error "%s: Loading pc-win.el but not compiled for MS-DOS" |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
41 (invocation-name))) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
42 |
9571 | 43 (load "term/internal" nil t) |
44 | |
86289
8a7ed478f7bc
* international/titdic-cnv.el (dos-8+3-filename):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86277
diff
changeset
|
45 (declare-function msdos-remember-default-colors "msdos.c") |
8a7ed478f7bc
* international/titdic-cnv.el (dos-8+3-filename):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86277
diff
changeset
|
46 (declare-function w16-set-clipboard-data "w16select.c") |
8a7ed478f7bc
* international/titdic-cnv.el (dos-8+3-filename):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86277
diff
changeset
|
47 (declare-function w16-get-clipboard-data "w16select.c") |
97714
e2ca2fc48e17
(msdos-setup-keyboard): Fix declaration.
Glenn Morris <rgm@gnu.org>
parents:
97673
diff
changeset
|
48 (declare-function msdos-setup-keyboard "internal" (frame)) |
86289
8a7ed478f7bc
* international/titdic-cnv.el (dos-8+3-filename):
Dan Nicolaescu <dann@ics.uci.edu>
parents:
86277
diff
changeset
|
49 |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
50 ;;; This was copied from etc/rgb.txt, except that some values were changed |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
51 ;;; 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
|
52 ;;; 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
|
53 ;;; |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
54 ;;; 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
|
55 ;;; 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
|
56 ;;; 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
|
57 ;;; 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
|
58 ;;; |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
59 ;;; 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
|
60 ;;; 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
|
61 ;;; 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
|
62 ;;; 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
|
63 ;;; an example. |
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
64 (defvar msdos-color-values |
42949
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
65 '(("black" 0 0 0 0) |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
66 ("blue" 1 0 0 52480) ; MediumBlue |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
67 ("green" 2 8704 35584 8704) ; ForestGreen |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
68 ("cyan" 3 0 52736 53504) ; DarkTurquoise |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
69 ("red" 4 45568 8704 8704) ; FireBrick |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
70 ("magenta" 5 35584 0 35584) ; DarkMagenta |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
71 ("brown" 6 40960 20992 11520) ; Sienna |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
72 ("lightgray" 7 48640 48640 48640) ; Gray |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
73 ("darkgray" 8 26112 26112 26112) ; Gray40 |
42949
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
74 ("lightblue" 9 0 0 65535) ; Blue |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
75 ("lightgreen" 10 0 65535 0) ; Green |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
76 ("lightcyan" 11 0 65535 65535) ; Cyan |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
77 ("lightred" 12 65535 0 0) ; Red |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
78 ("lightmagenta" 13 65535 0 65535) ; Magenta |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
79 ("yellow" 14 65535 65535 0) ; Yellow |
a97674caab35
(msdos-color-values): Reverse the order of the
Eli Zaretskii <eliz@gnu.org>
parents:
40353
diff
changeset
|
80 ("white" 15 65535 65535 65535)) |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
81 "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
|
82 |
9571 | 83 ;; --------------------------------------------------------------------------- |
84 ;; We want to delay setting frame parameters until the faces are setup | |
85 (defvar default-frame-alist nil) | |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
86 ;(modify-frame-parameters terminal-frame default-frame-alist) |
9571 | 87 |
88 (defun msdos-face-setup () | |
97995
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
89 "Initial setup of faces for the MS-DOS display." |
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
90 (set-face-foreground 'bold "yellow") |
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
91 (set-face-foreground 'italic "red") |
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
92 (set-face-foreground 'bold-italic "lightred") |
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
93 (set-face-foreground 'underline "white") |
9571 | 94 |
95 (make-face 'msdos-menu-active-face) | |
96 (make-face 'msdos-menu-passive-face) | |
97 (make-face 'msdos-menu-select-face) | |
97995
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
98 (set-face-foreground 'msdos-menu-active-face "white") |
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
99 (set-face-foreground 'msdos-menu-passive-face "lightgray") |
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
100 (set-face-background 'msdos-menu-active-face "blue") |
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
101 (set-face-background 'msdos-menu-passive-face "blue") |
eaf8630bda7d
(msdos-face-setup): Setup faces for all frames, not just for terminal-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
97793
diff
changeset
|
102 (set-face-background 'msdos-menu-select-face "red")) |
9571 | 103 |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
104 (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
|
105 "Handle the reverse-video frame parameter on MS-DOS frames." |
36485
293677d8c530
(msdos-handle-reverse-video): Look for reverse in
Eli Zaretskii <eliz@gnu.org>
parents:
34105
diff
changeset
|
106 (when (cdr (or (assq 'reverse parameters) |
293677d8c530
(msdos-handle-reverse-video): Look for reverse in
Eli Zaretskii <eliz@gnu.org>
parents:
34105
diff
changeset
|
107 (assq 'reverse default-frame-alist))) |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
108 (let* ((params (frame-parameters frame)) |
32547
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
109 (fg (cdr (assq 'foreground-color params))) |
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
110 (bg (cdr (assq 'background-color params)))) |
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
111 (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
|
112 (modify-frame-parameters frame |
32547
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
113 (list (cons 'mouse-color bg)))) |
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
114 (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
|
115 (modify-frame-parameters frame |
32547
946f66d4b38b
(msdos-handle-reverse-video): Don't remove
Eli Zaretskii <eliz@gnu.org>
parents:
26736
diff
changeset
|
116 (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
|
117 |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
118 ;; 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
|
119 ;; tty-color-alist, since msdos-handle-reverse-video needs to know the |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
120 ;; actual frame colors. |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
121 (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
|
122 (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
|
123 ;; 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
|
124 ;; 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
|
125 (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
|
126 (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
|
127 (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
|
128 (frame-parameters terminal-frame)) |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
129 |
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
130 (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
|
131 (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
|
132 |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
133 ;; We create frames as if we were a terminal, but without invoking the |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
134 ;; terminal-initialization function. Also, our handling of reverse |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
135 ;; video is slightly different. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
136 (defun msdos-create-frame-with-faces (&optional parameters) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
137 "Create an frame on MS-DOS display. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
138 Optional frame parameters PARAMETERS specify the frame parameters. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
139 Parameters not specified by PARAMETERS are taken from |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
140 `default-frame-alist'. If either PARAMETERS or `default-frame-alist' |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
141 contains a `reverse' parameter, handle that. Value is the new frame |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
142 created." |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
143 (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
|
144 success) |
25211
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
145 (unwind-protect |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
146 (with-selected-frame frame |
26736
a0674327c167
Changes for automatic remapping of X colors on terminal frames:
Eli Zaretskii <eliz@gnu.org>
parents:
25264
diff
changeset
|
147 (msdos-handle-reverse-video frame (frame-parameters frame)) |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
148 (unless (terminal-parameter frame 'terminal-initted) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
149 (set-terminal-parameter frame 'terminal-initted t)) |
25211
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
150 (frame-set-background-mode frame) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
151 (face-set-after-frame-default frame) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
152 (setq success t)) |
a1527fde7766
(msdos-bg-mode): Remove. Call
Eli Zaretskii <eliz@gnu.org>
parents:
25122
diff
changeset
|
153 (unless success (delete-frame frame))) |
18770
94ca3c126cee
(msdos-bg-mode): New function.
Richard M. Stallman <rms@gnu.org>
parents:
17517
diff
changeset
|
154 frame)) |
15397
f95592fcdb1c
(msdos-face-setup): Use `terminal-frame' for initial frame setup.
Richard M. Stallman <rms@gnu.org>
parents:
15315
diff
changeset
|
155 |
9571 | 156 ;; --------------------------------------------------------------------------- |
14040 | 157 ;; More or less useful imitations of certain X-functions. A lot of the |
9571 | 158 ;; values returned are questionable, but usually only the form of the |
159 ;; returned value matters. Also, by the way, recall that `ignore' is | |
160 ;; a useful function for returning 'nil regardless of argument. | |
161 | |
162 ;; From src/xfns.c | |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
163 (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
|
164 (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
|
165 (list "ms-dos") |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
166 (list "no-such-font"))) |
14520
e46b1e676418
(x-display-pixel-height, x-display-pixel-width):
Richard M. Stallman <rms@gnu.org>
parents:
14170
diff
changeset
|
167 (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
|
168 (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
|
169 (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
|
170 (defun x-display-color-cells (&optional frame) 16) |
9571 | 171 (defun x-server-max-request-size (&optional frame) 1000000) ; ??? |
172 (defun x-server-vendor (&optional frame) t "GNU") | |
173 (defun x-server-version (&optional frame) '(1 0 0)) | |
174 (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
|
175 (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
|
176 (defun x-display-mm-width (&optional frame) 322) ; monitor, EZ... |
9571 | 177 (defun x-display-backing-store (&optional frame) 'not-useful) |
178 (defun x-display-visual-class (&optional frame) 'static-color) | |
179 (fset 'x-display-save-under 'ignore) | |
180 (fset 'x-get-resource 'ignore) | |
23461
b84718f930f8
(msdos-color-values): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
21710
diff
changeset
|
181 |
9571 | 182 ;; 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
|
183 (defvar x-display-name "pc" |
104066 | 184 "The name of the window display on which Emacs was started. |
185 On X, the display name of individual X frames is recorded in the | |
186 `display' frame parameter.") | |
25264
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
187 (defvar x-colors (mapcar 'car msdos-color-values) |
104066 | 188 "List of basic colors available on color displays. |
189 For X, the list comes from the `rgb.txt' file,v 10.41 94/02/20. | |
190 For Nextstep, this is a list of non-PANTONE colors returned by | |
191 the operating system.") | |
25122
2ed76ce5608e
(msdos-face-setup): Register standard colors in
Eli Zaretskii <eliz@gnu.org>
parents:
24242
diff
changeset
|
192 |
21710
70d6549a4105
(x-select-text, x-get-selection-value): Replace win16 with w16.
Eli Zaretskii <eliz@gnu.org>
parents:
20033
diff
changeset
|
193 ;; 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
|
194 ; |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
195 ;;;; Selections and cut buffers |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
196 ; |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
197 ;;; 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
|
198 ;;; 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
|
199 ;;; from x-cut-buffer-or-selection-value. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
200 (defvar x-last-selected-text nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
201 |
34105
9f894ba9e808
(x-select-enable-clipboard): Customize (as per the Emacs Lisp manual).
Eli Zaretskii <eliz@gnu.org>
parents:
33011
diff
changeset
|
202 (defcustom x-select-enable-clipboard t |
9f894ba9e808
(x-select-enable-clipboard): Customize (as per the Emacs Lisp manual).
Eli Zaretskii <eliz@gnu.org>
parents:
33011
diff
changeset
|
203 "Non-nil means cutting and pasting uses the clipboard. |
104066 | 204 This is in addition to, but in preference to, the primary selection. |
205 | |
206 On MS-Windows, this is non-nil by default, since Windows does not | |
207 support other types of selections. \(The primary selection that is | |
208 set by Emacs is not accessible to other programs on Windows.\)" | |
34105
9f894ba9e808
(x-select-enable-clipboard): Customize (as per the Emacs Lisp manual).
Eli Zaretskii <eliz@gnu.org>
parents:
33011
diff
changeset
|
209 :type 'boolean |
9f894ba9e808
(x-select-enable-clipboard): Customize (as per the Emacs Lisp manual).
Eli Zaretskii <eliz@gnu.org>
parents:
33011
diff
changeset
|
210 :group 'killing) |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
211 |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
212 (defun x-select-text (text &optional push) |
104066 | 213 "Select TEXT, a string, according to the window system. |
214 | |
215 On X, put TEXT in the primary X selection. For backward | |
216 compatibility with older X applications, set the value of X cut | |
217 buffer 0 as well, and if the optional argument PUSH is non-nil, | |
218 rotate the cut buffers. If `x-select-enable-clipboard' is | |
219 non-nil, copy the text to the X clipboard as well. | |
220 | |
221 On Windows, make TEXT the current selection. If | |
222 `x-select-enable-clipboard' is non-nil, copy the text to the | |
223 clipboard as well. The argument PUSH is ignored. | |
224 | |
225 On Nextstep, put TEXT in the pasteboard; PUSH is ignored." | |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42949
diff
changeset
|
226 (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
|
227 (w16-set-clipboard-data text)) |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
228 (setq x-last-selected-text text)) |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42949
diff
changeset
|
229 |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
230 ;;; Return the value of the current selection. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
231 ;;; 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
|
232 ;;; as if they were unset. |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
233 (defun x-get-selection-value () |
49599
5ade352e8d1c
Trailing whitespace deleted.
Juanma Barranquero <lekktu@gmail.com>
parents:
42949
diff
changeset
|
234 (if x-select-enable-clipboard |
17478
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
235 (let (text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
236 ;; 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
|
237 (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
|
238 (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
|
239 (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
|
240 (if (string= text "") (setq text nil)) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
241 (cond |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
242 ((not text) nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
243 ((eq text x-last-selected-text) nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
244 ((string= text x-last-selected-text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
245 ;; 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
|
246 (setq x-last-selected-text text) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
247 nil) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
248 (t |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
249 (setq x-last-selected-text text)))))) |
14989cb202dc
* (x-select-enable-clipboard): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
16643
diff
changeset
|
250 |
103956
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
251 ;; x-selection-owner-p is used in simple.el. |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
252 (defun x-selection-owner-p (&optional type) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
253 "Whether the current Emacs process owns the given X Selection. |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
254 The arg should be the name of the selection in question, typically one of |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
255 the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
256 \(Those are literal upper-case symbol names, since that's what X expects.) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
257 For convenience, the symbol nil is the same as `PRIMARY', |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
258 and t is the same as `SECONDARY'." |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
259 (if x-select-enable-clipboard |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
260 (let (text) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
261 ;; Don't die if w16-get-clipboard-data signals an error. |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
262 (ignore-errors |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
263 (setq text (w16-get-clipboard-data))) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
264 ;; We consider ourselves the owner of the selection if it does |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
265 ;; not exist, or exists and compares equal with the last text |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
266 ;; we've put into the Windows clipboard. |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
267 (cond |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
268 ((not text) t) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
269 ((or (eq text x-last-selected-text) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
270 (string= text x-last-selected-text)) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
271 text) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
272 (t nil))))) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
273 |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
274 ;; x-own-selection-internal and x-disown-selection-internal are used |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
275 ;; in select.el:x-set-selection. |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
276 (defun x-own-selection-internal (type value) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
277 "Assert an X selection of the given TYPE with the given VALUE. |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
278 TYPE is a symbol, typically `PRIMARY', `SECONDARY', or `CLIPBOARD'. |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
279 \(Those are literal upper-case symbol names, since that's what X expects.) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
280 VALUE is typically a string, or a cons of two markers, but may be |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
281 anything that the functions on `selection-converter-alist' know about." |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
282 (ignore-errors |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
283 (x-select-text value)) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
284 value) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
285 |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
286 (defun x-disown-selection-internal (selection &optional time) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
287 "If we own the selection SELECTION, disown it. |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
288 Disowning it means there is no such selection." |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
289 (if (x-selection-owner-p selection) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
290 t)) |
8fe7030bb370
(x-selection-owner-p, x-own-selection-internal)
Eli Zaretskii <eliz@gnu.org>
parents:
102888
diff
changeset
|
291 |
13628
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
292 ;; 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
|
293 ;; 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
|
294 (defun x-frob-font-slant (font which) |
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
295 font) |
40353
1e1c2c459774
(x-frob-font-slant, x-frob-font-weight): Add
Eli Zaretskii <eliz@gnu.org>
parents:
38412
diff
changeset
|
296 (make-obsolete 'x-frob-font-slant 'make-face-... "21.1") |
25264
577683f84100
(x-list-fonts): Return "ms-dos", not "default".
Eli Zaretskii <eliz@gnu.org>
parents:
25211
diff
changeset
|
297 (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
|
298 font) |
40353
1e1c2c459774
(x-frob-font-slant, x-frob-font-weight): Add
Eli Zaretskii <eliz@gnu.org>
parents:
38412
diff
changeset
|
299 (make-obsolete 'x-frob-font-weight 'make-face-... "21.1") |
13628
6da84b713ae7
(msdos-color-aliases): Add more aliases.
Richard M. Stallman <rms@gnu.org>
parents:
13484
diff
changeset
|
300 |
19211
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
301 ;; From src/fontset.c: |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
302 (fset 'query-fontset 'ignore) |
e83ac35f9bcb
(x-list-fonts): Return "default" when appropriate.
Richard M. Stallman <rms@gnu.org>
parents:
18770
diff
changeset
|
303 |
16643
734b72203ac5
(iconify-or-deiconify-frame): Define to be a
Richard M. Stallman <rms@gnu.org>
parents:
15397
diff
changeset
|
304 ;; 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
|
305 (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
|
306 |
9571 | 307 ;; From lisp/frame.el |
308 (fset 'set-default-font 'ignore) | |
309 (fset 'set-mouse-color 'ignore) ; We cannot, I think. | |
310 (fset 'set-cursor-color 'ignore) ; Hardware determined by char under. | |
311 (fset 'set-border-color 'ignore) ; Not useful. | |
20033
2c0e89d1488b
(x-long-option-alist): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
19568
diff
changeset
|
312 |
102888
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
313 (defvar msdos-last-help-message nil |
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
314 "The last help message received via `show-help-function'. |
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
315 This is used by `msdos-show-help'.") |
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
316 |
97793
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
317 (defvar msdos-previous-message nil |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
318 "The content of the echo area before help echo was displayed.") |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
319 |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
320 (defun msdos-show-help (help) |
99540
c5c8f07bc47c
* w32-fns.el (w32-shell-dos-semantics):
Juanma Barranquero <lekktu@gmail.com>
parents:
98033
diff
changeset
|
321 "Function installed as `show-help-function' on MS-DOS frames." |
97793
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
322 (when (and (not (window-minibuffer-p)) ;Don't overwrite minibuffer contents. |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
323 (not cursor-in-echo-area)) ;Don't overwrite a prompt. |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
324 (cond |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
325 ((stringp help) |
102888
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
326 (setq help (replace-regexp-in-string "\n" ", " help)) |
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
327 (unless (or msdos-previous-message |
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
328 (string-equal help (current-message)) |
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
329 (and (stringp msdos-last-help-message) |
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
330 (string-equal msdos-last-help-message |
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
331 (current-message)))) |
97793
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
332 (setq msdos-previous-message (current-message))) |
102888
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
333 (setq msdos-last-help-message help) |
98033
9a70e78ae66c
(msdos-show-help): Don't truncate lines while displaying help echo messages.
Eli Zaretskii <eliz@gnu.org>
parents:
97995
diff
changeset
|
334 (let ((message-truncate-lines nil) |
97793
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
335 (message-log-max nil)) |
102888
377ae1928153
(msdos-last-help-message): New defvar.
Eli Zaretskii <eliz@gnu.org>
parents:
100908
diff
changeset
|
336 (message "%s" help))) |
97793
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
337 ((stringp msdos-previous-message) |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
338 (let ((message-log-max nil)) |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
339 (message "%s" msdos-previous-message) |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
340 (setq msdos-previous-message nil))) |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
341 (t |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
342 (message nil))))) |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
343 |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
344 |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
345 ;; Initialization. |
9571 | 346 ;; --------------------------------------------------------------------------- |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
347 ;; This function is run, by faces.el:tty-create-frame-with-faces, only |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
348 ;; for the initial frame (on each terminal, but we have only one). |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
349 ;; This works by setting the `terminal-initted' terminal parameter to |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
350 ;; this function, the first time `tty-create-frame-with-faces' is |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
351 ;; called on that terminal. `tty-create-frame-with-faces' is called |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
352 ;; directly from startup.el and also by `make-frame' through |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
353 ;; `frame-creation-function-alist'. `make-frame' will call this |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
354 ;; function if `msdos-create-frame-with-faces' (see below) is not |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
355 ;; found in `frame-creation-function-alist', which means something is |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
356 ;; _very_ wrong, because "internal" terminal emulator should not be |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
357 ;; turned on if our window-system is not `pc'. Therefore, the only |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
358 ;; Right Thing for us to do here is scream bloody murder. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
359 (defun terminal-init-internal () |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
360 "Terminal initialization function for the MS-DOS \"internal\" terminal. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
361 Errors out because it is not supposed to be called, ever." |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
362 (error "terminal-init-internal called for window-system `%s'" |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
363 (window-system))) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
364 |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
365 (defun msdos-initialize-window-system () |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
366 "Initialization function for the `pc' \"window system\"." |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
367 (or (eq (window-system) 'pc) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
368 (error |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
369 "`msdos-initialize-window-system' called, but window-system is `%s'" |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
370 (window-system))) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
371 ;; First, the keyboard. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
372 (msdos-setup-keyboard terminal-frame) ; see internal.el |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
373 ;; Next, register the default colors. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
374 (let* ((colors msdos-color-values) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
375 (color (car colors))) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
376 (tty-color-clear) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
377 (while colors |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
378 (tty-color-define (car color) (cadr color) (cddr color)) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
379 (setq colors (cdr colors) color (car colors)))) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
380 ;; Modifying color mappings means realized faces don't |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
381 ;; use the right colors, so clear them. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
382 (clear-face-cache) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
383 ;; Now set up some additional faces. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
384 (msdos-face-setup) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
385 ;; Set up the initial frame. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
386 (msdos-setup-initial-frame) |
97793
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
387 ;; Help echo is displayed in the echo area. |
c8ff5ed1859f
(msdos-previous-message): New variable.
Eli Zaretskii <eliz@gnu.org>
parents:
97714
diff
changeset
|
388 (setq show-help-function 'msdos-show-help) |
97667
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
389 ;; We want to delay the codepage-related setup until after user's |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
390 ;; .emacs is processed, because people might define their |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
391 ;; `dos-codepage-setup-hook' there. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
392 (add-hook 'after-init-hook 'dos-codepage-setup) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
393 ;; In multibyte mode, we want unibyte buffers to be displayed |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
394 ;; using the terminal coding system, so that they display |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
395 ;; correctly on the DOS terminal; in unibyte mode we want to see |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
396 ;; all 8-bit characters verbatim. In both cases, we want the |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
397 ;; entire range of 8-bit characters to arrive at our display code |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
398 ;; verbatim. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
399 (standard-display-8bit 127 255) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
400 ;; We are fast enough to make this optimization unnecessary. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
401 (setq split-window-keep-point t) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
402 ;; Arrange for the kill and yank functions to set and check the |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
403 ;; clipboard. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
404 (setq interprogram-cut-function 'x-select-text) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
405 (setq interprogram-paste-function 'x-get-selection-value) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
406 (menu-bar-enable-clipboard) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
407 (run-hooks 'terminal-init-msdos-hook)) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
408 |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
409 ;; frame-creation-function-alist is examined by frame.el:make-frame. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
410 (add-to-list 'frame-creation-function-alist |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
411 '(pc . msdos-create-frame-with-faces)) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
412 ;; window-system-initialization-alist is examined by startup.el:command-line. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
413 (add-to-list 'window-system-initialization-alist |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
414 '(pc . msdos-initialize-window-system)) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
415 ;; We don't need anything beyond tty-handle-args for handling |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
416 ;; command-line argument; see startup.el. |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
417 (add-to-list 'handle-args-function-alist '(pc . tty-handle-args)) |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
418 |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
419 ;; --------------------------------------------------------------------------- |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
420 |
898ab684db68
(msdos-create-frame-with-faces): Renamed from make-msdos-frame.
Eli Zaretskii <eliz@gnu.org>
parents:
94671
diff
changeset
|
421 (provide 'pc-win) |
17517 | 422 |
93975
1e3a407766b9
Fix up comment convention on the arch-tag lines.
Stefan Monnier <monnier@iro.umontreal.ca>
parents:
87649
diff
changeset
|
423 ;; arch-tag: 5cbdb455-b495-427b-95d0-e417d77d00b4 |
17517 | 424 ;;; pc-win.el ends here |