Improve documentation of 'set-fontset-font'
[emacs.git] / lisp / term / x-win.el
Commit [+]AuthorDateLineData
d361bcfb Stefan Monnier2014-10-22 21:38:59 -04001;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit; lexical-binding:t -*-
2fe590dc Erik Naggum1996-01-14 09:58:28 +00002
7e09ef09 Paul Eggert2015-01-01 14:26:41 -08003;; Copyright (C) 1993-1994, 2001-2015 Free Software Foundation, Inc.
5cdb3f1e
ER
Eric S. Raymond1993-03-12 19:53:22 +00004
5;; Author: FSF
cf07d2bd Dave Love2002-10-30 19:26:23 +00006;; Keywords: terminals, i18n
5cdb3f1e Eric S. Raymond1993-03-12 19:53:22 +00007
2fe590dc
EN
Erik Naggum1996-01-14 09:58:28 +00008;; This file is part of GNU Emacs.
9
1fecc8fe Glenn Morris2008-05-06 04:34:22 +000010;; GNU Emacs is free software: you can redistribute it and/or modify
2fe590dc Erik Naggum1996-01-14 09:58:28 +000011;; it under the terms of the GNU General Public License as published by
1fecc8fe
GM
Glenn Morris2008-05-06 04:34:22 +000012;; the Free Software Foundation, either version 3 of the License, or
13;; (at your option) any later version.
2fe590dc
EN
Erik Naggum1996-01-14 09:58:28 +000014
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
1fecc8fe Glenn Morris2008-05-06 04:34:22 +000021;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
63f77899 Jim Blandy1990-03-22 20:46:04 +000022
5cdb3f1e Eric S. Raymond1993-03-12 19:53:22 +000023;;; Commentary:
63f77899 Jim Blandy1990-03-22 20:46:04 +000024
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +000025;; X-win.el: this file defines functions to initialize the X window
26;; system and process X-specific command line parameters before
27;; creating the first X frame.
28
2e34dc8b
CY
Chong Yidong2008-12-20 21:15:47 +000029;; Beginning in Emacs 23, the act of loading this file should not have
30;; the side effect of initializing the window system or processing
31;; command line arguments (this file is now loaded in loadup.el). See
32;; the variables `handle-args-function-alist' and
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +000033;; `window-system-initialization-alist' for more details.
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +000034
35;; startup.el will then examine startup files, and eventually call the hooks
cf07d2bd Dave Love2002-10-30 19:26:23 +000036;; which create the first window(s).
5cdb3f1e
ER
Eric S. Raymond1993-03-12 19:53:22 +000037
38;;; Code:
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +000039\f
40;; These are the standard X switches from the Xt Initialize.c file of
41;; Release 4.
42
43;; Command line Resource Manager string
44
45;; +rv *reverseVideo
46;; +synchronous *synchronous
47;; -background *background
48;; -bd *borderColor
49;; -bg *background
50;; -bordercolor *borderColor
51;; -borderwidth .borderWidth
52;; -bw .borderWidth
53;; -display .display
54;; -fg *foreground
55;; -fn *font
56;; -font *font
57;; -foreground *foreground
58;; -geometry .geometry
59;; -iconic .iconic
60;; -name .name
61;; -reverse *reverseVideo
62;; -rv *reverseVideo
63;; -selectionTimeout .selectionTimeout
64;; -synchronous *synchronous
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +000065;; -xrm
66
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +000067;; An alist of X options and the function which handles them. See
68;; ../startup.el.
69
efc3dd3c
DC
Daniel Colascione2012-09-17 03:55:05 -080070(eval-when-compile (require 'cl-lib))
71
2246281f Karoly Lorentey2004-01-11 21:59:40 +000072(if (not (fboundp 'x-create-frame))
800642d2 Jim Blandy1993-07-18 06:21:42 +000073 (error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
db95369b Juanma Barranquero2003-02-04 13:30:45 +000074
36c6d20b Glenn Morris2015-05-08 20:24:37 -040075(require 'term/common-win)
0cc89026 Jim Blandy1992-07-15 03:24:58 +000076(require 'frame)
3eb43f71 Jim Blandy1991-12-20 08:26:25 +000077(require 'mouse)
b16795eb Jim Blandy1993-03-02 02:03:41 +000078(require 'scroll-bar)
ffe1dd7a
JB
Jim Blandy1993-05-09 23:54:12 +000079(require 'faces)
80(require 'select)
290cb602 Richard M. Stallman1993-05-15 21:19:18 +000081(require 'menu-bar)
6acdd93e Kenichi Handa2003-01-17 08:14:14 +000082(require 'fontset)
6b61353c Kenichi Handa2004-04-16 12:51:06 +000083(require 'x-dnd)
63c86e17 Jim Blandy1991-05-17 00:15:22 +000084
19b08de9 Richard M. Stallman1993-06-01 00:29:11 +000085(defvar x-invocation-args)
cc5e32c5
JB
Juanma Barranquero2005-08-31 09:54:53 +000086(defvar x-keysym-table)
87(defvar x-selection-timeout)
88(defvar x-session-id)
89(defvar x-session-previous-id)
19b08de9 Richard M. Stallman1993-06-01 00:29:11 +000090
9d3aa82c Juanma Barranquero2013-08-09 01:59:14 +020091(defun x-handle-no-bitmap-icon (_switch)
0389072b
JD
Jan Djärv2007-07-22 12:13:34 +000092 (setq default-frame-alist (cons '(icon-type) default-frame-alist)))
93
350c1745
JD
Jan Djärv2008-02-07 14:07:00 +000094;; Handle the --parent-id option.
95(defun x-handle-parent-id (switch)
96 (or (consp x-invocation-args)
97 (error "%s: missing argument to `%s' option" (invocation-name) switch))
f9c7b08c
GM
Glenn Morris2008-02-08 08:33:42 +000098 (setq initial-frame-alist (cons
99 (cons 'parent-id
100 (string-to-number (car x-invocation-args)))
101 initial-frame-alist)
102 x-invocation-args (cdr x-invocation-args)))
350c1745 Jan Djärv2008-02-07 14:07:00 +0000103
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000104;; Handle the --smid switch. This is used by the session manager
105;; to give us back our session id we had on the previous run.
106(defun x-handle-smid (switch)
107 (or (consp x-invocation-args)
108 (error "%s: missing argument to `%s' option" (invocation-name) switch))
109 (setq x-session-previous-id (car x-invocation-args)
110 x-invocation-args (cdr x-invocation-args)))
111
112(defvar emacs-save-session-functions nil
c3ef5084
SM
Stefan Monnier2003-05-24 16:13:06 +0000113 "Special hook run when a save-session event occurs.
114The functions do not get any argument.
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000115Functions can return non-nil to inform the session manager that the
116window system shutdown should be aborted.
117
118See also `emacs-session-save'.")
119
120(defun emacs-session-filename (session-id)
121 "Construct a filename to save the session in based on SESSION-ID.
1493c2af
JB
Juanma Barranquero2013-06-20 23:58:29 +0200122Return a filename in `user-emacs-directory', unless the session file
123already exists in the home directory."
124 (let ((basename (concat "session." session-id)))
125 (locate-user-emacs-file basename
126 (concat ".emacs-" basename))))
db95369b Juanma Barranquero2003-02-04 13:30:45 +0000127
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000128(defun emacs-session-save ()
129 "This function is called when the window system is shutting down.
c80e3b4a Paul Eggert2011-12-04 00:02:42 -0800130If this function returns non-nil, the window system shutdown is canceled.
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000131
132When a session manager tells Emacs that the window system is shutting
133down, this function is called. It calls the functions in the hook
134`emacs-save-session-functions'. Functions are called with the current
135buffer set to a temporary buffer. Functions should use `insert' to insert
db9e401b
JB
Juanma Barranquero2010-01-18 05:39:40 +0100136lisp code to save the session state. The buffer is saved in a file in the
137home directory of the user running Emacs. The file is evaluated when
138Emacs is restarted by the session manager.
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000139
140If any of the functions returns non-nil, no more functions are called
141and this function returns non-nil. This will inform the session manager
142that it should abort the window system shutdown."
143 (let ((filename (emacs-session-filename x-session-id))
144 (buf (get-buffer-create (concat " *SES " x-session-id))))
145 (when (file-exists-p filename)
146 (delete-file filename))
147 (with-current-buffer buf
148 (let ((cancel-shutdown (condition-case nil
3842fde1 Jan Djärv2002-03-12 21:15:07 +0000149 ;; A return of t means cancel the shutdown.
db95369b Juanma Barranquero2003-02-04 13:30:45 +0000150 (run-hook-with-args-until-success
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000151 'emacs-save-session-functions)
152 (error t))))
153 (unless cancel-shutdown
154 (write-file filename))
155 (kill-buffer buf)
156 cancel-shutdown))))
157
1e4f6cec Jan Djärv2002-03-12 19:15:06 +0000158(defun emacs-session-restore (previous-session-id)
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000159 "Restore the Emacs session if started by a session manager.
160The file saved by `emacs-session-save' is evaluated and deleted if it
161exists."
1e4f6cec Jan Djärv2002-03-12 19:15:06 +0000162 (let ((filename (emacs-session-filename previous-session-id)))
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000163 (when (file-exists-p filename)
164 (load-file filename)
165 (delete-file filename)
166 (message "Restored session data"))))
167
db95369b
JB
Juanma Barranquero2003-02-04 13:30:45 +0000168
169
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +0000170\f
171;;
172;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.
173;;
174
175(defconst x-pointer-X-cursor 0)
176(defconst x-pointer-arrow 2)
177(defconst x-pointer-based-arrow-down 4)
178(defconst x-pointer-based-arrow-up 6)
179(defconst x-pointer-boat 8)
180(defconst x-pointer-bogosity 10)
181(defconst x-pointer-bottom-left-corner 12)
182(defconst x-pointer-bottom-right-corner 14)
183(defconst x-pointer-bottom-side 16)
184(defconst x-pointer-bottom-tee 18)
185(defconst x-pointer-box-spiral 20)
186(defconst x-pointer-center-ptr 22)
187(defconst x-pointer-circle 24)
188(defconst x-pointer-clock 26)
189(defconst x-pointer-coffee-mug 28)
190(defconst x-pointer-cross 30)
191(defconst x-pointer-cross-reverse 32)
192(defconst x-pointer-crosshair 34)
193(defconst x-pointer-diamond-cross 36)
194(defconst x-pointer-dot 38)
195(defconst x-pointer-dotbox 40)
196(defconst x-pointer-double-arrow 42)
197(defconst x-pointer-draft-large 44)
198(defconst x-pointer-draft-small 46)
199(defconst x-pointer-draped-box 48)
200(defconst x-pointer-exchange 50)
201(defconst x-pointer-fleur 52)
202(defconst x-pointer-gobbler 54)
203(defconst x-pointer-gumby 56)
204(defconst x-pointer-hand1 58)
205(defconst x-pointer-hand2 60)
206(defconst x-pointer-heart 62)
207(defconst x-pointer-icon 64)
208(defconst x-pointer-iron-cross 66)
209(defconst x-pointer-left-ptr 68)
210(defconst x-pointer-left-side 70)
211(defconst x-pointer-left-tee 72)
212(defconst x-pointer-leftbutton 74)
213(defconst x-pointer-ll-angle 76)
214(defconst x-pointer-lr-angle 78)
215(defconst x-pointer-man 80)
216(defconst x-pointer-middlebutton 82)
217(defconst x-pointer-mouse 84)
218(defconst x-pointer-pencil 86)
219(defconst x-pointer-pirate 88)
220(defconst x-pointer-plus 90)
221(defconst x-pointer-question-arrow 92)
222(defconst x-pointer-right-ptr 94)
223(defconst x-pointer-right-side 96)
224(defconst x-pointer-right-tee 98)
225(defconst x-pointer-rightbutton 100)
226(defconst x-pointer-rtl-logo 102)
227(defconst x-pointer-sailboat 104)
228(defconst x-pointer-sb-down-arrow 106)
229(defconst x-pointer-sb-h-double-arrow 108)
230(defconst x-pointer-sb-left-arrow 110)
231(defconst x-pointer-sb-right-arrow 112)
232(defconst x-pointer-sb-up-arrow 114)
233(defconst x-pointer-sb-v-double-arrow 116)
234(defconst x-pointer-shuttle 118)
235(defconst x-pointer-sizing 120)
236(defconst x-pointer-spider 122)
237(defconst x-pointer-spraycan 124)
238(defconst x-pointer-star 126)
239(defconst x-pointer-target 128)
240(defconst x-pointer-tcross 130)
241(defconst x-pointer-top-left-arrow 132)
242(defconst x-pointer-top-left-corner 134)
243(defconst x-pointer-top-right-corner 136)
244(defconst x-pointer-top-side 138)
245(defconst x-pointer-top-tee 140)
246(defconst x-pointer-trek 142)
247(defconst x-pointer-ul-angle 144)
248(defconst x-pointer-umbrella 146)
249(defconst x-pointer-ur-angle 148)
250(defconst x-pointer-watch 150)
251(defconst x-pointer-xterm 152)
5cb94d12 Jan Djärv2007-08-31 10:13:35 +0000252(defconst x-pointer-invisible 255)
63f77899 Jim Blandy1990-03-22 20:46:04 +0000253
d5e4dda5 Dan Nicolaescu2008-07-20 00:37:45 +0000254\f
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000255;;;; Keysyms
256
9b4234ae Richard M. Stallman1995-05-15 23:19:13 +0000257(defun vendor-specific-keysyms (vendor)
089bc712 John Paul Wallington2003-03-10 13:30:22 +0000258 "Return the appropriate value of `system-key-alist' for VENDOR.
9b4234ae Richard M. Stallman1995-05-15 23:19:13 +0000259VENDOR is a string containing the name of the X Server's vendor,
089bc712 John Paul Wallington2003-03-10 13:30:22 +0000260as returned by `x-server-vendor'."
f3041af1 Dan Nicolaescu2008-01-06 00:56:56 +0000261 (cond ((or (string-equal vendor "Hewlett-Packard Incorporated")
3f18a142 Karl Heuer1995-05-24 04:59:27 +0000262 (string-equal vendor "Hewlett-Packard Company"))
9b4234ae
RS
Richard M. Stallman1995-05-15 23:19:13 +0000263 '(( 168 . mute-acute)
264 ( 169 . mute-grave)
265 ( 170 . mute-asciicircum)
266 ( 171 . mute-diaeresis)
267 ( 172 . mute-asciitilde)
268 ( 175 . lira)
269 ( 190 . guilder)
270 ( 252 . block)
271 ( 256 . longminus)
272 (65388 . reset)
273 (65389 . system)
274 (65390 . user)
275 (65391 . clearline)
276 (65392 . insertline)
277 (65393 . deleteline)
278 (65394 . insertchar)
279 (65395 . deletechar)
280 (65396 . backtab)
281 (65397 . kp-backtab)))
cf07d2bd Dave Love2002-10-30 19:26:23 +0000282 ;; Fixme: What about non-X11/NeWS sun server?
04486a2d
KH
Karl Heuer1995-06-02 01:03:43 +0000283 ((or (string-equal vendor "X11/NeWS - Sun Microsystems Inc.")
284 (string-equal vendor "X Consortium"))
51a8e1cc
KH
Karl Heuer1995-07-17 22:49:37 +0000285 '((392976 . f36)
286 (392977 . f37)
9b4234ae
RS
Richard M. Stallman1995-05-15 23:19:13 +0000287 (393056 . req)
288 ;; These are for Sun under X11R6
289 (393072 . props)
290 (393073 . front)
291 (393074 . copy)
292 (393075 . open)
293 (393076 . paste)
294 (393077 . cut)))
295 (t
296 ;; This is used by DEC's X server.
297 '((65280 . remove)))))
298
58fa26d4 Dave Love2002-10-28 14:46:01 +0000299;; Latin-1
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000300(let ((i 160))
301 (while (< i 256)
1d912b36 Dave Love2002-10-27 21:10:00 +0000302 (puthash i i x-keysym-table)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000303 (setq i (1+ i))))
304
305;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
306;; appendix to the X protocol definition.
307(dolist
308 (pair
309 '(
310 ;; Latin-2
311 (#x1a1 . ?\e,B!\e(B)
312 (#x1a2 . ?\e,B"\e(B)
313 (#x1a3 . ?\e,B#\e(B)
314 (#x1a5 . ?\e,B%\e(B)
315 (#x1a6 . ?\e,B&\e(B)
316 (#x1a9 . ?\e,B)\e(B)
317 (#x1aa . ?\e,B*\e(B)
318 (#x1ab . ?\e,B+\e(B)
319 (#x1ac . ?\e,B,\e(B)
320 (#x1ae . ?\e,B.\e(B)
321 (#x1af . ?\e,B/\e(B)
322 (#x1b1 . ?\e,B1\e(B)
323 (#x1b2 . ?\e,B2\e(B)
324 (#x1b3 . ?\e,B3\e(B)
325 (#x1b5 . ?\e,B5\e(B)
326 (#x1b6 . ?\e,B6\e(B)
327 (#x1b7 . ?\e,B7\e(B)
328 (#x1b9 . ?\e,B9\e(B)
329 (#x1ba . ?\e,B:\e(B)
330 (#x1bb . ?\e,B;\e(B)
331 (#x1bc . ?\e,B<\e(B)
332 (#x1bd . ?\e,B=\e(B)
333 (#x1be . ?\e,B>\e(B)
334 (#x1bf . ?\e,B?\e(B)
335 (#x1c0 . ?\e,B@\e(B)
336 (#x1c3 . ?\e,BC\e(B)
337 (#x1c5 . ?\e,BE\e(B)
338 (#x1c6 . ?\e,BF\e(B)
339 (#x1c8 . ?\e,BH\e(B)
340 (#x1ca . ?\e,BJ\e(B)
341 (#x1cc . ?\e,BL\e(B)
342 (#x1cf . ?\e,BO\e(B)
343 (#x1d0 . ?\e,BP\e(B)
344 (#x1d1 . ?\e,BQ\e(B)
345 (#x1d2 . ?\e,B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B)
391 ;; Latin-4
392 (#x3a2 . ?\e,D"\e(B)
393 (#x3a3 . ?\e,D#\e(B)
394 (#x3a5 . ?\e,D%\e(B)
395 (#x3a6 . ?\e,D&\e(B)
396 (#x3aa . ?\e,D*\e(B)
397 (#x3ab . ?\e,D+\e(B)
398 (#x3ac . ?\e,D,\e(B)
399 (#x3b3 . ?\e,D3\e(B)
400 (#x3b5 . ?\e,D5\e(B)
401 (#x3b6 . ?\e,D6\e(B)
402 (#x3ba . ?\e,D:\e(B)
403 (#x3bb . ?\e,D;\e(B)
404 (#x3bc . ?\e,D<\e(B)
405 (#x3bd . ?\e,D=\e(B)
406 (#x3bf . ?\e,D?\e(B)
407 (#x3c0 . ?\e,D@\e(B)
408 (#x3c7 . ?\e,DG\e(B)
409 (#x3cc . ?\e,DL\e(B)
410 (#x3cf . ?\e,DO\e(B)
411 (#x3d1 . ?\e,DQ\e(B)
412 (#x3d2 . ?\e,DR\e(B)
413 (#x3d3 . ?\e,DS\e(B)
414 (#x3d9 . ?\e,DY\e(B)
415 (#x3dd . ?\e,D]\e(B)
416 (#x3de . ?\e,D^\e(B)
417 (#x3e0 . ?\e,D`\e(B)
418 (#x3e7 . ?\e,Dg\e(B)
419 (#x3ec . ?\e,Dl\e(B)
420 (#x3ef . ?\e,Do\e(B)
421 (#x3f1 . ?\e,Dq\e(B)
422 (#x3f2 . ?\e,Dr\e(B)
423 (#x3f3 . ?\e,Ds\e(B)
424 (#x3f9 . ?\e,Dy\e(B)
425 (#x3fd . ?\e,D}\e(B)
426 (#x3fe . ?\e,D~\e(B)
427 ;; Kana: Fixme: needs conversion to Japanese charset -- seems
428 ;; to require jisx0213, for which the Unicode translation
2aa2157b
PE
Paul Eggert2013-03-18 12:44:15 -0700429 ;; isn't clear. Using Emacs to convert this to Unicode and back changes
430 ;; this from "\e(J~\e(B" (i.e., bytes "ESC ( J ~ ESC ( B") to "\e$(G"#\e(B" (i.e., bytes
431 ;; "ESC $ ( G " # ESC ( B").
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000432 (#x47e . ?\e(J~\e(B)
433 (#x4a1 . ?\e$A!#\e(B)
434 (#x4a2 . ?\\e$A!8\e(B)
435 (#x4a3 . ?\\e$A!9\e(B)
436 (#x4a4 . ?\e$A!"\e(B)
437 (#x4a5 . ?\e$A!$\e(B)
438 (#x4a6 . ?\e$A%r\e(B)
439 (#x4a7 . ?\e$A%!\e(B)
440 (#x4a8 . ?\e$A%#\e(B)
441 (#x4a9 . ?\e$A%%\e(B)
442 (#x4aa . ?\e$A%'\e(B)
443 (#x4ab . ?\e$A%)\e(B)
444 (#x4ac . ?\e$A%c\e(B)
445 (#x4ad . ?\e$A%e\e(B)
446 (#x4ae . ?\e$A%g\e(B)
447 (#x4af . ?\e$A%C\e(B)
448 (#x4b0 . ?\e$B!<\e(B)
449 (#x4b1 . ?\e$A%"\e(B)
450 (#x4b2 . ?\e$A%$\e(B)
451 (#x4b3 . ?\e$A%&\e(B)
452 (#x4b4 . ?\e$A%(\e(B)
453 (#x4b5 . ?\e$A%*\e(B)
454 (#x4b6 . ?\e$A%+\e(B)
455 (#x4b7 . ?\e$A%-\e(B)
456 (#x4b8 . ?\e$A%/\e(B)
457 (#x4b9 . ?\e$A%1\e(B)
458 (#x4ba . ?\e$A%3\e(B)
459 (#x4bb . ?\e$A%5\e(B)
460 (#x4bc . ?\e$A%7\e(B)
461 (#x4bd . ?\e$A%9\e(B)
462 (#x4be . ?\e$A%;\e(B)
463 (#x4bf . ?\e$A%=\e(B)
464 (#x4c0 . ?\e$A%?\e(B)
465 (#x4c1 . ?\e$A%A\e(B)
466 (#x4c2 . ?\e$A%D\e(B)
467 (#x4c3 . ?\e$A%F\e(B)
468 (#x4c4 . ?\e$A%H\e(B)
469 (#x4c5 . ?\e$A%J\e(B)
470 (#x4c6 . ?\e$A%K\e(B)
471 (#x4c7 . ?\e$A%L\e(B)
472 (#x4c8 . ?\e$A%M\e(B)
473 (#x4c9 . ?\e$A%N\e(B)
474 (#x4ca . ?\e$A%O\e(B)
475 (#x4cb . ?\e$A%R\e(B)
476 (#x4cc . ?\e$A%U\e(B)
477 (#x4cd . ?\e$A%X\e(B)
478 (#x4ce . ?\e$A%[\e(B)
479 (#x4cf . ?\e$A%^\e(B)
480 (#x4d0 . ?\e$A%_\e(B)
481 (#x4d1 . ?\e$A%`\e(B)
482 (#x4d2 . ?\e$A%a\e(B)
483 (#x4d3 . ?\e$A%b\e(B)
484 (#x4d4 . ?\e$A%d\e(B)
485 (#x4d5 . ?\e$A%f\e(B)
486 (#x4d6 . ?\e$A%h\e(B)
487 (#x4d7 . ?\e$A%i\e(B)
488 (#x4d8 . ?\e$A%j\e(B)
489 (#x4d9 . ?\e$A%k\e(B)
490 (#x4da . ?\e$A%l\e(B)
491 (#x4db . ?\e$A%m\e(B)
492 (#x4dc . ?\e$A%o\e(B)
493 (#x4dd . ?\e$A%s\e(B)
494 (#x4de . ?\e$B!+\e(B)
495 (#x4df . ?\e$B!,\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000496 ;; Arabic
497 (#x5ac . ?\e,G,\e(B)
498 (#x5bb . ?\e,G;\e(B)
499 (#x5bf . ?\e,G?\e(B)
500 (#x5c1 . ?\e,GA\e(B)
501 (#x5c2 . ?\e,GB\e(B)
502 (#x5c3 . ?\e,GC\e(B)
503 (#x5c4 . ?\e,GD\e(B)
504 (#x5c5 . ?\e,GE\e(B)
505 (#x5c6 . ?\e,GF\e(B)
506 (#x5c7 . ?\e,GG\e(B)
507 (#x5c8 . ?\e,GH\e(B)
508 (#x5c9 . ?\e,GI\e(B)
509 (#x5ca . ?\e,GJ\e(B)
510 (#x5cb . ?\e,GK\e(B)
511 (#x5cc . ?\e,GL\e(B)
512 (#x5cd . ?\e,GM\e(B)
513 (#x5ce . ?\e,GN\e(B)
514 (#x5cf . ?\e,GO\e(B)
515 (#x5d0 . ?\e,GP\e(B)
516 (#x5d1 . ?\e,GQ\e(B)
517 (#x5d2 . ?\e,GR\e(B)
518 (#x5d3 . ?\e,GS\e(B)
519 (#x5d4 . ?\e,GT\e(B)
520 (#x5d5 . ?\e,GU\e(B)
521 (#x5d6 . ?\e,GV\e(B)
522 (#x5d7 . ?\e,GW\e(B)
523 (#x5d8 . ?\e,GX\e(B)
524 (#x5d9 . ?\e,GY\e(B)
525 (#x5da . ?\e,GZ\e(B)
526 (#x5e0 . ?\e,G`\e(B)
527 (#x5e1 . ?\e,Ga\e(B)
528 (#x5e2 . ?\e,Gb\e(B)
529 (#x5e3 . ?\e,Gc\e(B)
530 (#x5e4 . ?\e,Gd\e(B)
531 (#x5e5 . ?\e,Ge\e(B)
532 (#x5e6 . ?\e,Gf\e(B)
533 (#x5e7 . ?\e,Gg\e(B)
534 (#x5e8 . ?\e,Gh\e(B)
535 (#x5e9 . ?\e,Gi\e(B)
536 (#x5ea . ?\e,Gj\e(B)
537 (#x5eb . ?\e,Gk\e(B)
538 (#x5ec . ?\e,Gl\e(B)
539 (#x5ed . ?\e,Gm\e(B)
540 (#x5ee . ?\e,Gn\e(B)
541 (#x5ef . ?\e,Go\e(B)
542 (#x5f0 . ?\e,Gp\e(B)
543 (#x5f1 . ?\e,Gq\e(B)
544 (#x5f2 . ?\e,Gr\e(B)
545 ;; Cyrillic
1cbe1e4b
KH
Kenichi Handa2005-10-24 11:09:06 +0000546 (#x680 . ?\e$,1)R\e(B)
547 (#x681 . ?\e$,1)V\e(B)
548 (#x682 . ?\e$,1)Z\e(B)
549 (#x683 . ?\e$,1)\\e(B)
550 (#x684 . ?\e$,1)b\e(B)
551 (#x685 . ?\e$,1)n\e(B)
552 (#x686 . ?\e$,1)p\e(B)
553 (#x687 . ?\e$,1)r\e(B)
554 (#x688 . ?\e$,1)v\e(B)
555 (#x689 . ?\e$,1)x\e(B)
556 (#x68a . ?\e$,1)z\e(B)
557 (#x68c . ?\e$,1*8\e(B)
558 (#x68d . ?\e$,1*B\e(B)
559 (#x68e . ?\e$,1*H\e(B)
560 (#x68f . ?\e$,1*N\e(B)
561 (#x690 . ?\e$,1)S\e(B)
562 (#x691 . ?\e$,1)W\e(B)
563 (#x692 . ?\e$,1)[\e(B)
564 (#x693 . ?\e$,1)]\e(B)
565 (#x694 . ?\e$,1)c\e(B)
566 (#x695 . ?\e$,1)o\e(B)
567 (#x696 . ?\e$,1)q\e(B)
568 (#x697 . ?\e$,1)s\e(B)
569 (#x698 . ?\e$,1)w\e(B)
570 (#x699 . ?\e$,1)y\e(B)
571 (#x69a . ?\e$,1){\e(B)
572 (#x69c . ?\e$,1*9\e(B)
573 (#x69d . ?\e$,1*C\e(B)
574 (#x69e . ?\e$,1*I\e(B)
575 (#x69f . ?\e$,1*O\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000576 (#x6a1 . ?\e,Lr\e(B)
577 (#x6a2 . ?\e,Ls\e(B)
578 (#x6a3 . ?\e,Lq\e(B)
579 (#x6a4 . ?\e,Lt\e(B)
580 (#x6a5 . ?\e,Lu\e(B)
581 (#x6a6 . ?\e,Lv\e(B)
582 (#x6a7 . ?\e,Lw\e(B)
583 (#x6a8 . ?\e,Lx\e(B)
584 (#x6a9 . ?\e,Ly\e(B)
585 (#x6aa . ?\e,Lz\e(B)
586 (#x6ab . ?\e,L{\e(B)
587 (#x6ac . ?\e,L|\e(B)
588 (#x6ae . ?\e,L~\e(B)
589 (#x6af . ?\e,L\x7f\e(B)
590 (#x6b0 . ?\e,Lp\e(B)
591 (#x6b1 . ?\e,L"\e(B)
592 (#x6b2 . ?\e,L#\e(B)
593 (#x6b3 . ?\e,L!\e(B)
594 (#x6b4 . ?\e,L$\e(B)
595 (#x6b5 . ?\e,L%\e(B)
596 (#x6b6 . ?\e,L&\e(B)
597 (#x6b7 . ?\e,L'\e(B)
598 (#x6b8 . ?\e,L(\e(B)
599 (#x6b9 . ?\e,L)\e(B)
600 (#x6ba . ?\e,L*\e(B)
601 (#x6bb . ?\e,L+\e(B)
602 (#x6bc . ?\e,L,\e(B)
603 (#x6be . ?\e,L.\e(B)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\e(B)
649 (#x6ec . ?\e,L;\e(B)
650 (#x6ed . ?\e,L<\e(B)
651 (#x6ee . ?\e,L=\e(B)
652 (#x6ef . ?\e,L>\e(B)
653 (#x6f0 . ?\e,L?\e(B)
654 (#x6f1 . ?\e,LO\e(B)
655 (#x6f2 . ?\e,L@\e(B)
656 (#x6f3 . ?\e,LA\e(B)
657 (#x6f4 . ?\e,LB\e(B)
658 (#x6f5 . ?\e,LC\e(B)
659 (#x6f6 . ?\e,L6\e(B)
660 (#x6f7 . ?\e,L2\e(B)
661 (#x6f8 . ?\e,LL\e(B)
662 (#x6f9 . ?\e,LK\e(B)
663 (#x6fa . ?\e,L7\e(B)
664 (#x6fb . ?\e,LH\e(B)
665 (#x6fc . ?\e,LM\e(B)
666 (#x6fd . ?\e,LI\e(B)
667 (#x6fe . ?\e,LG\e(B)
668 (#x6ff . ?\e,LJ\e(B)
669 ;; Greek
670 (#x7a1 . ?\e,F6\e(B)
671 (#x7a2 . ?\e,F8\e(B)
672 (#x7a3 . ?\e,F9\e(B)
673 (#x7a4 . ?\e,F:\e(B)
674 (#x7a5 . ?\e,FZ\e(B)
675 (#x7a7 . ?\e,F<\e(B)
676 (#x7a8 . ?\e,F>\e(B)
677 (#x7a9 . ?\e,F[\e(B)
678 (#x7ab . ?\e,F?\e(B)
679 (#x7ae . ?\e,F5\e(B)
680 (#x7af . ?\e,F/\e(B)
681 (#x7b1 . ?\e,F\\e(B)
682 (#x7b2 . ?\e,F]\e(B)
683 (#x7b3 . ?\e,F^\e(B)
684 (#x7b4 . ?\e,F_\e(B)
685 (#x7b5 . ?\e,Fz\e(B)
686 (#x7b6 . ?\e,F@\e(B)
687 (#x7b7 . ?\e,F|\e(B)
688 (#x7b8 . ?\e,F}\e(B)
689 (#x7b9 . ?\e,F{\e(B)
690 (#x7ba . ?\e,F`\e(B)
691 (#x7bb . ?\e,F~\e(B)
692 (#x7c1 . ?\e,FA\e(B)
693 (#x7c2 . ?\e,FB\e(B)
694 (#x7c3 .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?\e,Fw\e(B)
739 (#x7f8 . ?\e,Fx\e(B)
740 (#x7f9 . ?\e,Fy\e(B)
741 ;; Technical
742 (#x8a1 . ?\e$,1|W\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000743 (#x8a2 . ?\e$A)0\e(B)
744 (#x8a3 . ?\e$A)$\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000745 (#x8a4 . ?\e$,1{ \e(B)
746 (#x8a5 . ?\e$,1{!\e(B)
6b61353c Kenichi Handa2004-04-16 12:51:06 +0000747 (#x8a6 . ?\e$A)&\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000748 (#x8a7 . ?\e$,1|A\e(B)
749 (#x8a8 . ?\e$,1|C\e(B)
750 (#x8a9 . ?\e$,1|D\e(B)
751 (#x8aa . ?\e$,1|F\e(B)
752 (#x8ab . ?\e$,1|;\e(B)
753 (#x8ac . ?\e$,1|=\e(B)
754 (#x8ad . ?\e$,1|>\e(B)
755 (#x8ae . ?\e$,1|@\e(B)
756 (#x8af . ?\e$,1|H\e(B)
757 (#x8b0 . ?\e$,1|L\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000758 (#x8bc . ?\e$A!\\e(B)
759 (#x8bd . ?\e$A!Y\e(B)
760 (#x8be . ?\e$A!]\e(B)
761 (#x8bf . ?\e$A!R\e(B)
762 (#x8c0 . ?\e$A!`\e(B)
763 (#x8c1 . ?\e$A!X\e(B)
764 (#x8c2 . ?\e$A!^\e(B)
765 (#x8c5 . ?\e$B"`\e(B)
766 (#x8c8 . ?\e$(G"D\e(B)
767 (#x8c9 . ?\e$(O"l\e(B)
768 (#x8cd . ?\e$B"N\e(B)
769 (#x8ce . ?\e$B"M\e(B)
770 (#x8cf . ?\e$A!T\e(B)
771 (#x8d6 . ?\e$A!L\e(B)
772 (#x8da . ?\e$B">\e(B)
773 (#x8db . ?\e$B"?\e(B)
774 (#x8dc . ?\e$A!I\e(B)
775 (#x8dd . ?\e$A!H\e(B)
776 (#x8de . ?\e$A!D\e(B)
777 (#x8df . ?\e$A!E\e(B)
778 (#x8ef . ?\e$B"_\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000779 (#x8f6 . ?\e$,1!R\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000780 (#x8fb . ?\e$A!{\e(B)
781 (#x8fc . ?\e$A!|\e(B)
782 (#x8fd . ?\e$A!z\e(B)
783 (#x8fe . ?\e$A!}\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000784 ;; Special
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000785 (#x9e0 . ?\e$A!t\e(B)
786 (#x9e1 . ?\e$(C"F\e(B)
787 (#x9e2 . ?\e$(GB*\e(B)
788 (#x9e3 . ?\e$(GB-\e(B)
789 (#x9e4 . ?\e$(GB.\e(B)
790 (#x9e5 . ?\e$(GB+\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000791 (#x9e8 . ?\e$,1}d\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000792 (#x9e9 . ?\e$(GB,\e(B)
793 (#x9ea . ?\e$A)<\e(B)
794 (#x9eb . ?\e$A)4\e(B)
795 (#x9ec . ?\e$A)0\e(B)
796 (#x9ed . ?\e$A)8\e(B)
797 (#x9ee . ?\e$A)`\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000798 (#x9ef . ?\e$,1|Z\e(B)
799 (#x9f0 . ?\e$,1|[\e(B)
6b61353c Kenichi Handa2004-04-16 12:51:06 +0000800 (#x9f1 . ?\e$A)$\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000801 (#x9f2 . ?\e$,1|\\e(B)
802 (#x9f3 . ?\e$,1|]\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000803 (#x9f4 . ?\e$A)@\e(B)
804 (#x9f5 . ?\e$A)H\e(B)
805 (#x9f6 . ?\e$A)X\e(B)
806 (#x9f7 . ?\e$A)P\e(B)
807 (#x9f8 . ?\e$A)&\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000808 ;; Publishing
809 (#xaa1 . ?\e$,1rc\e(B)
810 (#xaa2 . ?\e$,1rb\e(B)
811 (#xaa3 . ?\e$,1rd\e(B)
812 (#xaa4 . ?\e$,1re\e(B)
813 (#xaa5 . ?\e$,1rg\e(B)
814 (#xaa6 . ?\e$,1rh\e(B)
815 (#xaa7 . ?\e$,1ri\e(B)
816 (#xaa8 . ?\e$,1rj\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000817 (#xaa9 . ?\e$(G!7\e(B)
818 (#xaaa . ?\e$(G!9\e(B)
819 (#xaae . ?\e$A!-\e(B)
820 (#xaaf . ?\e$(G!-\e(B)
821 (#xab0 . ?\e$(O'x\e(B)
822 (#xab1 . ?\e$(O'y\e(B)
823 (#xab2 . ?\e$(O'z\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000824 (#xab3 . ?\e$,1v6\e(B)
825 (#xab4 . ?\e$,1v7\e(B)
826 (#xab5 . ?\e$,1v8\e(B)
827 (#xab6 . ?\e$,1v9\e(B)
828 (#xab7 . ?\e$,1v:\e(B)
6b61353c Kenichi Handa2004-04-16 12:51:06 +0000829 (#xab8 . ?\e$(G""\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000830 (#xabb . ?\e$,1rr\e(B)
831 (#xabc . ?\e$,1{)\e(B)
832 (#xabe . ?\e$,1{*\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000833 (#xac3 . ?\e$(C({\e(B)
834 (#xac4 . ?\e$(C(|\e(B)
835 (#xac5 . ?\e$(C(}\e(B)
836 (#xac6 . ?\e$(C(~\e(B)
837 (#xac9 . ?\e$(D"o\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000838 (#xaca . ?\e$,2"s\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000839 (#xacc . ?\e$(O##\e(B)
840 (#xacd . ?\e$(O#!\e(B)
841 (#xace . ?\e$A!p\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000842 (#xacf . ?\e$,2!o\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000843 (#xad0 . ?\e,F!\e(B)
844 (#xad1 . ?\e,F"\e(B)
845 (#xad2 . ?\e,Y4\e(B)
846 (#xad3 . ?\e,Y!\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000847 (#xad4 . ?\e$,1u^\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000848 (#xad6 . ?\e$A!d\e(B)
849 (#xad7 . ?\e$A!e\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000850 (#xad9 . ?\e$,2%]\e(B)
851 (#xadb . ?\e$,2!l\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000852 (#xadc . ?\e$(O#$\e(B)
853 (#xadd . ?\e$(O#"\e(B)
854 (#xade . ?\e$A!q\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000855 (#xadf . ?\e$,2!n\e(B)
6b61353c Kenichi Handa2004-04-16 12:51:06 +0000856 (#xae0 . ?\e$(O#?\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000857 (#xae1 . ?\e$,2!k\e(B)
858 (#xae2 . ?\e$,2!m\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000859 (#xae3 . ?\e$A!w\e(B)
860 (#xae4 . ?\e$(G!}\e(B)
861 (#xae5 . ?\e$A!n\e(B)
862 (#xae6 . ?\e$(O#@\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000863 (#xae7 . ?\e$,2!j\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000864 (#xae8 . ?\e$A!x\e(B)
865 (#xae9 . ?\e$(G!~\e(B)
866 (#xaea . ?\e$(C"P\e(B)
867 (#xaeb . ?\e$(O-~\e(B)
868 (#xaec . ?\e$(O&@\e(B)
869 (#xaed . ?\e$(O&<\e(B)
870 (#xaee . ?\e$(O&>\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000871 (#xaf0 . ?\e$,2%`\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000872 (#xaf1 . ?\e$B"w\e(B)
873 (#xaf2 . ?\e$B"x\e(B)
874 (#xaf3 . ?\e$(O'{\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000875 (#xaf4 . ?\e$,2%W\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000876 (#xaf5 . ?\e$B"t\e(B)
877 (#xaf6 . ?\e$B"u\e(B)
878 (#xaf7 . ?\e$A!a\e(B)
879 (#xaf8 . ?\e$A!b\e(B)
880 (#xaf9 . ?\e$(O&g\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000881 (#xafa . ?\e$,1zu\e(B)
882 (#xafb . ?\e$,1uW\e(B)
883 (#xafc . ?\e$,1s8\e(B)
884 (#xafd . ?\e$,1rz\e(B)
6b61353c Kenichi Handa2004-04-16 12:51:06 +0000885 (#xafe . ?\e,Y%\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000886 ;; APL
887 (#xba3 . ?<)
888 (#xba6 . ?>)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000889 (#xba8 . ?\e$A!E\e(B)
890 (#xba9 . ?\e$A!D\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000891 (#xbc0 . ?\e,A/\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000892 (#xbc2 . ?\e$A!M\e(B)
893 (#xbc3 . ?\e$A!I\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000894 (#xbc4 . ?\e$,1zj\e(B)
895 (#xbc6 . ?_)
896 (#xbca . ?\e$,1x8\e(B)
897 (#xbcc . ?\e$,1|5\e(B)
898 (#xbce . ?\e$,1yd\e(B)
6b61353c Kenichi Handa2004-04-16 12:51:06 +0000899 (#xbcf . ?\e$A!p\e(B)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000900 (#xbd3 . ?\e$,1zh\e(B)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +0000901 (#xbd6 . ?\e$A!H\e(B)
902 (#xbd8 . ?\e$B"?\e(B)
903 (#xbda . ?\e$B">\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000904 (#xbdc . ?\e$,1yb\e(B)
905 (#xbfc . ?\e$,1yc\e(B)
906 ;; Hebrew
907 (#xcdf . ?\e,H_\e(B)
908 (#xce0 . ?\e,H`\e(B)
909 (#xce1 . ?\e,Ha\e(B)
910 (#xce2 . ?\e,Hb\e(B)
911 (#xce3 . ?\e,Hc\e(B)
912 (#xce4 . ?\e,Hd\e(B)
913 (#xce5 . ?\e,He\e(B)
914 (#xce6 . ?\e,Hf\e(B)
915 (#xce7 . ?\e,Hg\e(B)
916 (#xce8 . ?\e,Hh\e(B)
917 (#xce9 . ?\e,Hi\e(B)
918 (#xcea . ?\e,Hj\e(B)
919 (#xceb . ?\e,Hk\e(B)
920 (#xcec . ?\e,Hl\e(B)
921 (#xced . ?\e,Hm\e(B)
922 (#xcee . ?\e,Hn\e(B)
923 (#xcef . ?\e,Ho\e(B)
924 (#xcf0 . ?\e,Hp\e(B)
925 (#xcf1 . ?\e,Hq\e(B)
926 (#xcf2 . ?\e,Hr\e(B)
927 (#xcf3 . ?\e,Hs\e(B)
928 (#xcf4 . ?\e,Ht\e(B)
929 (#xcf5 . ?\e,Hu\e(B)
930 (#xcf6 . ?\e,Hv\e(B)
931 (#xcf7 . ?\e,Hw\e(B)
932 (#xcf8 . ?\e,Hx\e(B)
933 (#xcf9 . ?\e,Hy\e(B)
934 (#xcfa . ?\e,Hz\e(B)
935 ;; Thai
936 (#xda1 . ?\e,T!\e(B)
937 (#xda2 . ?\e,T"\e(B)
938 (#xda3 . ?\e,T#\e(B)
939 (#xda4 . ?\e,T$\e(B)
940 (#xda5 . ?\e,T%\e(B)
941 (#xda6 . ?\e,T&\e(B)
942 (#xda7 . ?\e,T'\e(B)
943 (#xda8 . ?\e,T(\e(B)
944 (#xda9 . ?\e,T)\e(B)
945 (#xdaa . ?\e,T*\e(B)
946 (#xdab . ?\e,T+\e(B)
947 (#xdac . ?\e,T,\e(B)
948 (#xdad . ?\e,T-\e(B)
949 (#xdae . ?\e,T.\e(B)
950 (#xdaf . ?\e,T/\e(B)
951 (#xdb0 . ?\e,T0\e(B)
952 (#xdb1 . ?\e,T1\e(B)
953 (#xdb2 . ?\e,T2\e(B)
954 (#xdb3 . ?\e,T3\e(B)
955 (#xdb4 . ?\e,T4\e(B)
956 (#xdb5 . ?\e,T5\e(B)
957 (#xdb6 . ?\e,T6\e(B)
958 (#xdb7 . ?\e,T7\e(B)
959 (#xdb8 . ?\e,T8\e(B)
960 (#xdb9 . ?\e,T9\e(B)
961 (#xdba . ?\e,T:\e(B)
962 (#xdbb . ?\e,T;\e(B)
963 (#xdbc . ?\e,T<\e(B)
964 (#xdbd . ?\e,T=\e(B)
965 (#xdbe . ?\e,T>\e(B)
966 (#xdbf . ?\e,T?\e(B)
967 (#xdc0 . ?\e,T@\e(B)
968 (#xdc1 . ?\e,TA\e(B)
969 (#xdc2 . ?\e,TB\e(B)
970 (#xdc3 . ?\e,TC\e(B)
971 (#xdc4 . ?\e,TD\e(B)
972 (#xdc5 . ?\e,TE\e(B)
973 (#xdc6 . ?\e,TF\e(B)
974 (#xdc7 . ?\e,TG\e(B)
975 (#xdc8 . ?\e,TH\e(B)
976 (#xdc9 . ?\e,TI\e(B)
977 (#xdca . ?\e,TJ\e(B)
978 (#xdcb . ?\e,TK\e(B)
979 (#xdcc . ?\e,TL\e(B)
980 (#xdcd . ?\e,TM\e(B)
981 (#xdce . ?\e,TN\e(B)
982 (#xdcf . ?\e,TO\e(B)
983 (#xdd0 . ?\e,TP\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?\e$(C$(\e(B)
1028 (#xea9 . ?\e$(C$)\e(B)
1029 (#xeaa . ?\e$(C$*\e(B)
1030 (#xeab . ?\e$(C$+\e(B)
1031 (#xeac . ?\e$(C$,\e(B)
1032 (#xead . ?\e$(C$-\e(B)
1033 (#xeae . ?\e$(C$.\e(B)
1034 (#xeaf . ?\e$(C$/\e(B)
1035 (#xeb0 . ?\e$(C$0\e(B)
1036 (#xeb1 . ?\e$(C$1\e(B)
1037 (#xeb2 . ?\e$(C$2\e(B)
1038 (#xeb3 . ?\e$(C$3\e(B)
1039 (#xeb4 . ?\e$(C$4\e(B)
1040 (#xeb5 . ?\e$(C$5\e(B)
1041 (#xeb6 . ?\e$(C$6\e(B)
1042 (#xeb7 . ?\e$(C$7\e(B)
1043 (#xeb8 . ?\e$(C$8\e(B)
1044 (#xeb9 . ?\e$(C$9\e(B)
1045 (#xeba . ?\e$(C$:\e(B)
1046 (#xebb . ?\e$(C$;\e(B)
1047 (#xebc . ?\e$(C$<\e(B)
1048 (#xebd . ?\e$(C$=\e(B)
1049 (#xebe . ?\e$(C$>\e(B)
1050 (#xebf . ?\e$(C$?\e(B)
1051 (#xec0 . ?\e$(C$@\e(B)
1052 (#xec1 . ?\e$(C$A\e(B)
1053 (#xec2 . ?\e$(C$B\e(B)
1054 (#xec3 . ?\e$(C$C\e(B)
1055 (#xec4 . ?\e$(C$D\e(B)
1056 (#xec5 . ?\e$(C$E\e(B)
1057 (#xec6 . ?\e$(C$F\e(B)
1058 (#xec7 . ?\e$(C$G\e(B)
1059 (#xec8 . ?\e$(C$H\e(B)
1060 (#xec9 . ?\e$(C$I\e(B)
1061 (#xeca . ?\e$(C$J\e(B)
1062 (#xecb . ?\e$(C$K\e(B)
1063 (#xecc . ?\e$(C$L\e(B)
1064 (#xecd . ?\e$(C$M\e(B)
1065 (#xece . ?\e$(C$N\e(B)
1066 (#xecf . ?\e$(C$O\e(B)
1067 (#xed0 . ?\e$(C$P\e(B)
1068 (#xed1 . ?\e$(C$Q\e(B)
1069 (#xed2 . ?\e$(C$R\e(B)
1070 (#xed3 . ?\e$(C$S\e(B)
1071 (#xed4 . ?\e$,1LH\e(B)
1072 (#xed5 . ?\e$,1LI\e(B)
1073 (#xed6 . ?\e$,1LJ\e(B)
1074 (#xed7 . ?\e$,1LK\e(B)
1075 (#xed8 . ?\e$,1LL\e(B)
1076 (#xed9 . ?\e$,1LM\e(B)
1077 (#xeda . ?\e$,1LN\e(B)
1078 (#xedb . ?\e$,1LO\e(B)
1079 (#xedc . ?\e$,1LP\e(B)
1080 (#xedd . ?\e$,1LQ\e(B)
1081 (#xede . ?\e$,1LR\e(B)
1082 (#xedf . ?\e$,1LS\e(B)
1083 (#xee0 . ?\e$,1LT\e(B)
1084 (#xee1 . ?\e$,1LU\e(B)
1085 (#xee2 . ?\e$,1LV\e(B)
1086 (#xee3 . ?\e$,1LW\e(B)
1087 (#xee4 . ?\e$,1LX\e(B)
1088 (#xee5 . ?\e$,1LY\e(B)
1089 (#xee6 . ?\e$,1LZ\e(B)
1090 (#xee7 . ?\e$,1L[\e(B)
1091 (#xee8 . ?\e$,1L\\e(B)
1092 (#xee9 . ?\e$,1L]\e(B)
1093 (#xeea . ?\e$,1L^\e(B)
1094 (#xeeb . ?\e$,1L_\e(B)
1095 (#xeec . ?\e$,1L`\e(B)
1096 (#xeed . ?\e$,1La\e(B)
1097 (#xeee . ?\e$,1Lb\e(B)
1098 (#xeef . ?\e$(C$]\e(B)
1099 (#xef0 . ?\e$(C$a\e(B)
1100 (#xef1 . ?\e$(C$h\e(B)
1101 (#xef2 . ?\e$(C$o\e(B)
1102 (#xef3 . ?\e$(C$q\e(B)
1103 (#xef4 . ?\e$(C$t\e(B)
1104 (#xef5 . ?\e$(C$v\e(B)
1105 (#xef6 . ?\e$(C$}\e(B)
1106 (#xef7 . ?\e$(C$~\e(B)
1107 (#xef8 . ?\e$,1M+\e(B)
1108 (#xef9 . ?\e$,1M0\e(B)
1109 (#xefa . ?\e$,1M9\e(B)
1110 (#xeff . ?\e$,1tI\e(B)
1111 ;; Latin-5
1112 ;; Latin-6
1113 ;; Latin-7
1114 ;; Latin-8
1115 ;; Latin-9
1116 (#x13bc . ?\e,b<\e(B)
1117 (#x13bd . ?\e,b=\e(B)
6b61353c Kenichi Handa2004-04-16 12:51:06 +00001118 (#x13be . ?\e,_/\e(B)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +00001119 ;; Currency
1120 (#x20a0 . ?\e$,1t@\e(B)
1121 (#x20a1 . ?\e$,1tA\e(B)
1122 (#x20a2 . ?\e$,1tB\e(B)
1123 (#x20a3 . ?\e$,1tC\e(B)
1124 (#x20a4 . ?\e$,1tD\e(B)
1125 (#x20a5 . ?\e$,1tE\e(B)
1126 (#x20a6 . ?\e$,1tF\e(B)
1127 (#x20a7 . ?\e$,1tG\e(B)
1128 (#x20a8 . ?\e$,1tH\e(B)
1129 (#x20aa . ?\e$,1tJ\e(B)
1130 (#x20ab . ?\e$,1tK\e(B)
2aa2157b
PE
Paul Eggert2013-03-18 12:44:15 -07001131 ;; Kana: Fixme: needs checking. Using Emacs to convert this to Unicode
1132 ;; and back changes this from "\e,b$\e(B" (i.e., bytes "ESC , b $ ESC ( B") to
1133 ;; "\e,F$\e(B" (i.e., bytes "ESC , F $ ESC ( B").
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +00001134 (#x20ac . ?\e,b$\e(B)))
1135 (puthash (car pair) (cdr pair) x-keysym-table))
1136
1137;; The following keysym codes for graphics are listed in the document
1138;; as not having unicodes available:
1139
1140;; #x08b1 TOP LEFT SUMMATION Technical
1141;; #x08b2 BOTTOM LEFT SUMMATION Technical
1142;; #x08b3 TOP VERTICAL SUMMATION CONNECTOR Technical
1143;; #x08b4 BOTTOM VERTICAL SUMMATION CONNECTOR Technical
1144;; #x08b5 TOP RIGHT SUMMATION Technical
1145;; #x08b6 BOTTOM RIGHT SUMMATION Technical
1146;; #x08b7 RIGHT MIDDLE SUMMATION Technical
1147;; #x0aac SIGNIFICANT BLANK SYMBOL Publish
1148;; #x0abd DECIMAL POINT Publish
1149;; #x0abf MARKER Publish
1150;; #x0acb TRADEMARK SIGN IN CIRCLE Publish
1151;; #x0ada HEXAGRAM Publish
1152;; #x0aff CURSOR Publish
1153;; #x0dde THAI MAIHANAKAT Thai
1154
2fb263f6 Jim Blandy1992-11-05 04:28:10 +00001155\f
45240125 Jan Djärv2010-09-02 12:17:02 +02001156;;;; Selections
67c86cfc Jim Blandy1992-05-12 05:26:53 +00001157
117c96c7
CY
Chong Yidong2010-09-16 18:47:21 -04001158(define-obsolete-function-alias 'x-cut-buffer-or-selection-value
1159 'x-selection-value "24.1")
1160
c7e36bd9 Stefan Monnier2007-11-09 19:37:03 +00001161;; Arrange for the kill and yank functions to set and check the clipboard.
492878e4 Jim Blandy1992-06-10 02:47:07 +00001162
2a36494c
KL
Karoly Lorentey2004-01-22 15:37:19 +00001163(defun x-clipboard-yank ()
1164 "Insert the clipboard contents, or the last stretch of killed text."
31300bee Stefan Monnier2014-10-01 23:19:32 -04001165 (declare (obsolete clipboard-yank "25.1"))
3f87f67e Karoly Lorentey2006-10-14 16:56:21 +00001166 (interactive "*")
d361bcfb
SM
Stefan Monnier2014-10-22 21:38:59 -04001167 (let ((clipboard-text (gui--selection-value-internal 'CLIPBOARD))
1168 (select-enable-clipboard t))
2a36494c
KL
Karoly Lorentey2004-01-22 15:37:19 +00001169 (if (and clipboard-text (> (length clipboard-text) 0))
1170 (kill-new clipboard-text))
1171 (yank)))
88046be2 Jim Blandy1993-07-03 10:17:56 +00001172
aa360da1
GM
Glenn Morris2008-06-12 03:56:20 +00001173(declare-function accelerate-menu "xmenu.c" (&optional frame) t)
1174
12b6af5c Karoly Lorentey2006-10-14 17:36:28 +00001175(defun x-menu-bar-open (&optional frame)
bbf0e7d9 Masatake YAMATO2012-07-20 07:32:30 -04001176 "Open the menu bar if it is shown.
e1894109 Stefan Monnier2012-08-10 10:47:12 -04001177`popup-menu' is used if it is off."
12b6af5c Karoly Lorentey2006-10-14 17:36:28 +00001178 (interactive "i")
bbf0e7d9
MY
Masatake YAMATO2012-07-20 07:32:30 -04001179 (cond
1180 ((and (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0)))
1181 (fboundp 'accelerate-menu))
1182 (accelerate-menu frame))
1183 (t
e1894109 Stefan Monnier2012-08-10 10:47:12 -04001184 (popup-menu (mouse-menu-bar-map) last-nonmenu-event))))
553624bf Richard M. Stallman1993-06-05 08:39:42 +00001185
2fb263f6 Jim Blandy1992-11-05 04:28:10 +00001186\f
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001187;;; Window system initialization.
84f1b454 Jan Djärv2006-12-30 15:23:38 +00001188
3d80ef3f Richard M. Stallman1993-03-11 18:50:04 +00001189(defun x-win-suspend-error ()
fd492166 Glenn Morris2014-04-11 00:02:28 -07001190 "Report an error when a suspend is attempted.
31300bee Stefan Monnier2014-10-01 23:19:32 -04001191This returns an error if any Emacs frames are X frames."
54da3bdf Chong Yidong2008-08-28 21:16:05 +00001192 ;; Don't allow suspending if any of the frames are X frames.
31300bee Stefan Monnier2014-10-01 23:19:32 -04001193 (if (memq 'x (mapcar #'window-system (frame-list)))
54da3bdf Chong Yidong2008-08-28 21:16:05 +00001194 (error "Cannot suspend Emacs while running under X")))
c8c72d6b Jim Blandy1993-03-25 04:37:38 +00001195
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001196(defvar x-initialized nil
1197 "Non-nil if the X window system has been initialized.")
1198
aa360da1
GM
Glenn Morris2008-06-12 03:56:20 +00001199(declare-function x-open-connection "xfns.c"
1200 (display &optional xrm-string must-succeed))
1201(declare-function x-server-max-request-size "xfns.c" (&optional terminal))
1202(declare-function x-get-resource "frame.c"
1203 (attribute class &optional component subclass))
f2d9c15f
GM
Glenn Morris2008-08-11 01:23:07 +00001204(declare-function x-parse-geometry "frame.c" (string))
1205(defvar x-resource-name)
1206(defvar x-display-name)
1207(defvar x-command-line-resources)
aa360da1 Glenn Morris2008-06-12 03:56:20 +00001208
ebb19708 Dmitry Antipov2013-04-06 18:06:39 +04001209(defun x-initialize-window-system (&optional display)
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001210 "Initialize Emacs for X frames and open the first connection to an X server."
efc3dd3c
DC
Daniel Colascione2012-09-17 03:55:05 -08001211 (cl-assert (not x-initialized))
1212
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001213 ;; Make sure we have a valid resource name.
1214 (or (stringp x-resource-name)
1215 (let (i)
1216 (setq x-resource-name (invocation-name))
1217
1218 ;; Change any . or * characters in x-resource-name to hyphens,
1219 ;; so as not to choke when we use it in X resource queries.
1220 (while (setq i (string-match "[.*]" x-resource-name))
1221 (aset x-resource-name i ?-))))
1222
ebb19708 Dmitry Antipov2013-04-06 18:06:39 +04001223 (x-open-connection (or display
36ab8612 Miles Bader2007-05-16 07:12:33 +00001224 (setq x-display-name (or (getenv "DISPLAY" (selected-frame))
f105f403 Karoly Lorentey2005-12-26 02:14:10 +00001225 (getenv "DISPLAY"))))
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001226 x-command-line-resources
1227 ;; Exit Emacs with fatal error if this fails and we
1228 ;; are the initial display.
1229 (eq initial-window-system 'x))
1230
2d4e20ec
KH
Kenichi Handa2009-03-19 00:56:52 +00001231 ;; Create the default fontset.
1232 (create-default-fontset)
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001233
1234 ;; Create the standard fontset.
2d4e20ec
KH
Kenichi Handa2009-03-19 00:56:52 +00001235 (condition-case err
1236 (create-fontset-from-fontset-spec standard-fontset-spec t)
db9e401b Juanma Barranquero2010-01-18 05:39:40 +01001237 (error (display-warning
2d4e20ec
KH
Kenichi Handa2009-03-19 00:56:52 +00001238 'initialization
1239 (format "Creation of the standard fontset failed: %s" err)
1240 :error)))
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001241
1242 ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
1243 (create-fontset-from-x-resource)
1244
65e86587
KL
Karoly Lorentey2007-01-01 17:38:32 +00001245 ;; Set scroll bar mode to right if set by X resources. Default is left.
1246 (if (equal (x-get-resource "verticalScrollBars" "ScrollBars") "right")
1247 (customize-set-variable 'scroll-bar-mode 'right))
1248
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001249 ;; Apply a geometry resource to the initial frame. Put it at the end
1250 ;; of the alist, so that anything specified on the command line takes
1251 ;; precedence.
1252 (let* ((res-geometry (x-get-resource "geometry" "Geometry"))
1253 parsed)
1254 (if res-geometry
1255 (progn
1256 (setq parsed (x-parse-geometry res-geometry))
1257 ;; If the resource specifies a position,
1258 ;; call the position and size "user-specified".
1259 (if (or (assq 'top parsed) (assq 'left parsed))
1260 (setq parsed (cons '(user-position . t)
1261 (cons '(user-size . t) parsed))))
1262 ;; All geometry parms apply to the initial frame.
1263 (setq initial-frame-alist (append initial-frame-alist parsed))
f6959eb4 Juanma Barranquero2007-10-09 08:09:15 +00001264 ;; The size parms apply to all frames. Don't set it if there are
14bcc1e0
KL
Karoly Lorentey2006-12-03 12:15:03 +00001265 ;; sizes there already (from command line).
1266 (if (and (assq 'height parsed)
1267 (not (assq 'height default-frame-alist)))
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001268 (setq default-frame-alist
1269 (cons (cons 'height (cdr (assq 'height parsed)))
1270 default-frame-alist)))
14bcc1e0
KL
Karoly Lorentey2006-12-03 12:15:03 +00001271 (if (and (assq 'width parsed)
1272 (not (assq 'width default-frame-alist)))
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001273 (setq default-frame-alist
1274 (cons (cons 'width (cdr (assq 'width parsed)))
1275 default-frame-alist))))))
1276
1277 ;; Check the reverseVideo resource.
1278 (let ((case-fold-search t))
1279 (let ((rv (x-get-resource "reverseVideo" "ReverseVideo")))
1280 (if (and rv
1281 (string-match "^\\(true\\|yes\\|on\\)$" rv))
1282 (setq default-frame-alist
1283 (cons '(reverse . t) default-frame-alist)))))
63c86e17 Jim Blandy1991-05-17 00:15:22 +00001284
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001285 ;; Set x-selection-timeout, measured in milliseconds.
3c9dfce6
CY
Chong Yidong2012-02-25 11:01:11 +08001286 (let ((res-selection-timeout (x-get-resource "selectionTimeout"
1287 "SelectionTimeout")))
1288 (setq x-selection-timeout
1289 (if res-selection-timeout
1290 (string-to-number res-selection-timeout)
1291 5000)))
5cdb3f1e Eric S. Raymond1993-03-12 19:53:22 +00001292
0b0d3e0b Karoly Lorentey2004-02-28 01:23:39 +00001293 ;; Don't let Emacs suspend under X.
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001294 (add-hook 'suspend-hook 'x-win-suspend-error)
53631723 Richard M. Stallman1995-04-08 02:51:37 +00001295
b04f3e61
CY
Chong Yidong2008-11-03 17:57:33 +00001296 ;; During initialization, we defer sending size hints to the window
1297 ;; manager, because that can induce a race condition:
1298 ;; http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html
1299 ;; Send the size hints once initialization is done.
1300 (add-hook 'after-init-hook 'x-wm-set-size-hint)
1301
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001302 ;; Turn off window-splitting optimization; X is usually fast enough
1303 ;; that this is only annoying.
1304 (setq split-window-keep-point t)
c3ef5084 Stefan Monnier2003-05-24 16:13:06 +00001305
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001306 ;; Motif direct handling of f10 wasn't working right,
1307 ;; So temporarily we've turned it off in lwlib-Xm.c
1308 ;; and turned the Emacs f10 back on.
1309 ;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
1310 ;; (if (featurep 'motif)
1311 ;; (global-set-key [f10] 'ignore))
9541a441 Richard M. Stallman1996-04-21 05:54:18 +00001312
2a36494c
KL
Karoly Lorentey2004-01-22 15:37:19 +00001313 ;; Enable CLIPBOARD copy/paste through menu bar commands.
1314 (menu-bar-enable-clipboard)
6b61353c Kenichi Handa2004-04-16 12:51:06 +00001315
f9d71b42
CY
Chong Yidong2010-07-14 14:03:39 -04001316 ;; ;; Override Paste so it looks at CLIPBOARD first.
1317 ;; (define-key menu-bar-edit-menu [paste]
1318 ;; (append '(menu-item "Paste" x-clipboard-yank
1319 ;; :enable (not buffer-read-only)
1320 ;; :help "Paste (yank) text most recently cut/copied")
1321 ;; nil))
6b61353c Kenichi Handa2004-04-16 12:51:06 +00001322
15cd8efd Chong Yidong2012-04-27 13:40:46 +08001323 (x-apply-session-resources)
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001324 (setq x-initialized t))
c3ef5084 Stefan Monnier2003-05-24 16:13:06 +00001325
3c5cc185
GM
Glenn Morris2015-05-10 23:34:45 -07001326(declare-function x-own-selection-internal "xselect.c"
1327 (selection value &optional frame))
1328(declare-function x-disown-selection-internal "xselect.c"
1329 (selection &optional time-object terminal))
1330(declare-function x-selection-owner-p "xselect.c"
1331 (&optional selection terminal))
1332(declare-function x-selection-exists-p "xselect.c"
1333 (&optional selection terminal))
1334(declare-function x-get-selection-internal "xselect.c"
1335 (selection-symbol target-type &optional time-stamp terminal))
1336
efc3dd3c Daniel Colascione2012-09-17 03:55:05 -08001337(add-to-list 'display-format-alist '("\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" . x))
a8b36b95
SM
Stefan Monnier2014-10-01 18:13:11 -04001338(gui-method-define handle-args-function x #'x-handle-args)
1339(gui-method-define frame-creation-function x #'x-create-frame-with-faces)
1340(gui-method-define window-system-initialization x #'x-initialize-window-system)
1341
a046b8dd
SM
Stefan Monnier2014-10-21 11:27:18 -04001342(gui-method-define gui-set-selection x
1343 (lambda (selection value)
1344 (if value (x-own-selection-internal selection value)
1345 (x-disown-selection-internal selection))))
31300bee Stefan Monnier2014-10-01 23:19:32 -04001346(gui-method-define gui-selection-owner-p x #'x-selection-owner-p)
a27cd28f Stefan Monnier2014-10-09 23:28:24 -04001347(gui-method-define gui-selection-exists-p x #'x-selection-exists-p)
31300bee Stefan Monnier2014-10-01 23:19:32 -04001348(gui-method-define gui-get-selection x #'x-get-selection-internal)
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +00001349
1350;; Initiate drag and drop
1351(add-hook 'after-make-frame-functions 'x-dnd-init-frame)
c0acb3ee Richard M. Stallman2006-08-16 05:09:18 +00001352(define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event)
6b61353c Kenichi Handa2004-04-16 12:51:06 +00001353
dd314751 Jan Djärv2007-08-28 10:16:00 +00001354(defcustom x-gtk-stock-map
e8e4d5c8
SS
Sam Steingold2011-02-01 16:37:12 -05001355 (mapcar (lambda (arg)
1356 (cons (purecopy (car arg)) (purecopy (cdr arg))))
dd314751 Jan Djärv2007-08-28 10:16:00 +00001357 '(
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001358 ("etc/images/new" . ("document-new" "gtk-new"))
1359 ("etc/images/open" . ("document-open" "gtk-open"))
5db55b9e Jan Djärv2007-09-02 16:51:22 +00001360 ("etc/images/diropen" . "n:system-file-manager")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001361 ("etc/images/close" . ("window-close" "gtk-close"))
1362 ("etc/images/save" . ("document-save" "gtk-save"))
1363 ("etc/images/saveas" . ("document-save-as" "gtk-save-as"))
1364 ("etc/images/undo" . ("edit-undo" "gtk-undo"))
1365 ("etc/images/cut" . ("edit-cut" "gtk-cut"))
1366 ("etc/images/copy" . ("edit-copy" "gtk-copy"))
1367 ("etc/images/paste" . ("edit-paste" "gtk-paste"))
1368 ("etc/images/search" . ("edit-find" "gtk-find"))
1369 ("etc/images/print" . ("document-print" "gtk-print"))
1370 ("etc/images/preferences" . ("preferences-system" "gtk-preferences"))
1371 ("etc/images/help" . ("help-browser" "gtk-help"))
1372 ("etc/images/left-arrow" . ("go-previous" "gtk-go-back"))
1373 ("etc/images/right-arrow" . ("go-next" "gtk-go-forward"))
1374 ("etc/images/home" . ("go-home" "gtk-home"))
1375 ("etc/images/jump-to" . ("go-jump" "gtk-jump-to"))
5cb94d12 Jan Djärv2007-08-31 10:13:35 +00001376 ("etc/images/index" . "gtk-index")
3f4c6d52 Jan Djärv2014-10-18 18:19:53 +02001377 ("etc/images/exit" . ("application-exit" "gtk-quit"))
c96a0d64 Jan Djärv2008-02-25 10:50:20 +00001378 ("etc/images/cancel" . "gtk-cancel")
3f4c6d52 Jan Djärv2014-10-18 18:19:53 +02001379 ("etc/images/info" . ("dialog-information" "gtk-info"))
bdc398a9 Jan Djärv2008-03-06 10:59:27 +00001380 ("etc/images/bookmark_add" . "n:bookmark_add")
2e55c986 Reiner Steib2007-09-30 11:25:08 +00001381 ;; Used in Gnus and/or MH-E:
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001382 ("etc/images/attach" . "gtk-attach")
1383 ("etc/images/connect" . "gtk-connect")
1384 ("etc/images/contact" . "gtk-contact")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001385 ("etc/images/delete" . ("edit-delete" "gtk-delete"))
1386 ("etc/images/describe" . ("ocument-properties" "gtk-properties"))
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001387 ("etc/images/disconnect" . "gtk-disconnect")
1388 ;; ("etc/images/exit" . "gtk-exit")
1389 ("etc/images/lock-broken" . "gtk-lock_broken")
1390 ("etc/images/lock-ok" . "gtk-lock_ok")
1391 ("etc/images/lock" . "gtk-lock")
1392 ("etc/images/next-page" . "gtk-next-page")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001393 ("etc/images/refresh" . ("view-refresh" "gtk-refresh"))
1394 ("etc/images/sort-ascending" . ("view-sort-ascending" "gtk-sort-ascending"))
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001395 ("etc/images/sort-column-ascending" . "gtk-sort-column-ascending")
1396 ("etc/images/sort-criteria" . "gtk-sort-criteria")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001397 ("etc/images/sort-descending" . ("view-sort-descending"
1398 "gtk-sort-descending"))
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001399 ("etc/images/sort-row-ascending" . "gtk-sort-row-ascending")
1400 ("images/gnus/toggle-subscription" . "gtk-task-recurring")
1401 ("images/mail/compose" . "gtk-mail-compose")
1402 ("images/mail/copy" . "gtk-mail-copy")
1403 ("images/mail/forward" . "gtk-mail-forward")
1404 ("images/mail/inbox" . "gtk-inbox")
1405 ("images/mail/move" . "gtk-mail-move")
1406 ("images/mail/not-spam" . "gtk-not-spam")
1407 ("images/mail/outbox" . "gtk-outbox")
1408 ("images/mail/reply-all" . "gtk-mail-reply-to-all")
1409 ("images/mail/reply" . "gtk-mail-reply")
1410 ("images/mail/save-draft" . "gtk-mail-handling")
1411 ("images/mail/send" . "gtk-mail-send")
1412 ("images/mail/spam" . "gtk-spam")
7ee6c59b
NR
Nick Roberts2009-12-31 02:19:53 +13001413 ;; Used for GDB Graphical Interface
1414 ("images/gud/break" . "gtk-no")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001415 ("images/gud/recstart" . ("media-record" "gtk-media-record"))
1416 ("images/gud/recstop" . ("media-playback-stop" "gtk-media-stop"))
2e55c986 Reiner Steib2007-09-30 11:25:08 +00001417 ;; No themed versions available:
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001418 ;; mail/preview (combining stock_mail and stock_zoom)
1419 ;; mail/save (combining stock_mail, stock_save and stock_convert)
6bdad9ae Dan Nicolaescu2009-11-11 05:49:09 +00001420 ))
dd314751 Jan Djärv2007-08-28 10:16:00 +00001421 "How icons for tool bars are mapped to Gtk+ stock items.
5db55b9e
JD
Jan Djärv2007-09-02 16:51:22 +00001422Emacs must be compiled with the Gtk+ toolkit for this to have any effect.
1423A value that begins with n: denotes a named icon instead of a stock icon."
7fbe8079 Jan Djärv2007-09-29 16:23:59 +00001424 :version "22.2"
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001425 :type '(choice (repeat
1426 (choice symbol
1427 (cons (string :tag "Emacs icon")
1428 (choice (group (string :tag "Named")
1429 (string :tag "Stock"))
1430 (string :tag "Stock/named"))))))
dd314751
JD
Jan Djärv2007-08-28 10:16:00 +00001431 :group 'x)
1432
2e55c986 Reiner Steib2007-09-30 11:25:08 +00001433(defcustom icon-map-list '(x-gtk-stock-map)
db9e401b Juanma Barranquero2010-01-18 05:39:40 +01001434 "A list of alists that map icon file names to stock/named icons.
5db55b9e
JD
Jan Djärv2007-09-02 16:51:22 +00001435The alists are searched in the order they appear. The first match is used.
1436The keys in the alists are file names without extension and with two directory
1437components. For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm
1438to stock item gtk-open, use:
1439
1440 (\"etc/images/open\" . \"gtk-open\")
1441
1442Themes also have named icons. To map to one of those, use n: before the name:
1443
1444 (\"etc/images/diropen\" . \"n:system-file-manager\")
1445
2e55c986
RS
Reiner Steib2007-09-30 11:25:08 +00001446The list elements are either the symbol name for the alist or the
1447alist itself.
1448
1449If you don't want stock icons, set the variable to nil."
1450 :version "22.2"
1451 :type '(choice (const :tag "Don't use stock icons" nil)
1452 (repeat (choice symbol
1453 (cons (string :tag "Emacs icon")
1454 (string :tag "Stock/named")))))
1455 :group 'x)
5db55b9e Jan Djärv2007-09-02 16:51:22 +00001456
2543eb39
CY
Chong Yidong2008-11-29 06:52:31 +00001457(defconst x-gtk-stock-cache (make-hash-table :weakness t :test 'equal))
1458
dd314751 Jan Djärv2007-08-28 10:16:00 +00001459(defun x-gtk-map-stock (file)
2543eb39
CY
Chong Yidong2008-11-29 06:52:31 +00001460 "Map icon with file name FILE to a Gtk+ stock name.
1461This uses `icon-map-list' to map icon file names to stock icon names."
1462 (when (stringp file)
1463 (or (gethash file x-gtk-stock-cache)
1464 (puthash
1465 file
1466 (save-match-data
1467 (let* ((file-sans (file-name-sans-extension file))
1468 (key (and (string-match "/\\([^/]+/[^/]+/[^/]+$\\)"
1469 file-sans)
1470 (match-string 1 file-sans)))
1471 (icon-map icon-map-list)
1472 elem value)
1473 (while (and (null value) icon-map)
1474 (setq elem (car icon-map)
1475 value (assoc-string (or key file-sans)
1476 (if (symbolp elem)
1477 (symbol-value elem)
1478 elem))
1479 icon-map (cdr icon-map)))
1480 (and value (cdr value))))
1481 x-gtk-stock-cache))))
dd314751 Jan Djärv2007-08-28 10:16:00 +00001482
9e0bf19a
DC
Daniel Colascione2013-12-30 15:27:07 -08001483(global-set-key [XF86WakeUp] 'ignore)
1484
7c1bfecc Dan Nicolaescu2007-08-31 15:39:18 +00001485(provide 'x-win)
e380957e Jan Djärv2006-05-29 07:16:54 +00001486
5cdb3f1e Eric S. Raymond1993-03-12 19:53:22 +00001487;;; x-win.el ends here