Minor documentation and NEWS tweak
[emacs.git] / lisp / term / x-win.el
Commit [+]AuthorDateLineData
3a91d153 Paul Eggert2015-08-16 08:34:44 -07001;;; x-win.el --- parse relevant switches and set up for X -*-coding: utf-8; 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
919281dd Stefan Monnier2015-05-23 11:32:29 -040032;; `handle-args-function' and `window-system-initialization' for more details.
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +000033
34;; startup.el will then examine startup files, and eventually call the hooks
cf07d2bd Dave Love2002-10-30 19:26:23 +000035;; which create the first window(s).
5cdb3f1e
ER
Eric S. Raymond1993-03-12 19:53:22 +000036
37;;; Code:
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +000038\f
39;; These are the standard X switches from the Xt Initialize.c file of
40;; Release 4.
41
42;; Command line Resource Manager string
43
44;; +rv *reverseVideo
45;; +synchronous *synchronous
46;; -background *background
47;; -bd *borderColor
48;; -bg *background
49;; -bordercolor *borderColor
50;; -borderwidth .borderWidth
51;; -bw .borderWidth
52;; -display .display
53;; -fg *foreground
54;; -fn *font
55;; -font *font
56;; -foreground *foreground
57;; -geometry .geometry
58;; -iconic .iconic
59;; -name .name
60;; -reverse *reverseVideo
61;; -rv *reverseVideo
62;; -selectionTimeout .selectionTimeout
63;; -synchronous *synchronous
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +000064;; -xrm
65
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +000066;; An alist of X options and the function which handles them. See
67;; ../startup.el.
68
efc3dd3c
DC
Daniel Colascione2012-09-17 03:55:05 -080069(eval-when-compile (require 'cl-lib))
70
2246281f Karoly Lorentey2004-01-11 21:59:40 +000071(if (not (fboundp 'x-create-frame))
800642d2 Jim Blandy1993-07-18 06:21:42 +000072 (error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
db95369b Juanma Barranquero2003-02-04 13:30:45 +000073
36c6d20b Glenn Morris2015-05-08 20:24:37 -040074(require 'term/common-win)
0cc89026 Jim Blandy1992-07-15 03:24:58 +000075(require 'frame)
3eb43f71 Jim Blandy1991-12-20 08:26:25 +000076(require 'mouse)
b16795eb Jim Blandy1993-03-02 02:03:41 +000077(require 'scroll-bar)
ffe1dd7a
JB
Jim Blandy1993-05-09 23:54:12 +000078(require 'faces)
79(require 'select)
290cb602 Richard M. Stallman1993-05-15 21:19:18 +000080(require 'menu-bar)
6acdd93e Kenichi Handa2003-01-17 08:14:14 +000081(require 'fontset)
6b61353c Kenichi Handa2004-04-16 12:51:06 +000082(require 'x-dnd)
63c86e17 Jim Blandy1991-05-17 00:15:22 +000083
19b08de9 Richard M. Stallman1993-06-01 00:29:11 +000084(defvar x-invocation-args)
cc5e32c5
JB
Juanma Barranquero2005-08-31 09:54:53 +000085(defvar x-keysym-table)
86(defvar x-selection-timeout)
87(defvar x-session-id)
88(defvar x-session-previous-id)
19b08de9 Richard M. Stallman1993-06-01 00:29:11 +000089
9d3aa82c Juanma Barranquero2013-08-09 01:59:14 +020090(defun x-handle-no-bitmap-icon (_switch)
0389072b
JD
Jan Djärv2007-07-22 12:13:34 +000091 (setq default-frame-alist (cons '(icon-type) default-frame-alist)))
92
350c1745
JD
Jan Djärv2008-02-07 14:07:00 +000093;; Handle the --parent-id option.
94(defun x-handle-parent-id (switch)
95 (or (consp x-invocation-args)
9ce1d388 Paul Eggert2015-08-16 08:59:50 -070096 (error "%s: missing argument to ‘%s’ option" (invocation-name) switch))
f9c7b08c
GM
Glenn Morris2008-02-08 08:33:42 +000097 (setq initial-frame-alist (cons
98 (cons 'parent-id
99 (string-to-number (car x-invocation-args)))
100 initial-frame-alist)
101 x-invocation-args (cdr x-invocation-args)))
350c1745 Jan Djärv2008-02-07 14:07:00 +0000102
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000103;; Handle the --smid switch. This is used by the session manager
104;; to give us back our session id we had on the previous run.
105(defun x-handle-smid (switch)
106 (or (consp x-invocation-args)
9ce1d388 Paul Eggert2015-08-16 08:59:50 -0700107 (error "%s: missing argument to ‘%s’ option" (invocation-name) switch))
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000108 (setq x-session-previous-id (car x-invocation-args)
109 x-invocation-args (cdr x-invocation-args)))
110
111(defvar emacs-save-session-functions nil
c3ef5084
SM
Stefan Monnier2003-05-24 16:13:06 +0000112 "Special hook run when a save-session event occurs.
113The functions do not get any argument.
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000114Functions can return non-nil to inform the session manager that the
115window system shutdown should be aborted.
116
117See also `emacs-session-save'.")
118
119(defun emacs-session-filename (session-id)
120 "Construct a filename to save the session in based on SESSION-ID.
1493c2af
JB
Juanma Barranquero2013-06-20 23:58:29 +0200121Return a filename in `user-emacs-directory', unless the session file
122already exists in the home directory."
123 (let ((basename (concat "session." session-id)))
124 (locate-user-emacs-file basename
125 (concat ".emacs-" basename))))
db95369b Juanma Barranquero2003-02-04 13:30:45 +0000126
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000127(defun emacs-session-save ()
128 "This function is called when the window system is shutting down.
c80e3b4a Paul Eggert2011-12-04 00:02:42 -0800129If this function returns non-nil, the window system shutdown is canceled.
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000130
131When a session manager tells Emacs that the window system is shutting
132down, this function is called. It calls the functions in the hook
133`emacs-save-session-functions'. Functions are called with the current
134buffer set to a temporary buffer. Functions should use `insert' to insert
db9e401b
JB
Juanma Barranquero2010-01-18 05:39:40 +0100135lisp code to save the session state. The buffer is saved in a file in the
136home directory of the user running Emacs. The file is evaluated when
137Emacs is restarted by the session manager.
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000138
139If any of the functions returns non-nil, no more functions are called
140and this function returns non-nil. This will inform the session manager
141that it should abort the window system shutdown."
142 (let ((filename (emacs-session-filename x-session-id))
143 (buf (get-buffer-create (concat " *SES " x-session-id))))
144 (when (file-exists-p filename)
145 (delete-file filename))
146 (with-current-buffer buf
147 (let ((cancel-shutdown (condition-case nil
3842fde1 Jan Djärv2002-03-12 21:15:07 +0000148 ;; A return of t means cancel the shutdown.
db95369b Juanma Barranquero2003-02-04 13:30:45 +0000149 (run-hook-with-args-until-success
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000150 'emacs-save-session-functions)
151 (error t))))
152 (unless cancel-shutdown
153 (write-file filename))
154 (kill-buffer buf)
155 cancel-shutdown))))
156
1e4f6cec Jan Djärv2002-03-12 19:15:06 +0000157(defun emacs-session-restore (previous-session-id)
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000158 "Restore the Emacs session if started by a session manager.
159The file saved by `emacs-session-save' is evaluated and deleted if it
160exists."
1e4f6cec Jan Djärv2002-03-12 19:15:06 +0000161 (let ((filename (emacs-session-filename previous-session-id)))
941a391a
JD
Jan Djärv2002-03-10 16:27:26 +0000162 (when (file-exists-p filename)
163 (load-file filename)
164 (delete-file filename)
165 (message "Restored session data"))))
166
db95369b
JB
Juanma Barranquero2003-02-04 13:30:45 +0000167
168
63f77899
JB
Jim Blandy1990-03-22 20:46:04 +0000169\f
170;;
171;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.
172;;
173
174(defconst x-pointer-X-cursor 0)
175(defconst x-pointer-arrow 2)
176(defconst x-pointer-based-arrow-down 4)
177(defconst x-pointer-based-arrow-up 6)
178(defconst x-pointer-boat 8)
179(defconst x-pointer-bogosity 10)
180(defconst x-pointer-bottom-left-corner 12)
181(defconst x-pointer-bottom-right-corner 14)
182(defconst x-pointer-bottom-side 16)
183(defconst x-pointer-bottom-tee 18)
184(defconst x-pointer-box-spiral 20)
185(defconst x-pointer-center-ptr 22)
186(defconst x-pointer-circle 24)
187(defconst x-pointer-clock 26)
188(defconst x-pointer-coffee-mug 28)
189(defconst x-pointer-cross 30)
190(defconst x-pointer-cross-reverse 32)
191(defconst x-pointer-crosshair 34)
192(defconst x-pointer-diamond-cross 36)
193(defconst x-pointer-dot 38)
194(defconst x-pointer-dotbox 40)
195(defconst x-pointer-double-arrow 42)
196(defconst x-pointer-draft-large 44)
197(defconst x-pointer-draft-small 46)
198(defconst x-pointer-draped-box 48)
199(defconst x-pointer-exchange 50)
200(defconst x-pointer-fleur 52)
201(defconst x-pointer-gobbler 54)
202(defconst x-pointer-gumby 56)
203(defconst x-pointer-hand1 58)
204(defconst x-pointer-hand2 60)
205(defconst x-pointer-heart 62)
206(defconst x-pointer-icon 64)
207(defconst x-pointer-iron-cross 66)
208(defconst x-pointer-left-ptr 68)
209(defconst x-pointer-left-side 70)
210(defconst x-pointer-left-tee 72)
211(defconst x-pointer-leftbutton 74)
212(defconst x-pointer-ll-angle 76)
213(defconst x-pointer-lr-angle 78)
214(defconst x-pointer-man 80)
215(defconst x-pointer-middlebutton 82)
216(defconst x-pointer-mouse 84)
217(defconst x-pointer-pencil 86)
218(defconst x-pointer-pirate 88)
219(defconst x-pointer-plus 90)
220(defconst x-pointer-question-arrow 92)
221(defconst x-pointer-right-ptr 94)
222(defconst x-pointer-right-side 96)
223(defconst x-pointer-right-tee 98)
224(defconst x-pointer-rightbutton 100)
225(defconst x-pointer-rtl-logo 102)
226(defconst x-pointer-sailboat 104)
227(defconst x-pointer-sb-down-arrow 106)
228(defconst x-pointer-sb-h-double-arrow 108)
229(defconst x-pointer-sb-left-arrow 110)
230(defconst x-pointer-sb-right-arrow 112)
231(defconst x-pointer-sb-up-arrow 114)
232(defconst x-pointer-sb-v-double-arrow 116)
233(defconst x-pointer-shuttle 118)
234(defconst x-pointer-sizing 120)
235(defconst x-pointer-spider 122)
236(defconst x-pointer-spraycan 124)
237(defconst x-pointer-star 126)
238(defconst x-pointer-target 128)
239(defconst x-pointer-tcross 130)
240(defconst x-pointer-top-left-arrow 132)
241(defconst x-pointer-top-left-corner 134)
242(defconst x-pointer-top-right-corner 136)
243(defconst x-pointer-top-side 138)
244(defconst x-pointer-top-tee 140)
245(defconst x-pointer-trek 142)
246(defconst x-pointer-ul-angle 144)
247(defconst x-pointer-umbrella 146)
248(defconst x-pointer-ur-angle 148)
249(defconst x-pointer-watch 150)
250(defconst x-pointer-xterm 152)
5cb94d12 Jan Djärv2007-08-31 10:13:35 +0000251(defconst x-pointer-invisible 255)
63f77899 Jim Blandy1990-03-22 20:46:04 +0000252
d5e4dda5 Dan Nicolaescu2008-07-20 00:37:45 +0000253\f
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000254;;;; Keysyms
255
9b4234ae Richard M. Stallman1995-05-15 23:19:13 +0000256(defun vendor-specific-keysyms (vendor)
089bc712 John Paul Wallington2003-03-10 13:30:22 +0000257 "Return the appropriate value of `system-key-alist' for VENDOR.
9b4234ae Richard M. Stallman1995-05-15 23:19:13 +0000258VENDOR is a string containing the name of the X Server's vendor,
089bc712 John Paul Wallington2003-03-10 13:30:22 +0000259as returned by `x-server-vendor'."
f3041af1 Dan Nicolaescu2008-01-06 00:56:56 +0000260 (cond ((or (string-equal vendor "Hewlett-Packard Incorporated")
3f18a142 Karl Heuer1995-05-24 04:59:27 +0000261 (string-equal vendor "Hewlett-Packard Company"))
9b4234ae
RS
Richard M. Stallman1995-05-15 23:19:13 +0000262 '(( 168 . mute-acute)
263 ( 169 . mute-grave)
264 ( 170 . mute-asciicircum)
265 ( 171 . mute-diaeresis)
266 ( 172 . mute-asciitilde)
267 ( 175 . lira)
268 ( 190 . guilder)
269 ( 252 . block)
270 ( 256 . longminus)
271 (65388 . reset)
272 (65389 . system)
273 (65390 . user)
274 (65391 . clearline)
275 (65392 . insertline)
276 (65393 . deleteline)
277 (65394 . insertchar)
278 (65395 . deletechar)
279 (65396 . backtab)
280 (65397 . kp-backtab)))
cf07d2bd Dave Love2002-10-30 19:26:23 +0000281 ;; Fixme: What about non-X11/NeWS sun server?
04486a2d
KH
Karl Heuer1995-06-02 01:03:43 +0000282 ((or (string-equal vendor "X11/NeWS - Sun Microsystems Inc.")
283 (string-equal vendor "X Consortium"))
51a8e1cc
KH
Karl Heuer1995-07-17 22:49:37 +0000284 '((392976 . f36)
285 (392977 . f37)
9b4234ae
RS
Richard M. Stallman1995-05-15 23:19:13 +0000286 (393056 . req)
287 ;; These are for Sun under X11R6
288 (393072 . props)
289 (393073 . front)
290 (393074 . copy)
291 (393075 . open)
292 (393076 . paste)
293 (393077 . cut)))
294 (t
295 ;; This is used by DEC's X server.
296 '((65280 . remove)))))
297
58fa26d4 Dave Love2002-10-28 14:46:01 +0000298;; Latin-1
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000299(let ((i 160))
300 (while (< i 256)
1d912b36 Dave Love2002-10-27 21:10:00 +0000301 (puthash i i x-keysym-table)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000302 (setq i (1+ i))))
303
304;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
305;; appendix to the X protocol definition.
306(dolist
307 (pair
308 '(
309 ;; Latin-2
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700310 (#x1a1 . ?Ą)
311 (#x1a2 . ?˘)
312 (#x1a3 . ?Ł)
313 (#x1a5 . ?Ľ)
314 (#x1a6 . ?Ś)
315 (#x1a9 . ?Š)
316 (#x1aa . ?Ş)
317 (#x1ab . ?Ť)
318 (#x1ac . ?Ź)
319 (#x1ae . ?Ž)
320 (#x1af . ?Ż)
321 (#x1b1 . ?ą)
322 (#x1b2 . ?˛)
323 (#x1b3 . ?ł)
324 (#x1b5 . ?ľ)
325 (#x1b6 . ?ś)
326 (#x1b7 . ?ˇ)
327 (#x1b9 . ?š)
328 (#x1ba . ?ş)
329 (#x1bb . ?ť)
330 (#x1bc . ?ź)
331 (#x1bd . ?˝)
332 (#x1be . ?ž)
333 (#x1bf . ?ż)
334 (#x1c0 . ?Ŕ)
335 (#x1c3 . ?Ă)
336 (#x1c5 . ?Ĺ)
337 (#x1c6 . ?Ć)
338 (#x1c8 . ?Č)
339 (#x1ca . ?Ę)
340 (#x1cc . ?Ě)
341 (#x1cf . ?Ď)
342 (#x1d0 . ?Đ)
343 (#x1d1 . ?Ń)
344 (#x1d2 . ?Ň)
345 (#x1d5 . ?Ő)
346 (#x1d8 . ?Ř)
347 (#x1d9 . ?Ů)
348 (#x1db . ?Ű)
349 (#x1de . ?Ţ)
350 (#x1e0 . ?ŕ)
351 (#x1e3 . ?ă)
352 (#x1e5 . ?ĺ)
353 (#x1e6 . ?ć)
354 (#x1e8 . ?č)
355 (#x1ea . ?ę)
356 (#x1ec . ?ě)
357 (#x1ef . ?ď)
358 (#x1f0 . ?đ)
359 (#x1f1 . ?ń)
360 (#x1f2 . ?ň)
361 (#x1f5 . ?ő)
362 (#x1f8 . ?ř)
363 (#x1f9 . ?ů)
364 (#x1fb . ?ű)
365 (#x1fe . ?ţ)
366 (#x1ff . ?˙)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000367 ;; Latin-3
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700368 (#x2a1 . ?Ħ)
369 (#x2a6 . ?Ĥ)
370 (#x2a9 . ?İ)
371 (#x2ab . ?Ğ)
372 (#x2ac . ?Ĵ)
373 (#x2b1 . ?ħ)
374 (#x2b6 . ?ĥ)
375 (#x2b9 . ?ı)
376 (#x2bb . ?ğ)
377 (#x2bc . ?ĵ)
378 (#x2c5 . ?Ċ)
379 (#x2c6 . ?Ĉ)
380 (#x2d5 . ?Ġ)
381 (#x2d8 . ?Ĝ)
382 (#x2dd . ?Ŭ)
383 (#x2de . ?Ŝ)
384 (#x2e5 . ?ċ)
385 (#x2e6 . ?ĉ)
386 (#x2f5 . ?ġ)
387 (#x2f8 . ?ĝ)
388 (#x2fd . ?ŭ)
389 (#x2fe . ?ŝ)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000390 ;; Latin-4
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700391 (#x3a2 . ?ĸ)
392 (#x3a3 . ?Ŗ)
393 (#x3a5 . ?Ĩ)
394 (#x3a6 . ?Ļ)
395 (#x3aa . ?Ē)
396 (#x3ab . ?Ģ)
397 (#x3ac . ?Ŧ)
398 (#x3b3 . ?ŗ)
399 (#x3b5 . ?ĩ)
400 (#x3b6 . ?ļ)
401 (#x3ba . ?ē)
402 (#x3bb . ?ģ)
403 (#x3bc . ?ŧ)
404 (#x3bd . ?Ŋ)
405 (#x3bf . ?ŋ)
406 (#x3c0 . ?Ā)
407 (#x3c7 . ?Į)
408 (#x3cc . ?Ė)
409 (#x3cf . ?Ī)
410 (#x3d1 . ?Ņ)
411 (#x3d2 . ?Ō)
412 (#x3d3 . ?Ķ)
413 (#x3d9 . ?Ų)
414 (#x3dd . ?Ũ)
415 (#x3de . ?Ū)
416 (#x3e0 . ?ā)
417 (#x3e7 . ?į)
418 (#x3ec . ?ė)
419 (#x3ef . ?ī)
420 (#x3f1 . ?ņ)
421 (#x3f2 . ?ō)
422 (#x3f3 . ?ķ)
423 (#x3f9 . ?ų)
424 (#x3fd . ?ũ)
425 (#x3fe . ?ū)
426 (#x47e . ?‾)
427 (#x4a1 . ?。)
428 (#x4a2 . ?\「)
429 (#x4a3 . ?\」)
430 (#x4a4 . ?、)
431 (#x4a5 . ?・)
432 (#x4a6 . ?ヲ)
433 (#x4a7 . ?ァ)
434 (#x4a8 . ?ィ)
435 (#x4a9 . ?ゥ)
436 (#x4aa . ?ェ)
437 (#x4ab . ?ォ)
438 (#x4ac . ?ャ)
439 (#x4ad . ?ュ)
440 (#x4ae . ?ョ)
441 (#x4af . ?ッ)
442 (#x4b0 . ?ー)
443 (#x4b1 . ?ア)
444 (#x4b2 . ?イ)
445 (#x4b3 . ?ウ)
446 (#x4b4 . ?エ)
447 (#x4b5 . ?オ)
448 (#x4b6 . ?カ)
449 (#x4b7 . ?キ)
450 (#x4b8 . ?ク)
451 (#x4b9 . ?ケ)
452 (#x4ba . ?コ)
453 (#x4bb . ?サ)
454 (#x4bc . ?シ)
455 (#x4bd . ?ス)
456 (#x4be . ?セ)
457 (#x4bf . ?ソ)
458 (#x4c0 . ?タ)
459 (#x4c1 . ?チ)
460 (#x4c2 . ?ツ)
461 (#x4c3 . ?テ)
462 (#x4c4 . ?ト)
463 (#x4c5 . ?ナ)
464 (#x4c6 . ?ニ)
465 (#x4c7 . ?ヌ)
466 (#x4c8 . ?ネ)
467 (#x4c9 . ?ノ)
468 (#x4ca . ?ハ)
469 (#x4cb . ?ヒ)
470 (#x4cc . ?フ)
471 (#x4cd . ?ヘ)
472 (#x4ce . ?ホ)
473 (#x4cf . ?マ)
474 (#x4d0 . ?ミ)
475 (#x4d1 . ?ム)
476 (#x4d2 . ?メ)
477 (#x4d3 . ?モ)
478 (#x4d4 . ?ヤ)
479 (#x4d5 . ?ユ)
480 (#x4d6 . ?ヨ)
481 (#x4d7 . ?ラ)
482 (#x4d8 . ?リ)
483 (#x4d9 . ?ル)
484 (#x4da . ?レ)
485 (#x4db . ?ロ)
486 (#x4dc . ?ワ)
487 (#x4dd . ?ン)
488 (#x4de . ?゛)
489 (#x4df . ?゜)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000490 ;; Arabic
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700491 (#x5ac . ?،)
492 (#x5bb . ?؛)
493 (#x5bf . ?؟)
494 (#x5c1 . ?ء)
495 (#x5c2 . ?آ)
496 (#x5c3 . ?أ)
497 (#x5c4 . ?ؤ)
498 (#x5c5 . ?إ)
499 (#x5c6 . ?ئ)
500 (#x5c7 . ?ا)
501 (#x5c8 . ?ب)
502 (#x5c9 . ?ة)
503 (#x5ca . ?ت)
504 (#x5cb . ?ث)
505 (#x5cc . ?ج)
506 (#x5cd . ?ح)
507 (#x5ce . ?خ)
508 (#x5cf . ?د)
509 (#x5d0 . ?ذ)
510 (#x5d1 . ?ر)
511 (#x5d2 . ?ز)
512 (#x5d3 . ?س)
513 (#x5d4 . ?ش)
514 (#x5d5 . ?ص)
515 (#x5d6 . ?ض)
516 (#x5d7 . ?ط)
517 (#x5d8 . ?ظ)
518 (#x5d9 . ?ع)
519 (#x5da . ?غ)
520 (#x5e0 . ?ـ)
521 (#x5e1 . ?ف)
522 (#x5e2 . ?ق)
523 (#x5e3 . ?ك)
524 (#x5e4 . ?ل)
525 (#x5e5 . ?م)
526 (#x5e6 . ?ن)
527 (#x5e7 . ?ه)
528 (#x5e8 . ?و)
529 (#x5e9 . ?ى)
530 (#x5ea . ?ي)
531 (#x5eb . ?ً)
532 (#x5ec . ?ٌ)
533 (#x5ed . ?ٍ)
534 (#x5ee . ?َ)
535 (#x5ef . ?ُ)
536 (#x5f0 . ?ِ)
537 (#x5f1 . ?ّ)
538 (#x5f2 . ?ْ)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000539 ;; Cyrillic
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700540 (#x680 . ?Ғ)
541 (#x681 . ?Җ)
542 (#x682 . ?Қ)
543 (#x683 . ?Ҝ)
544 (#x684 . ?Ң)
545 (#x685 . ?Ү)
546 (#x686 . ?Ұ)
547 (#x687 . ?Ҳ)
548 (#x688 . ?Ҷ)
549 (#x689 . ?Ҹ)
550 (#x68a . ?Һ)
551 (#x68c . ?Ә)
552 (#x68d . ?Ӣ)
553 (#x68e . ?Ө)
554 (#x68f . ?Ӯ)
555 (#x690 . ?ғ)
556 (#x691 . ?җ)
557 (#x692 . ?қ)
558 (#x693 . ?ҝ)
559 (#x694 . ?ң)
560 (#x695 . ?ү)
561 (#x696 . ?ұ)
562 (#x697 . ?ҳ)
563 (#x698 . ?ҷ)
564 (#x699 . ?ҹ)
565 (#x69a . ?һ)
566 (#x69c . ?ә)
567 (#x69d . ?ӣ)
568 (#x69e . ?ө)
569 (#x69f . ?ӯ)
570 (#x6a1 . ?ђ)
571 (#x6a2 . ?ѓ)
572 (#x6a3 . ?ё)
573 (#x6a4 . ?є)
574 (#x6a5 . ?ѕ)
575 (#x6a6 . ?і)
576 (#x6a7 . ?ї)
577 (#x6a8 . ?ј)
578 (#x6a9 . ?љ)
579 (#x6aa . ?њ)
580 (#x6ab . ?ћ)
581 (#x6ac . ?ќ)
582 (#x6ae . ?ў)
583 (#x6af . ?џ)
584 (#x6b0 . ?№)
585 (#x6b1 . ?Ђ)
586 (#x6b2 . ?Ѓ)
587 (#x6b3 . ?Ё)
588 (#x6b4 . ?Є)
589 (#x6b5 . ?Ѕ)
590 (#x6b6 . ?І)
591 (#x6b7 . ?Ї)
592 (#x6b8 . ?Ј)
593 (#x6b9 . ?Љ)
594 (#x6ba . ?Њ)
595 (#x6bb . ?Ћ)
596 (#x6bc . ?Ќ)
597 (#x6be . ?Ў)
598 (#x6bf . ?Џ)
599 (#x6c0 . ?ю)
600 (#x6c1 . ?а)
601 (#x6c2 . ?б)
602 (#x6c3 . ?ц)
603 (#x6c4 . ?д)
604 (#x6c5 . ?е)
605 (#x6c6 . ?ф)
606 (#x6c7 . ?г)
607 (#x6c8 . ?х)
608 (#x6c9 . ?и)
609 (#x6ca . ?й)
610 (#x6cb . ?к)
611 (#x6cc . ?л)
612 (#x6cd . ?м)
613 (#x6ce . ?н)
614 (#x6cf . ?о)
615 (#x6d0 . ?п)
616 (#x6d1 . ?я)
617 (#x6d2 . ?р)
618 (#x6d3 . ?с)
619 (#x6d4 . ?т)
620 (#x6d5 . ?у)
621 (#x6d6 . ?ж)
622 (#x6d7 . ?в)
623 (#x6d8 . ?ь)
624 (#x6d9 . ?ы)
625 (#x6da . ?з)
626 (#x6db . ?ш)
627 (#x6dc . ?э)
628 (#x6dd . ?щ)
629 (#x6de . ?ч)
630 (#x6df . ?ъ)
631 (#x6e0 . ?Ю)
632 (#x6e1 . ?А)
633 (#x6e2 . ?Б)
634 (#x6e3 . ?Ц)
635 (#x6e4 . ?Д)
636 (#x6e5 . ?Е)
637 (#x6e6 . ?Ф)
638 (#x6e7 . ?Г)
639 (#x6e8 . ?Х)
640 (#x6e9 . ?И)
641 (#x6ea . ?Й)
642 (#x6eb . ?К)
643 (#x6ec . ?Л)
644 (#x6ed . ?М)
645 (#x6ee . ?Н)
646 (#x6ef . ?О)
647 (#x6f0 . ?П)
648 (#x6f1 . ?Я)
649 (#x6f2 . ?Р)
650 (#x6f3 . ?С)
651 (#x6f4 . ?Т)
652 (#x6f5 . ?У)
653 (#x6f6 . ?Ж)
654 (#x6f7 . ?В)
655 (#x6f8 . ?Ь)
656 (#x6f9 . ?Ы)
657 (#x6fa . ?З)
658 (#x6fb . ?Ш)
659 (#x6fc . ?Э)
660 (#x6fd . ?Щ)
661 (#x6fe . ?Ч)
662 (#x6ff . ?Ъ)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000663 ;; Greek
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700664 (#x7a1 . ?Ά)
665 (#x7a2 . ?Έ)
666 (#x7a3 . ?Ή)
667 (#x7a4 . ?Ί)
668 (#x7a5 . ?Ϊ)
669 (#x7a7 . ?Ό)
670 (#x7a8 . ?Ύ)
671 (#x7a9 . ?Ϋ)
672 (#x7ab . ?Ώ)
673 (#x7ae . ?΅)
674 (#x7af . ?―)
675 (#x7b1 . ?ά)
676 (#x7b2 . ?έ)
677 (#x7b3 . ?ή)
678 (#x7b4 . ?ί)
679 (#x7b5 . ?ϊ)
680 (#x7b6 . ?ΐ)
681 (#x7b7 . ?ό)
682 (#x7b8 . ?ύ)
683 (#x7b9 . ?ϋ)
684 (#x7ba . ?ΰ)
685 (#x7bb . ?ώ)
686 (#x7c1 . ?Α)
687 (#x7c2 . ?Β)
688 (#x7c3 . ?Γ)
689 (#x7c4 . ?Δ)
690 (#x7c5 . ?Ε)
691 (#x7c6 . ?Ζ)
692 (#x7c7 . ?Η)
693 (#x7c8 . ?Θ)
694 (#x7c9 . ?Ι)
695 (#x7ca . ?Κ)
696 (#x7cb . ?Λ)
697 (#x7cc . ?Μ)
698 (#x7cd . ?Ν)
699 (#x7ce . ?Ξ)
700 (#x7cf . ?Ο)
701 (#x7d0 . ?Π)
702 (#x7d1 . ?Ρ)
703 (#x7d2 . ?Σ)
704 (#x7d4 . ?Τ)
705 (#x7d5 . ?Υ)
706 (#x7d6 . ?Φ)
707 (#x7d7 . ?Χ)
708 (#x7d8 . ?Ψ)
709 (#x7d9 . ?Ω)
710 (#x7e1 . ?α)
711 (#x7e2 . ?β)
712 (#x7e3 . ?γ)
713 (#x7e4 . ?δ)
714 (#x7e5 . ?ε)
715 (#x7e6 . ?ζ)
716 (#x7e7 . ?η)
717 (#x7e8 . ?θ)
718 (#x7e9 . ?ι)
719 (#x7ea . ?κ)
720 (#x7eb . ?λ)
721 (#x7ec . ?μ)
722 (#x7ed . ?ν)
723 (#x7ee . ?ξ)
724 (#x7ef . ?ο)
725 (#x7f0 . ?π)
726 (#x7f1 . ?ρ)
727 (#x7f2 . ?σ)
728 (#x7f3 . ?ς)
729 (#x7f4 . ?τ)
730 (#x7f5 . ?υ)
731 (#x7f6 . ?φ)
732 (#x7f7 . ?χ)
733 (#x7f8 . ?ψ)
734 (#x7f9 . ?ω)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000735 ;; Technical
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700736 (#x8a1 . ?⎷)
737 (#x8a2 . ?┌)
738 (#x8a3 . ?─)
739 (#x8a4 . ?⌠)
740 (#x8a5 . ?⌡)
741 (#x8a6 . ?│)
742 (#x8a7 . ?⎡)
743 (#x8a8 . ?⎣)
744 (#x8a9 . ?⎤)
745 (#x8aa . ?⎦)
746 (#x8ab . ?⎛)
747 (#x8ac . ?⎝)
748 (#x8ad . ?⎞)
749 (#x8ae . ?⎠)
750 (#x8af . ?⎨)
751 (#x8b0 . ?⎬)
752 (#x8bc . ?≤)
753 (#x8bd . ?≠)
754 (#x8be . ?≥)
755 (#x8bf . ?∫)
756 (#x8c0 . ?∴)
757 (#x8c1 . ?∝)
758 (#x8c2 . ?∞)
759 (#x8c5 . ?∇)
760 (#x8c8 . ?∼)
761 (#x8c9 . ?≃)
762 (#x8cd . ?⇔)
763 (#x8ce . ?⇒)
764 (#x8cf . ?≡)
765 (#x8d6 . ?√)
766 (#x8da . ?⊂)
767 (#x8db . ?⊃)
768 (#x8dc . ?∩)
769 (#x8dd . ?∪)
770 (#x8de . ?∧)
771 (#x8df . ?∨)
772 (#x8ef . ?∂)
773 (#x8f6 . ?ƒ)
774 (#x8fb . ?←)
775 (#x8fc . ?↑)
776 (#x8fd . ?→)
777 (#x8fe . ?↓)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000778 ;; Special
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700779 (#x9e0 . ?◆)
780 (#x9e1 . ?▒)
781 (#x9e2 . ?␉)
782 (#x9e3 . ?␌)
783 (#x9e4 . ?␍)
784 (#x9e5 . ?␊)
785 (#x9e8 . ?␤)
786 (#x9e9 . ?␋)
787 (#x9ea . ?┘)
788 (#x9eb . ?┐)
789 (#x9ec . ?┌)
790 (#x9ed . ?└)
791 (#x9ee . ?┼)
792 (#x9ef . ?⎺)
793 (#x9f0 . ?⎻)
794 (#x9f1 . ?─)
795 (#x9f2 . ?⎼)
796 (#x9f3 . ?⎽)
797 (#x9f4 . ?├)
798 (#x9f5 . ?┤)
799 (#x9f6 . ?┴)
800 (#x9f7 . ?┬)
801 (#x9f8 . ?│)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000802 ;; Publishing
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700803 (#xaa1 . ? )
804 (#xaa2 . ? )
805 (#xaa3 . ? )
806 (#xaa4 . ? )
807 (#xaa5 . ? )
808 (#xaa6 . ? )
809 (#xaa7 . ? )
810 (#xaa8 . ? )
811 (#xaa9 . ?—)
812 (#xaaa . ?–)
813 (#xaae . ?…)
814 (#xaaf . ?‥)
815 (#xab0 . ?⅓)
816 (#xab1 . ?⅔)
817 (#xab2 . ?⅕)
818 (#xab3 . ?⅖)
819 (#xab4 . ?⅗)
820 (#xab5 . ?⅘)
821 (#xab6 . ?⅙)
822 (#xab7 . ?⅚)
823 (#xab8 . ?℅)
824 (#xabb . ?‒)
825 (#xabc . ?〈)
826 (#xabe . ?〉)
827 (#xac3 . ?⅛)
828 (#xac4 . ?⅜)
829 (#xac5 . ?⅝)
830 (#xac6 . ?⅞)
831 (#xac9 . ?™)
832 (#xaca . ?☓)
833 (#xacc . ?◁)
834 (#xacd . ?▷)
835 (#xace . ?○)
836 (#xacf . ?▯)
837 (#xad0 . ?‘)
838 (#xad1 . ?’)
839 (#xad2 . ?“)
840 (#xad3 . ?”)
841 (#xad4 . ?℞)
842 (#xad6 . ?′)
843 (#xad7 . ?″)
844 (#xad9 . ?✝)
845 (#xadb . ?▬)
846 (#xadc . ?◀)
847 (#xadd . ?▶)
848 (#xade . ?●)
849 (#xadf . ?▮)
850 (#xae0 . ?◦)
851 (#xae1 . ?▫)
852 (#xae2 . ?▭)
853 (#xae3 . ?△)
854 (#xae4 . ?▽)
855 (#xae5 . ?☆)
856 (#xae6 . ?•)
857 (#xae7 . ?▪)
858 (#xae8 . ?▲)
859 (#xae9 . ?▼)
860 (#xaea . ?☜)
861 (#xaeb . ?☞)
862 (#xaec . ?♣)
863 (#xaed . ?♦)
864 (#xaee . ?♥)
865 (#xaf0 . ?✠)
866 (#xaf1 . ?†)
867 (#xaf2 . ?‡)
868 (#xaf3 . ?✓)
869 (#xaf4 . ?✗)
870 (#xaf5 . ?♯)
871 (#xaf6 . ?♭)
872 (#xaf7 . ?♂)
873 (#xaf8 . ?♀)
874 (#xaf9 . ?☎)
875 (#xafa . ?⌕)
876 (#xafb . ?℗)
877 (#xafc . ?‸)
878 (#xafd . ?‚)
879 (#xafe . ?„)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +0000880 ;; APL
881 (#xba3 . ?<)
882 (#xba6 . ?>)
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700883 (#xba8 . ?∨)
884 (#xba9 . ?∧)
885 (#xbc0 . ?¯)
886 (#xbc2 . ?⊥)
887 (#xbc3 . ?∩)
888 (#xbc4 . ?⌊)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000889 (#xbc6 . ?_)
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700890 (#xbca . ?∘)
891 (#xbcc . ?⎕)
892 (#xbce . ?⊤)
893 (#xbcf . ?○)
894 (#xbd3 . ?⌈)
895 (#xbd6 . ?∪)
896 (#xbd8 . ?⊃)
897 (#xbda . ?⊂)
898 (#xbdc . ?⊢)
899 (#xbfc . ?⊣)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000900 ;; Hebrew
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700901 (#xcdf . ?‗)
902 (#xce0 . ?א)
903 (#xce1 . ?ב)
904 (#xce2 . ?ג)
905 (#xce3 . ?ד)
906 (#xce4 . ?ה)
907 (#xce5 . ?ו)
908 (#xce6 . ?ז)
909 (#xce7 . ?ח)
910 (#xce8 . ?ט)
911 (#xce9 . ?י)
912 (#xcea . ?ך)
913 (#xceb . ?כ)
914 (#xcec . ?ל)
915 (#xced . ?ם)
916 (#xcee . ?מ)
917 (#xcef . ?ן)
918 (#xcf0 . ?נ)
919 (#xcf1 . ?ס)
920 (#xcf2 . ?ע)
921 (#xcf3 . ?ף)
922 (#xcf4 . ?פ)
923 (#xcf5 . ?ץ)
924 (#xcf6 . ?צ)
925 (#xcf7 . ?ק)
926 (#xcf8 . ?ר)
927 (#xcf9 . ?ש)
928 (#xcfa . ?ת)
cf07d2bd Dave Love2002-10-30 19:26:23 +0000929 ;; Thai
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -0700930 (#xda1 . ?ก)
931 (#xda2 . ?ข)
932 (#xda3 . ?ฃ)
933 (#xda4 . ?ค)
934 (#xda5 . ?ฅ)
935 (#xda6 . ?ฆ)
936 (#xda7 . ?ง)
937 (#xda8 . ?จ)
938 (#xda9 . ?ฉ)
939 (#xdaa . ?ช)
940 (#xdab . ?ซ)
941 (#xdac . ?ฌ)
942 (#xdad . ?ญ)
943 (#xdae . ?ฎ)
944 (#xdaf . ?ฏ)
945 (#xdb0 . ?ฐ)
946 (#xdb1 . ?ฑ)
947 (#xdb2 . ?ฒ)
948 (#xdb3 . ?ณ)
949 (#xdb4 . ?ด)
950 (#xdb5 . ?ต)
951 (#xdb6 . ?ถ)
952 (#xdb7 . ?ท)
953 (#xdb8 . ?ธ)
954 (#xdb9 . ?น)
955 (#xdba . ?บ)
956 (#xdbb . ?ป)
957 (#xdbc . ?ผ)
958 (#xdbd . ?ฝ)
959 (#xdbe . ?พ)
960 (#xdbf . ?ฟ)
961 (#xdc0 . ?ภ)
962 (#xdc1 . ?ม)
963 (#xdc2 . ?ย)
964 (#xdc3 . ?ร)
965 (#xdc4 . ?ฤ)
966 (#xdc5 . ?ล)
967 (#xdc6 . ?ฦ)
968 (#xdc7 . ?ว)
969 (#xdc8 . ?ศ)
970 (#xdc9 . ?ษ)
971 (#xdca . ?ส)
972 (#xdcb . ?ห)
973 (#xdcc . ?ฬ)
974 (#xdcd . ?อ)
975 (#xdce . ?ฮ)
976 (#xdcf . ?ฯ)
977 (#xdd0 . ?ะ)
978 (#xdd1 . ?ั)
979 (#xdd2 . ?า)
980 (#xdd3 . ?ำ)
981 (#xdd4 . ?ิ)
982 (#xdd5 . ?ี)
983 (#xdd6 . ?ึ)
984 (#xdd7 . ?ื)
985 (#xdd8 . ?ุ)
986 (#xdd9 . ?ู)
987 (#xdda . ?ฺ)
988 (#xddf . ?฿)
989 (#xde0 . ?เ)
990 (#xde1 . ?แ)
991 (#xde2 . ?โ)
992 (#xde3 . ?ใ)
993 (#xde4 . ?ไ)
994 (#xde5 . ?ๅ)
995 (#xde6 . ?ๆ)
996 (#xde7 . ?็)
997 (#xde8 . ?่)
998 (#xde9 . ?้)
999 (#xdea . ?๊)
1000 (#xdeb . ?๋)
1001 (#xdec . ?์)
1002 (#xded . ?ํ)
1003 (#xdf0 . ?๐)
1004 (#xdf1 . ?๑)
1005 (#xdf2 . ?๒)
1006 (#xdf3 . ?๓)
1007 (#xdf4 . ?๔)
1008 (#xdf5 . ?๕)
1009 (#xdf6 . ?๖)
1010 (#xdf7 . ?๗)
1011 (#xdf8 . ?๘)
1012 (#xdf9 . ?๙)
cf07d2bd Dave Love2002-10-30 19:26:23 +00001013 ;; Korean
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -07001014 (#xea1 . ?ㄱ)
1015 (#xea2 . ?ㄲ)
1016 (#xea3 . ?ㄳ)
1017 (#xea4 . ?ㄴ)
1018 (#xea5 . ?ㄵ)
1019 (#xea6 . ?ㄶ)
1020 (#xea7 . ?ㄷ)
1021 (#xea8 . ?ㄸ)
1022 (#xea9 . ?ㄹ)
1023 (#xeaa . ?ㄺ)
1024 (#xeab . ?ㄻ)
1025 (#xeac . ?ㄼ)
1026 (#xead . ?ㄽ)
1027 (#xeae . ?ㄾ)
1028 (#xeaf . ?ㄿ)
1029 (#xeb0 . ?ㅀ)
1030 (#xeb1 . ?ㅁ)
1031 (#xeb2 . ?ㅂ)
1032 (#xeb3 . ?ㅃ)
1033 (#xeb4 . ?ㅄ)
1034 (#xeb5 . ?ㅅ)
1035 (#xeb6 . ?ㅆ)
1036 (#xeb7 . ?ㅇ)
1037 (#xeb8 . ?ㅈ)
1038 (#xeb9 . ?ㅉ)
1039 (#xeba . ?ㅊ)
1040 (#xebb . ?ㅋ)
1041 (#xebc . ?ㅌ)
1042 (#xebd . ?ㅍ)
1043 (#xebe . ?ㅎ)
1044 (#xebf . ?ㅏ)
1045 (#xec0 . ?ㅐ)
1046 (#xec1 . ?ㅑ)
1047 (#xec2 . ?ㅒ)
1048 (#xec3 . ?ㅓ)
1049 (#xec4 . ?ㅔ)
1050 (#xec5 . ?ㅕ)
1051 (#xec6 . ?ㅖ)
1052 (#xec7 . ?ㅗ)
1053 (#xec8 . ?ㅘ)
1054 (#xec9 . ?ㅙ)
1055 (#xeca . ?ㅚ)
1056 (#xecb . ?ㅛ)
1057 (#xecc . ?ㅜ)
1058 (#xecd . ?ㅝ)
1059 (#xece . ?ㅞ)
1060 (#xecf . ?ㅟ)
1061 (#xed0 . ?ㅠ)
1062 (#xed1 . ?ㅡ)
1063 (#xed2 . ?ㅢ)
1064 (#xed3 . ?ㅣ)
1065 (#xed4 . ?ᆨ)
1066 (#xed5 . ?ᆩ)
1067 (#xed6 . ?ᆪ)
1068 (#xed7 . ?ᆫ)
1069 (#xed8 . ?ᆬ)
1070 (#xed9 . ?ᆭ)
1071 (#xeda . ?ᆮ)
1072 (#xedb . ?ᆯ)
1073 (#xedc . ?ᆰ)
1074 (#xedd . ?ᆱ)
1075 (#xede . ?ᆲ)
1076 (#xedf . ?ᆳ)
1077 (#xee0 . ?ᆴ)
1078 (#xee1 . ?ᆵ)
1079 (#xee2 . ?ᆶ)
1080 (#xee3 . ?ᆷ)
1081 (#xee4 . ?ᆸ)
1082 (#xee5 . ?ᆹ)
1083 (#xee6 . ?ᆺ)
1084 (#xee7 . ?ᆻ)
1085 (#xee8 . ?ᆼ)
1086 (#xee9 . ?ᆽ)
1087 (#xeea . ?ᆾ)
1088 (#xeeb . ?ᆿ)
1089 (#xeec . ?ᇀ)
1090 (#xeed . ?ᇁ)
1091 (#xeee . ?ᇂ)
1092 (#xeef . ?ㅭ)
1093 (#xef0 . ?ㅱ)
1094 (#xef1 . ?ㅸ)
1095 (#xef2 . ?ㅿ)
1096 (#xef3 . ?ㆁ)
1097 (#xef4 . ?ㆄ)
1098 (#xef5 . ?ㆆ)
1099 (#xef6 . ?ㆍ)
1100 (#xef7 . ?ㆎ)
1101 (#xef8 . ?ᇫ)
1102 (#xef9 . ?ᇰ)
1103 (#xefa . ?ᇹ)
1104 (#xeff . ?₩)
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +00001105 ;; Latin-5
1106 ;; Latin-6
1107 ;; Latin-7
1108 ;; Latin-8
1109 ;; Latin-9
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -07001110 (#x13bc . ?Œ)
1111 (#x13bd . ?œ)
1112 (#x13be . ?Ÿ)
cf07d2bd Dave Love2002-10-30 19:26:23 +00001113 ;; Currency
3a91d153
PE
Paul Eggert2015-08-16 08:34:44 -07001114 (#x20a0 . ?₠)
1115 (#x20a1 . ?₡)
1116 (#x20a2 . ?₢)
1117 (#x20a3 . ?₣)
1118 (#x20a4 . ?₤)
1119 (#x20a5 . ?₥)
1120 (#x20a6 . ?₦)
1121 (#x20a7 . ?₧)
1122 (#x20a8 . ?₨)
1123 (#x20aa . ?₪)
1124 (#x20ab . ?₫)
1125 (#x20ac . ?€)))
cf07d2bd
DL
Dave Love2002-10-30 19:26:23 +00001126 (puthash (car pair) (cdr pair) x-keysym-table))
1127
1128;; The following keysym codes for graphics are listed in the document
1129;; as not having unicodes available:
1130
1131;; #x08b1 TOP LEFT SUMMATION Technical
1132;; #x08b2 BOTTOM LEFT SUMMATION Technical
1133;; #x08b3 TOP VERTICAL SUMMATION CONNECTOR Technical
1134;; #x08b4 BOTTOM VERTICAL SUMMATION CONNECTOR Technical
1135;; #x08b5 TOP RIGHT SUMMATION Technical
1136;; #x08b6 BOTTOM RIGHT SUMMATION Technical
1137;; #x08b7 RIGHT MIDDLE SUMMATION Technical
1138;; #x0aac SIGNIFICANT BLANK SYMBOL Publish
1139;; #x0abd DECIMAL POINT Publish
1140;; #x0abf MARKER Publish
1141;; #x0acb TRADEMARK SIGN IN CIRCLE Publish
1142;; #x0ada HEXAGRAM Publish
1143;; #x0aff CURSOR Publish
1144;; #x0dde THAI MAIHANAKAT Thai
1145
2fb263f6 Jim Blandy1992-11-05 04:28:10 +00001146\f
45240125 Jan Djärv2010-09-02 12:17:02 +02001147;;;; Selections
67c86cfc Jim Blandy1992-05-12 05:26:53 +00001148
117c96c7
CY
Chong Yidong2010-09-16 18:47:21 -04001149(define-obsolete-function-alias 'x-cut-buffer-or-selection-value
1150 'x-selection-value "24.1")
1151
c7e36bd9 Stefan Monnier2007-11-09 19:37:03 +00001152;; Arrange for the kill and yank functions to set and check the clipboard.
492878e4 Jim Blandy1992-06-10 02:47:07 +00001153
2a36494c
KL
Karoly Lorentey2004-01-22 15:37:19 +00001154(defun x-clipboard-yank ()
1155 "Insert the clipboard contents, or the last stretch of killed text."
31300bee Stefan Monnier2014-10-01 23:19:32 -04001156 (declare (obsolete clipboard-yank "25.1"))
3f87f67e Karoly Lorentey2006-10-14 16:56:21 +00001157 (interactive "*")
d361bcfb
SM
Stefan Monnier2014-10-22 21:38:59 -04001158 (let ((clipboard-text (gui--selection-value-internal 'CLIPBOARD))
1159 (select-enable-clipboard t))
2a36494c
KL
Karoly Lorentey2004-01-22 15:37:19 +00001160 (if (and clipboard-text (> (length clipboard-text) 0))
1161 (kill-new clipboard-text))
1162 (yank)))
88046be2 Jim Blandy1993-07-03 10:17:56 +00001163
aa360da1
GM
Glenn Morris2008-06-12 03:56:20 +00001164(declare-function accelerate-menu "xmenu.c" (&optional frame) t)
1165
12b6af5c Karoly Lorentey2006-10-14 17:36:28 +00001166(defun x-menu-bar-open (&optional frame)
bbf0e7d9 Masatake YAMATO2012-07-20 07:32:30 -04001167 "Open the menu bar if it is shown.
e1894109 Stefan Monnier2012-08-10 10:47:12 -04001168`popup-menu' is used if it is off."
12b6af5c Karoly Lorentey2006-10-14 17:36:28 +00001169 (interactive "i")
bbf0e7d9
MY
Masatake YAMATO2012-07-20 07:32:30 -04001170 (cond
1171 ((and (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0)))
1172 (fboundp 'accelerate-menu))
1173 (accelerate-menu frame))
1174 (t
e1894109 Stefan Monnier2012-08-10 10:47:12 -04001175 (popup-menu (mouse-menu-bar-map) last-nonmenu-event))))
553624bf Richard M. Stallman1993-06-05 08:39:42 +00001176
2fb263f6 Jim Blandy1992-11-05 04:28:10 +00001177\f
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001178;;; Window system initialization.
84f1b454 Jan Djärv2006-12-30 15:23:38 +00001179
3d80ef3f Richard M. Stallman1993-03-11 18:50:04 +00001180(defun x-win-suspend-error ()
fd492166 Glenn Morris2014-04-11 00:02:28 -07001181 "Report an error when a suspend is attempted.
31300bee Stefan Monnier2014-10-01 23:19:32 -04001182This returns an error if any Emacs frames are X frames."
54da3bdf Chong Yidong2008-08-28 21:16:05 +00001183 ;; Don't allow suspending if any of the frames are X frames.
31300bee Stefan Monnier2014-10-01 23:19:32 -04001184 (if (memq 'x (mapcar #'window-system (frame-list)))
54da3bdf Chong Yidong2008-08-28 21:16:05 +00001185 (error "Cannot suspend Emacs while running under X")))
c8c72d6b Jim Blandy1993-03-25 04:37:38 +00001186
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001187(defvar x-initialized nil
1188 "Non-nil if the X window system has been initialized.")
1189
aa360da1
GM
Glenn Morris2008-06-12 03:56:20 +00001190(declare-function x-open-connection "xfns.c"
1191 (display &optional xrm-string must-succeed))
1192(declare-function x-server-max-request-size "xfns.c" (&optional terminal))
1193(declare-function x-get-resource "frame.c"
1194 (attribute class &optional component subclass))
f2d9c15f
GM
Glenn Morris2008-08-11 01:23:07 +00001195(declare-function x-parse-geometry "frame.c" (string))
1196(defvar x-resource-name)
1197(defvar x-display-name)
1198(defvar x-command-line-resources)
aa360da1 Glenn Morris2008-06-12 03:56:20 +00001199
919281dd
SM
Stefan Monnier2015-05-23 11:32:29 -04001200(cl-defmethod window-system-initialization (&context (window-system (eql x))
1201 &optional display)
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001202 "Initialize Emacs for X frames and open the first connection to an X server."
efc3dd3c
DC
Daniel Colascione2012-09-17 03:55:05 -08001203 (cl-assert (not x-initialized))
1204
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001205 ;; Make sure we have a valid resource name.
1206 (or (stringp x-resource-name)
1207 (let (i)
1208 (setq x-resource-name (invocation-name))
1209
1210 ;; Change any . or * characters in x-resource-name to hyphens,
1211 ;; so as not to choke when we use it in X resource queries.
1212 (while (setq i (string-match "[.*]" x-resource-name))
1213 (aset x-resource-name i ?-))))
1214
ebb19708 Dmitry Antipov2013-04-06 18:06:39 +04001215 (x-open-connection (or display
36ab8612 Miles Bader2007-05-16 07:12:33 +00001216 (setq x-display-name (or (getenv "DISPLAY" (selected-frame))
f105f403 Karoly Lorentey2005-12-26 02:14:10 +00001217 (getenv "DISPLAY"))))
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001218 x-command-line-resources
1219 ;; Exit Emacs with fatal error if this fails and we
1220 ;; are the initial display.
1221 (eq initial-window-system 'x))
1222
2d4e20ec
KH
Kenichi Handa2009-03-19 00:56:52 +00001223 ;; Create the default fontset.
1224 (create-default-fontset)
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001225
1226 ;; Create the standard fontset.
2d4e20ec
KH
Kenichi Handa2009-03-19 00:56:52 +00001227 (condition-case err
1228 (create-fontset-from-fontset-spec standard-fontset-spec t)
db9e401b Juanma Barranquero2010-01-18 05:39:40 +01001229 (error (display-warning
2d4e20ec
KH
Kenichi Handa2009-03-19 00:56:52 +00001230 'initialization
1231 (format "Creation of the standard fontset failed: %s" err)
1232 :error)))
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001233
1234 ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
1235 (create-fontset-from-x-resource)
1236
65e86587
KL
Karoly Lorentey2007-01-01 17:38:32 +00001237 ;; Set scroll bar mode to right if set by X resources. Default is left.
1238 (if (equal (x-get-resource "verticalScrollBars" "ScrollBars") "right")
1239 (customize-set-variable 'scroll-bar-mode 'right))
1240
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001241 ;; Apply a geometry resource to the initial frame. Put it at the end
1242 ;; of the alist, so that anything specified on the command line takes
1243 ;; precedence.
1244 (let* ((res-geometry (x-get-resource "geometry" "Geometry"))
1245 parsed)
1246 (if res-geometry
1247 (progn
1248 (setq parsed (x-parse-geometry res-geometry))
1249 ;; If the resource specifies a position,
1250 ;; call the position and size "user-specified".
1251 (if (or (assq 'top parsed) (assq 'left parsed))
1252 (setq parsed (cons '(user-position . t)
1253 (cons '(user-size . t) parsed))))
1254 ;; All geometry parms apply to the initial frame.
1255 (setq initial-frame-alist (append initial-frame-alist parsed))
f6959eb4 Juanma Barranquero2007-10-09 08:09:15 +00001256 ;; The size parms apply to all frames. Don't set it if there are
14bcc1e0
KL
Karoly Lorentey2006-12-03 12:15:03 +00001257 ;; sizes there already (from command line).
1258 (if (and (assq 'height parsed)
1259 (not (assq 'height default-frame-alist)))
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001260 (setq default-frame-alist
1261 (cons (cons 'height (cdr (assq 'height parsed)))
1262 default-frame-alist)))
14bcc1e0
KL
Karoly Lorentey2006-12-03 12:15:03 +00001263 (if (and (assq 'width parsed)
1264 (not (assq 'width default-frame-alist)))
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001265 (setq default-frame-alist
1266 (cons (cons 'width (cdr (assq 'width parsed)))
1267 default-frame-alist))))))
1268
1269 ;; Check the reverseVideo resource.
1270 (let ((case-fold-search t))
1271 (let ((rv (x-get-resource "reverseVideo" "ReverseVideo")))
1272 (if (and rv
1273 (string-match "^\\(true\\|yes\\|on\\)$" rv))
1274 (setq default-frame-alist
1275 (cons '(reverse . t) default-frame-alist)))))
63c86e17 Jim Blandy1991-05-17 00:15:22 +00001276
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001277 ;; Set x-selection-timeout, measured in milliseconds.
3c9dfce6
CY
Chong Yidong2012-02-25 11:01:11 +08001278 (let ((res-selection-timeout (x-get-resource "selectionTimeout"
1279 "SelectionTimeout")))
1280 (setq x-selection-timeout
1281 (if res-selection-timeout
1282 (string-to-number res-selection-timeout)
1283 5000)))
5cdb3f1e Eric S. Raymond1993-03-12 19:53:22 +00001284
0b0d3e0b Karoly Lorentey2004-02-28 01:23:39 +00001285 ;; Don't let Emacs suspend under X.
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001286 (add-hook 'suspend-hook 'x-win-suspend-error)
53631723 Richard M. Stallman1995-04-08 02:51:37 +00001287
b04f3e61
CY
Chong Yidong2008-11-03 17:57:33 +00001288 ;; During initialization, we defer sending size hints to the window
1289 ;; manager, because that can induce a race condition:
1290 ;; http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html
1291 ;; Send the size hints once initialization is done.
1292 (add-hook 'after-init-hook 'x-wm-set-size-hint)
1293
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001294 ;; Turn off window-splitting optimization; X is usually fast enough
1295 ;; that this is only annoying.
1296 (setq split-window-keep-point t)
c3ef5084 Stefan Monnier2003-05-24 16:13:06 +00001297
e9cda827
KL
Karoly Lorentey2004-01-22 02:36:55 +00001298 ;; Motif direct handling of f10 wasn't working right,
1299 ;; So temporarily we've turned it off in lwlib-Xm.c
1300 ;; and turned the Emacs f10 back on.
1301 ;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
1302 ;; (if (featurep 'motif)
1303 ;; (global-set-key [f10] 'ignore))
9541a441 Richard M. Stallman1996-04-21 05:54:18 +00001304
2a36494c
KL
Karoly Lorentey2004-01-22 15:37:19 +00001305 ;; Enable CLIPBOARD copy/paste through menu bar commands.
1306 (menu-bar-enable-clipboard)
6b61353c Kenichi Handa2004-04-16 12:51:06 +00001307
f9d71b42
CY
Chong Yidong2010-07-14 14:03:39 -04001308 ;; ;; Override Paste so it looks at CLIPBOARD first.
1309 ;; (define-key menu-bar-edit-menu [paste]
1310 ;; (append '(menu-item "Paste" x-clipboard-yank
1311 ;; :enable (not buffer-read-only)
1312 ;; :help "Paste (yank) text most recently cut/copied")
1313 ;; nil))
6b61353c Kenichi Handa2004-04-16 12:51:06 +00001314
15cd8efd Chong Yidong2012-04-27 13:40:46 +08001315 (x-apply-session-resources)
e9cda827 Karoly Lorentey2004-01-22 02:36:55 +00001316 (setq x-initialized t))
c3ef5084 Stefan Monnier2003-05-24 16:13:06 +00001317
3c5cc185
GM
Glenn Morris2015-05-10 23:34:45 -07001318(declare-function x-own-selection-internal "xselect.c"
1319 (selection value &optional frame))
1320(declare-function x-disown-selection-internal "xselect.c"
1321 (selection &optional time-object terminal))
1322(declare-function x-selection-owner-p "xselect.c"
1323 (&optional selection terminal))
1324(declare-function x-selection-exists-p "xselect.c"
1325 (&optional selection terminal))
1326(declare-function x-get-selection-internal "xselect.c"
1327 (selection-symbol target-type &optional time-stamp terminal))
1328
efc3dd3c Daniel Colascione2012-09-17 03:55:05 -08001329(add-to-list 'display-format-alist '("\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" . x))
919281dd
SM
Stefan Monnier2015-05-23 11:32:29 -04001330(cl-defmethod handle-args-function (args &context (window-system (eql x)))
1331 (x-handle-args args))
1332
1333(cl-defmethod frame-creation-function (params &context (window-system (eql x)))
1334 (x-create-frame-with-faces params))
1335
1336(cl-defmethod gui-backend-set-selection (selection value
1337 &context (window-system (eql x)))
1338 (if value (x-own-selection-internal selection value)
1339 (x-disown-selection-internal selection)))
1340
1341(cl-defmethod gui-backend-selection-owner-p (selection
1342 &context (window-system (eql x)))
1343 (x-selection-owner-p selection))
1344
1345(cl-defmethod gui-backend-selection-exists-p (selection
1346 &context (window-system (eql x)))
1347 (x-selection-exists-p selection))
1348
1349(cl-defmethod gui-backend-get-selection (selection-symbol target-type
1350 &context (window-system (eql x))
1351 &optional time-stamp terminal)
1352 (x-get-selection-internal selection-symbol target-type time-stamp terminal))
6b61353c
KH
Kenichi Handa2004-04-16 12:51:06 +00001353
1354;; Initiate drag and drop
1355(add-hook 'after-make-frame-functions 'x-dnd-init-frame)
c0acb3ee Richard M. Stallman2006-08-16 05:09:18 +00001356(define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event)
6b61353c Kenichi Handa2004-04-16 12:51:06 +00001357
dd314751 Jan Djärv2007-08-28 10:16:00 +00001358(defcustom x-gtk-stock-map
e8e4d5c8
SS
Sam Steingold2011-02-01 16:37:12 -05001359 (mapcar (lambda (arg)
1360 (cons (purecopy (car arg)) (purecopy (cdr arg))))
dd314751 Jan Djärv2007-08-28 10:16:00 +00001361 '(
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001362 ("etc/images/new" . ("document-new" "gtk-new"))
1363 ("etc/images/open" . ("document-open" "gtk-open"))
5db55b9e Jan Djärv2007-09-02 16:51:22 +00001364 ("etc/images/diropen" . "n:system-file-manager")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001365 ("etc/images/close" . ("window-close" "gtk-close"))
1366 ("etc/images/save" . ("document-save" "gtk-save"))
1367 ("etc/images/saveas" . ("document-save-as" "gtk-save-as"))
1368 ("etc/images/undo" . ("edit-undo" "gtk-undo"))
1369 ("etc/images/cut" . ("edit-cut" "gtk-cut"))
1370 ("etc/images/copy" . ("edit-copy" "gtk-copy"))
1371 ("etc/images/paste" . ("edit-paste" "gtk-paste"))
1372 ("etc/images/search" . ("edit-find" "gtk-find"))
1373 ("etc/images/print" . ("document-print" "gtk-print"))
1374 ("etc/images/preferences" . ("preferences-system" "gtk-preferences"))
1375 ("etc/images/help" . ("help-browser" "gtk-help"))
1376 ("etc/images/left-arrow" . ("go-previous" "gtk-go-back"))
1377 ("etc/images/right-arrow" . ("go-next" "gtk-go-forward"))
1378 ("etc/images/home" . ("go-home" "gtk-home"))
1379 ("etc/images/jump-to" . ("go-jump" "gtk-jump-to"))
5cb94d12 Jan Djärv2007-08-31 10:13:35 +00001380 ("etc/images/index" . "gtk-index")
3f4c6d52 Jan Djärv2014-10-18 18:19:53 +02001381 ("etc/images/exit" . ("application-exit" "gtk-quit"))
c96a0d64 Jan Djärv2008-02-25 10:50:20 +00001382 ("etc/images/cancel" . "gtk-cancel")
3f4c6d52 Jan Djärv2014-10-18 18:19:53 +02001383 ("etc/images/info" . ("dialog-information" "gtk-info"))
bdc398a9 Jan Djärv2008-03-06 10:59:27 +00001384 ("etc/images/bookmark_add" . "n:bookmark_add")
2e55c986 Reiner Steib2007-09-30 11:25:08 +00001385 ;; Used in Gnus and/or MH-E:
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001386 ("etc/images/attach" . "gtk-attach")
1387 ("etc/images/connect" . "gtk-connect")
1388 ("etc/images/contact" . "gtk-contact")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001389 ("etc/images/delete" . ("edit-delete" "gtk-delete"))
1390 ("etc/images/describe" . ("ocument-properties" "gtk-properties"))
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001391 ("etc/images/disconnect" . "gtk-disconnect")
1392 ;; ("etc/images/exit" . "gtk-exit")
1393 ("etc/images/lock-broken" . "gtk-lock_broken")
1394 ("etc/images/lock-ok" . "gtk-lock_ok")
1395 ("etc/images/lock" . "gtk-lock")
1396 ("etc/images/next-page" . "gtk-next-page")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001397 ("etc/images/refresh" . ("view-refresh" "gtk-refresh"))
1398 ("etc/images/sort-ascending" . ("view-sort-ascending" "gtk-sort-ascending"))
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001399 ("etc/images/sort-column-ascending" . "gtk-sort-column-ascending")
1400 ("etc/images/sort-criteria" . "gtk-sort-criteria")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001401 ("etc/images/sort-descending" . ("view-sort-descending"
1402 "gtk-sort-descending"))
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001403 ("etc/images/sort-row-ascending" . "gtk-sort-row-ascending")
1404 ("images/gnus/toggle-subscription" . "gtk-task-recurring")
1405 ("images/mail/compose" . "gtk-mail-compose")
1406 ("images/mail/copy" . "gtk-mail-copy")
1407 ("images/mail/forward" . "gtk-mail-forward")
1408 ("images/mail/inbox" . "gtk-inbox")
1409 ("images/mail/move" . "gtk-mail-move")
1410 ("images/mail/not-spam" . "gtk-not-spam")
1411 ("images/mail/outbox" . "gtk-outbox")
1412 ("images/mail/reply-all" . "gtk-mail-reply-to-all")
1413 ("images/mail/reply" . "gtk-mail-reply")
1414 ("images/mail/save-draft" . "gtk-mail-handling")
1415 ("images/mail/send" . "gtk-mail-send")
1416 ("images/mail/spam" . "gtk-spam")
7ee6c59b
NR
Nick Roberts2009-12-31 02:19:53 +13001417 ;; Used for GDB Graphical Interface
1418 ("images/gud/break" . "gtk-no")
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001419 ("images/gud/recstart" . ("media-record" "gtk-media-record"))
1420 ("images/gud/recstop" . ("media-playback-stop" "gtk-media-stop"))
2e55c986 Reiner Steib2007-09-30 11:25:08 +00001421 ;; No themed versions available:
c96a0d64
JD
Jan Djärv2008-02-25 10:50:20 +00001422 ;; mail/preview (combining stock_mail and stock_zoom)
1423 ;; mail/save (combining stock_mail, stock_save and stock_convert)
6bdad9ae Dan Nicolaescu2009-11-11 05:49:09 +00001424 ))
dd314751 Jan Djärv2007-08-28 10:16:00 +00001425 "How icons for tool bars are mapped to Gtk+ stock items.
5db55b9e
JD
Jan Djärv2007-09-02 16:51:22 +00001426Emacs must be compiled with the Gtk+ toolkit for this to have any effect.
1427A value that begins with n: denotes a named icon instead of a stock icon."
7fbe8079 Jan Djärv2007-09-29 16:23:59 +00001428 :version "22.2"
3f4c6d52
JD
Jan Djärv2014-10-18 18:19:53 +02001429 :type '(choice (repeat
1430 (choice symbol
1431 (cons (string :tag "Emacs icon")
1432 (choice (group (string :tag "Named")
1433 (string :tag "Stock"))
1434 (string :tag "Stock/named"))))))
dd314751
JD
Jan Djärv2007-08-28 10:16:00 +00001435 :group 'x)
1436
2e55c986 Reiner Steib2007-09-30 11:25:08 +00001437(defcustom icon-map-list '(x-gtk-stock-map)
db9e401b Juanma Barranquero2010-01-18 05:39:40 +01001438 "A list of alists that map icon file names to stock/named icons.
5db55b9e
JD
Jan Djärv2007-09-02 16:51:22 +00001439The alists are searched in the order they appear. The first match is used.
1440The keys in the alists are file names without extension and with two directory
1441components. For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm
1442to stock item gtk-open, use:
1443
1444 (\"etc/images/open\" . \"gtk-open\")
1445
1446Themes also have named icons. To map to one of those, use n: before the name:
1447
1448 (\"etc/images/diropen\" . \"n:system-file-manager\")
1449
2e55c986
RS
Reiner Steib2007-09-30 11:25:08 +00001450The list elements are either the symbol name for the alist or the
1451alist itself.
1452
1453If you don't want stock icons, set the variable to nil."
1454 :version "22.2"
1455 :type '(choice (const :tag "Don't use stock icons" nil)
1456 (repeat (choice symbol
1457 (cons (string :tag "Emacs icon")
1458 (string :tag "Stock/named")))))
1459 :group 'x)
5db55b9e Jan Djärv2007-09-02 16:51:22 +00001460
2543eb39
CY
Chong Yidong2008-11-29 06:52:31 +00001461(defconst x-gtk-stock-cache (make-hash-table :weakness t :test 'equal))
1462
dd314751 Jan Djärv2007-08-28 10:16:00 +00001463(defun x-gtk-map-stock (file)
2543eb39
CY
Chong Yidong2008-11-29 06:52:31 +00001464 "Map icon with file name FILE to a Gtk+ stock name.
1465This uses `icon-map-list' to map icon file names to stock icon names."
1466 (when (stringp file)
1467 (or (gethash file x-gtk-stock-cache)
1468 (puthash
1469 file
1470 (save-match-data
1471 (let* ((file-sans (file-name-sans-extension file))
1472 (key (and (string-match "/\\([^/]+/[^/]+/[^/]+$\\)"
1473 file-sans)
1474 (match-string 1 file-sans)))
1475 (icon-map icon-map-list)
1476 elem value)
1477 (while (and (null value) icon-map)
1478 (setq elem (car icon-map)
1479 value (assoc-string (or key file-sans)
1480 (if (symbolp elem)
1481 (symbol-value elem)
1482 elem))
1483 icon-map (cdr icon-map)))
1484 (and value (cdr value))))
1485 x-gtk-stock-cache))))
dd314751 Jan Djärv2007-08-28 10:16:00 +00001486
9e0bf19a
DC
Daniel Colascione2013-12-30 15:27:07 -08001487(global-set-key [XF86WakeUp] 'ignore)
1488
7c1bfecc Dan Nicolaescu2007-08-31 15:39:18 +00001489(provide 'x-win)
e380957e Jan Djärv2006-05-29 07:16:54 +00001490
5cdb3f1e Eric S. Raymond1993-03-12 19:53:22 +00001491;;; x-win.el ends here