Commit | Line | Data |
---|---|---|
cf07d2bd | 1 | ;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit;-*- |
2fe590dc | 2 | |
ab422c4d | 3 | ;; Copyright (C) 1993-1994, 2001-2013 Free Software Foundation, Inc. |
5cdb3f1e ER |
4 | |
5 | ;; Author: FSF | |
cf07d2bd | 6 | ;; Keywords: terminals, i18n |
5cdb3f1e | 7 | |
2fe590dc EN |
8 | ;; This file is part of GNU Emacs. |
9 | ||
1fecc8fe | 10 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
2fe590dc | 11 | ;; it under the terms of the GNU General Public License as published by |
1fecc8fe GM |
12 | ;; the Free Software Foundation, either version 3 of the License, or |
13 | ;; (at your option) any later version. | |
2fe590dc EN |
14 | |
15 | ;; GNU Emacs is distributed in the hope that it will be useful, | |
16 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | |
17 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
18 | ;; GNU General Public License for more details. | |
19 | ||
20 | ;; You should have received a copy of the GNU General Public License | |
1fecc8fe | 21 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
63f77899 | 22 | |
5cdb3f1e | 23 | ;;; Commentary: |
63f77899 | 24 | |
e9cda827 KL |
25 | ;; 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 |
29 | ;; 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 | 33 | ;; `window-system-initialization-alist' for more details. |
63f77899 JB |
34 | |
35 | ;; startup.el will then examine startup files, and eventually call the hooks | |
cf07d2bd | 36 | ;; which create the first window(s). |
5cdb3f1e ER |
37 | |
38 | ;;; Code: | |
63f77899 JB |
39 | \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 |
65 | ;; -xrm |
66 | ||
63f77899 JB |
67 | ;; An alist of X options and the function which handles them. See |
68 | ;; ../startup.el. | |
69 | ||
efc3dd3c DC |
70 | (eval-when-compile (require 'cl-lib)) |
71 | ||
2246281f | 72 | (if (not (fboundp 'x-create-frame)) |
800642d2 | 73 | (error "%s: Loading x-win.el but not compiled for X" (invocation-name))) |
db95369b | 74 | |
0cc89026 | 75 | (require 'frame) |
3eb43f71 | 76 | (require 'mouse) |
b16795eb | 77 | (require 'scroll-bar) |
ffe1dd7a JB |
78 | (require 'faces) |
79 | (require 'select) | |
290cb602 | 80 | (require 'menu-bar) |
6acdd93e | 81 | (require 'fontset) |
6b61353c | 82 | (require 'x-dnd) |
63c86e17 | 83 | |
19b08de9 | 84 | (defvar x-invocation-args) |
cc5e32c5 JB |
85 | (defvar x-keysym-table) |
86 | (defvar x-selection-timeout) | |
87 | (defvar x-session-id) | |
88 | (defvar x-session-previous-id) | |
19b08de9 | 89 | |
0389072b JD |
90 | (defun x-handle-no-bitmap-icon (switch) |
91 | (setq default-frame-alist (cons '(icon-type) default-frame-alist))) | |
92 | ||
350c1745 JD |
93 | ;; Handle the --parent-id option. |
94 | (defun x-handle-parent-id (switch) | |
95 | (or (consp x-invocation-args) | |
96 | (error "%s: missing argument to `%s' option" (invocation-name) switch)) | |
f9c7b08c GM |
97 | (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 | 102 | |
941a391a JD |
103 | ;; 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) | |
107 | (error "%s: missing argument to `%s' option" (invocation-name) switch)) | |
108 | (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 |
112 | "Special hook run when a save-session event occurs. |
113 | The functions do not get any argument. | |
941a391a JD |
114 | Functions can return non-nil to inform the session manager that the |
115 | window system shutdown should be aborted. | |
116 | ||
117 | See 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. | |
121 | If the directory ~/.emacs.d exists, we make a filename in there, otherwise | |
122 | a file in the home directory." | |
123 | (let ((basename (concat "session." session-id)) | |
c093939c | 124 | (emacs-dir user-emacs-directory)) |
941a391a JD |
125 | (expand-file-name (if (file-directory-p emacs-dir) |
126 | (concat emacs-dir basename) | |
127 | (concat "~/.emacs-" basename))))) | |
db95369b | 128 | |
941a391a JD |
129 | (defun emacs-session-save () |
130 | "This function is called when the window system is shutting down. | |
c80e3b4a | 131 | If this function returns non-nil, the window system shutdown is canceled. |
941a391a JD |
132 | |
133 | When a session manager tells Emacs that the window system is shutting | |
134 | down, this function is called. It calls the functions in the hook | |
135 | `emacs-save-session-functions'. Functions are called with the current | |
136 | buffer set to a temporary buffer. Functions should use `insert' to insert | |
db9e401b JB |
137 | lisp code to save the session state. The buffer is saved in a file in the |
138 | home directory of the user running Emacs. The file is evaluated when | |
139 | Emacs is restarted by the session manager. | |
941a391a JD |
140 | |
141 | If any of the functions returns non-nil, no more functions are called | |
142 | and this function returns non-nil. This will inform the session manager | |
143 | that it should abort the window system shutdown." | |
144 | (let ((filename (emacs-session-filename x-session-id)) | |
145 | (buf (get-buffer-create (concat " *SES " x-session-id)))) | |
146 | (when (file-exists-p filename) | |
147 | (delete-file filename)) | |
148 | (with-current-buffer buf | |
149 | (let ((cancel-shutdown (condition-case nil | |
3842fde1 | 150 | ;; A return of t means cancel the shutdown. |
db95369b | 151 | (run-hook-with-args-until-success |
941a391a JD |
152 | 'emacs-save-session-functions) |
153 | (error t)))) | |
154 | (unless cancel-shutdown | |
155 | (write-file filename)) | |
156 | (kill-buffer buf) | |
157 | cancel-shutdown)))) | |
158 | ||
1e4f6cec | 159 | (defun emacs-session-restore (previous-session-id) |
941a391a JD |
160 | "Restore the Emacs session if started by a session manager. |
161 | The file saved by `emacs-session-save' is evaluated and deleted if it | |
162 | exists." | |
1e4f6cec | 163 | (let ((filename (emacs-session-filename previous-session-id))) |
941a391a JD |
164 | (when (file-exists-p filename) |
165 | (load-file filename) | |
166 | (delete-file filename) | |
167 | (message "Restored session data")))) | |
168 | ||
db95369b JB |
169 | |
170 | ||
63f77899 JB |
171 | \f |
172 | ;; | |
173 | ;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them. | |
174 | ;; | |
175 | ||
176 | (defconst x-pointer-X-cursor 0) | |
177 | (defconst x-pointer-arrow 2) | |
178 | (defconst x-pointer-based-arrow-down 4) | |
179 | (defconst x-pointer-based-arrow-up 6) | |
180 | (defconst x-pointer-boat 8) | |
181 | (defconst x-pointer-bogosity 10) | |
182 | (defconst x-pointer-bottom-left-corner 12) | |
183 | (defconst x-pointer-bottom-right-corner 14) | |
184 | (defconst x-pointer-bottom-side 16) | |
185 | (defconst x-pointer-bottom-tee 18) | |
186 | (defconst x-pointer-box-spiral 20) | |
187 | (defconst x-pointer-center-ptr 22) | |
188 | (defconst x-pointer-circle 24) | |
189 | (defconst x-pointer-clock 26) | |
190 | (defconst x-pointer-coffee-mug 28) | |
191 | (defconst x-pointer-cross 30) | |
192 | (defconst x-pointer-cross-reverse 32) | |
193 | (defconst x-pointer-crosshair 34) | |
194 | (defconst x-pointer-diamond-cross 36) | |
195 | (defconst x-pointer-dot 38) | |
196 | (defconst x-pointer-dotbox 40) | |
197 | (defconst x-pointer-double-arrow 42) | |
198 | (defconst x-pointer-draft-large 44) | |
199 | (defconst x-pointer-draft-small 46) | |
200 | (defconst x-pointer-draped-box 48) | |
201 | (defconst x-pointer-exchange 50) | |
202 | (defconst x-pointer-fleur 52) | |
203 | (defconst x-pointer-gobbler 54) | |
204 | (defconst x-pointer-gumby 56) | |
205 | (defconst x-pointer-hand1 58) | |
206 | (defconst x-pointer-hand2 60) | |
207 | (defconst x-pointer-heart 62) | |
208 | (defconst x-pointer-icon 64) | |
209 | (defconst x-pointer-iron-cross 66) | |
210 | (defconst x-pointer-left-ptr 68) | |
211 | (defconst x-pointer-left-side 70) | |
212 | (defconst x-pointer-left-tee 72) | |
213 | (defconst x-pointer-leftbutton 74) | |
214 | (defconst x-pointer-ll-angle 76) | |
215 | (defconst x-pointer-lr-angle 78) | |
216 | (defconst x-pointer-man 80) | |
217 | (defconst x-pointer-middlebutton 82) | |
218 | (defconst x-pointer-mouse 84) | |
219 | (defconst x-pointer-pencil 86) | |
220 | (defconst x-pointer-pirate 88) | |
221 | (defconst x-pointer-plus 90) | |
222 | (defconst x-pointer-question-arrow 92) | |
223 | (defconst x-pointer-right-ptr 94) | |
224 | (defconst x-pointer-right-side 96) | |
225 | (defconst x-pointer-right-tee 98) | |
226 | (defconst x-pointer-rightbutton 100) | |
227 | (defconst x-pointer-rtl-logo 102) | |
228 | (defconst x-pointer-sailboat 104) | |
229 | (defconst x-pointer-sb-down-arrow 106) | |
230 | (defconst x-pointer-sb-h-double-arrow 108) | |
231 | (defconst x-pointer-sb-left-arrow 110) | |
232 | (defconst x-pointer-sb-right-arrow 112) | |
233 | (defconst x-pointer-sb-up-arrow 114) | |
234 | (defconst x-pointer-sb-v-double-arrow 116) | |
235 | (defconst x-pointer-shuttle 118) | |
236 | (defconst x-pointer-sizing 120) | |
237 | (defconst x-pointer-spider 122) | |
238 | (defconst x-pointer-spraycan 124) | |
239 | (defconst x-pointer-star 126) | |
240 | (defconst x-pointer-target 128) | |
241 | (defconst x-pointer-tcross 130) | |
242 | (defconst x-pointer-top-left-arrow 132) | |
243 | (defconst x-pointer-top-left-corner 134) | |
244 | (defconst x-pointer-top-right-corner 136) | |
245 | (defconst x-pointer-top-side 138) | |
246 | (defconst x-pointer-top-tee 140) | |
247 | (defconst x-pointer-trek 142) | |
248 | (defconst x-pointer-ul-angle 144) | |
249 | (defconst x-pointer-umbrella 146) | |
250 | (defconst x-pointer-ur-angle 148) | |
251 | (defconst x-pointer-watch 150) | |
252 | (defconst x-pointer-xterm 152) | |
5cb94d12 | 253 | (defconst x-pointer-invisible 255) |
63f77899 | 254 | |
d5e4dda5 | 255 | \f |
cf07d2bd DL |
256 | ;;;; Keysyms |
257 | ||
9b4234ae | 258 | (defun vendor-specific-keysyms (vendor) |
089bc712 | 259 | "Return the appropriate value of `system-key-alist' for VENDOR. |
9b4234ae | 260 | VENDOR is a string containing the name of the X Server's vendor, |
089bc712 | 261 | as returned by `x-server-vendor'." |
f3041af1 | 262 | (cond ((or (string-equal vendor "Hewlett-Packard Incorporated") |
3f18a142 | 263 | (string-equal vendor "Hewlett-Packard Company")) |
9b4234ae RS |
264 | '(( 168 . mute-acute) |
265 | ( 169 . mute-grave) | |
266 | ( 170 . mute-asciicircum) | |
267 | ( 171 . mute-diaeresis) | |
268 | ( 172 . mute-asciitilde) | |
269 | ( 175 . lira) | |
270 | ( 190 . guilder) | |
271 | ( 252 . block) | |
272 | ( 256 . longminus) | |
273 | (65388 . reset) | |
274 | (65389 . system) | |
275 | (65390 . user) | |
276 | (65391 . clearline) | |
277 | (65392 . insertline) | |
278 | (65393 . deleteline) | |
279 | (65394 . insertchar) | |
280 | (65395 . deletechar) | |
281 | (65396 . backtab) | |
282 | (65397 . kp-backtab))) | |
cf07d2bd | 283 | ;; Fixme: What about non-X11/NeWS sun server? |
04486a2d KH |
284 | ((or (string-equal vendor "X11/NeWS - Sun Microsystems Inc.") |
285 | (string-equal vendor "X Consortium")) | |
51a8e1cc KH |
286 | '((392976 . f36) |
287 | (392977 . f37) | |
9b4234ae RS |
288 | (393056 . req) |
289 | ;; These are for Sun under X11R6 | |
290 | (393072 . props) | |
291 | (393073 . front) | |
292 | (393074 . copy) | |
293 | (393075 . open) | |
294 | (393076 . paste) | |
295 | (393077 . cut))) | |
296 | (t | |
297 | ;; This is used by DEC's X server. | |
298 | '((65280 . remove))))) | |
299 | ||
58fa26d4 | 300 | ;; Latin-1 |
cf07d2bd DL |
301 | (let ((i 160)) |
302 | (while (< i 256) | |
1d912b36 | 303 | (puthash i i x-keysym-table) |
cf07d2bd DL |
304 | (setq i (1+ i)))) |
305 | ||
306 | ;; Table from Kuhn's proposed additions to the `KEYSYM Encoding' | |
307 | ;; appendix to the X protocol definition. | |
308 | (dolist | |
309 | (pair | |
310 | '( | |
311 | ;; Latin-2 | |
312 | (#x1a1 . ?\e,B!\e(B) | |
313 | (#x1a2 . ?\e,B"\e(B) | |
314 | (#x1a3 . ?\e,B#\e(B) | |
315 | (#x1a5 . ?\e,B%\e(B) | |
316 | (#x1a6 . ?\e,B&\e(B) | |
317 | (#x1a9 . ?\e,B)\e(B) | |
318 | (#x1aa . ?\e,B*\e(B) | |
319 | (#x1ab . ?\e,B+\e(B) | |
320 | (#x1ac . ?\e,B,\e(B) | |
321 | (#x1ae . ?\e,B.\e(B) | |
322 | (#x1af . ?\e,B/\e(B) | |
323 | (#x1b1 . ?\e,B1\e(B) | |
324 | (#x1b2 . ?\e,B2\e(B) | |
325 | (#x1b3 . ?\e,B3\e(B) | |
326 | (#x1b5 . ?\e,B5\e(B) | |
327 | (#x1b6 . ?\e,B6\e(B) | |
328 | (#x1b7 . ?\e,B7\e(B) | |
329 | (#x1b9 . ?\e,B9\e(B) | |
330 | (#x1ba . ?\e,B:\e(B) | |
331 | (#x1bb . ?\e,B;\e(B) | |
332 | (#x1bc . ?\e,B<\e(B) | |
333 | (#x1bd . ?\e,B=\e(B) | |
334 | (#x1be . ?\e,B>\e(B) | |
335 | (#x1bf . ?\e,B?\e(B) | |
336 | (#x1c0 . ?\e,B@\e(B) | |
337 | (#x1c3 . ?\e,BC\e(B) | |
338 | (#x1c5 . ?\e,BE\e(B) | |
339 | (#x1c6 . ?\e,BF\e(B) | |
340 | (#x1c8 . ?\e,BH\e(B) | |
341 | (#x1ca . ?\e,BJ\e(B) | |
342 | (#x1cc . ?\e,BL\e(B) | |
343 | (#x1cf . ?\e,BO\e(B) | |
344 | (#x1d0 . ?\e,BP\e(B) | |
345 | (#x1d1 . ?\e,BQ\e(B) | |
346 | (#x1d2 . ?\e,BR\e(B) | |
347 | (#x1d5 . ?\e,BU\e(B) | |
348 | (#x1d8 . ?\e,BX\e(B) | |
349 | (#x1d9 . ?\e,BY\e(B) | |
350 | (#x1db . ?\e,B[\e(B) | |
351 | (#x1de . ?\e,B^\e(B) | |
352 | (#x1e0 . ?\e,B`\e(B) | |
353 | (#x1e3 . ?\e,Bc\e(B) | |
354 | (#x1e5 . ?\e,Be\e(B) | |
355 | (#x1e6 . ?\e,Bf\e(B) | |
356 | (#x1e8 . ?\e,Bh\e(B) | |
357 | (#x1ea . ?\e,Bj\e(B) | |
358 | (#x1ec . ?\e,Bl\e(B) | |
359 | (#x1ef . ?\e,Bo\e(B) | |
360 | (#x1f0 . ?\e,Bp\e(B) | |
361 | (#x1f1 . ?\e,Bq\e(B) | |
362 | (#x1f2 . ?\e,Br\e(B) | |
363 | (#x1f5 . ?\e,Bu\e(B) | |
364 | (#x1f8 . ?\e,Bx\e(B) | |
365 | (#x1f9 . ?\e,By\e(B) | |
366 | (#x1fb . ?\e,B{\e(B) | |
367 | (#x1fe . ?\e,B~\e(B) | |
368 | (#x1ff . ?\e,B\7f\e(B) | |
369 | ;; Latin-3 | |
370 | (#x2a1 . ?\e,C!\e(B) | |
371 | (#x2a6 . ?\e,C&\e(B) | |
372 | (#x2a9 . ?\e,C)\e(B) | |
373 | (#x2ab . ?\e,C+\e(B) | |
374 | (#x2ac . ?\e,C,\e(B) | |
375 | (#x2b1 . ?\e,C1\e(B) | |
376 | (#x2b6 . ?\e,C6\e(B) | |
377 | (#x2b9 . ?\e,C9\e(B) | |
378 | (#x2bb . ?\e,C;\e(B) | |
379 | (#x2bc . ?\e,C<\e(B) | |
380 | (#x2c5 . ?\e,CE\e(B) | |
381 | (#x2c6 . ?\e,CF\e(B) | |
382 | (#x2d5 . ?\e,CU\e(B) | |
383 | (#x2d8 . ?\e,CX\e(B) | |
384 | (#x2dd . ?\e,C]\e(B) | |
385 | (#x2de . ?\e,C^\e(B) | |
386 | (#x2e5 . ?\e,Ce\e(B) | |
387 | (#x2e6 . ?\e,Cf\e(B) | |
388 | (#x2f5 . ?\e,Cu\e(B) | |
389 | (#x2f8 . ?\e,Cx\e(B) | |
390 | (#x2fd . ?\e,C}\e(B) | |
391 | (#x2fe . ?\e,C~\e(B) | |
392 | ;; Latin-4 | |
393 | (#x3a2 . ?\e,D"\e(B) | |
394 | (#x3a3 . ?\e,D#\e(B) | |
395 | (#x3a5 . ?\e,D%\e(B) | |
396 | (#x3a6 . ?\e,D&\e(B) | |
397 | (#x3aa . ?\e,D*\e(B) | |
398 | (#x3ab . ?\e,D+\e(B) | |
399 | (#x3ac . ?\e,D,\e(B) | |
400 | (#x3b3 . ?\e,D3\e(B) | |
401 | (#x3b5 . ?\e,D5\e(B) | |
402 | (#x3b6 . ?\e,D6\e(B) | |
403 | (#x3ba . ?\e,D:\e(B) | |
404 | (#x3bb . ?\e,D;\e(B) | |
405 | (#x3bc . ?\e,D<\e(B) | |
406 | (#x3bd . ?\e,D=\e(B) | |
407 | (#x3bf . ?\e,D?\e(B) | |
408 | (#x3c0 . ?\e,D@\e(B) | |
409 | (#x3c7 . ?\e,DG\e(B) | |
410 | (#x3cc . ?\e,DL\e(B) | |
411 | (#x3cf . ?\e,DO\e(B) | |
412 | (#x3d1 . ?\e,DQ\e(B) | |
413 | (#x3d2 . ?\e,DR\e(B) | |
414 | (#x3d3 . ?\e,DS\e(B) | |
415 | (#x3d9 . ?\e,DY\e(B) | |
416 | (#x3dd . ?\e,D]\e(B) | |
417 | (#x3de . ?\e,D^\e(B) | |
418 | (#x3e0 . ?\e,D`\e(B) | |
419 | (#x3e7 . ?\e,Dg\e(B) | |
420 | (#x3ec . ?\e,Dl\e(B) | |
421 | (#x3ef . ?\e,Do\e(B) | |
422 | (#x3f1 . ?\e,Dq\e(B) | |
423 | (#x3f2 . ?\e,Dr\e(B) | |
424 | (#x3f3 . ?\e,Ds\e(B) | |
425 | (#x3f9 . ?\e,Dy\e(B) | |
426 | (#x3fd . ?\e,D}\e(B) | |
427 | (#x3fe . ?\e,D~\e(B) | |
428 | ;; Kana: Fixme: needs conversion to Japanese charset -- seems | |
429 | ;; to require jisx0213, for which the Unicode translation | |
2aa2157b PE |
430 | ;; isn't clear. Using Emacs to convert this to Unicode and back changes |
431 | ;; this from "\e(J~\e(B" (i.e., bytes "ESC ( J ~ ESC ( B") to "\e$(G"#\e(B" (i.e., bytes | |
432 | ;; "ESC $ ( G " # ESC ( B"). | |
6b61353c KH |
433 | (#x47e . ?\e(J~\e(B) |
434 | (#x4a1 . ?\e$A!#\e(B) | |
435 | (#x4a2 . ?\\e$A!8\e(B) | |
436 | (#x4a3 . ?\\e$A!9\e(B) | |
437 | (#x4a4 . ?\e$A!"\e(B) | |
438 | (#x4a5 . ?\e$A!$\e(B) | |
439 | (#x4a6 . ?\e$A%r\e(B) | |
440 | (#x4a7 . ?\e$A%!\e(B) | |
441 | (#x4a8 . ?\e$A%#\e(B) | |
442 | (#x4a9 . ?\e$A%%\e(B) | |
443 | (#x4aa . ?\e$A%'\e(B) | |
444 | (#x4ab . ?\e$A%)\e(B) | |
445 | (#x4ac . ?\e$A%c\e(B) | |
446 | (#x4ad . ?\e$A%e\e(B) | |
447 | (#x4ae . ?\e$A%g\e(B) | |
448 | (#x4af . ?\e$A%C\e(B) | |
449 | (#x4b0 . ?\e$B!<\e(B) | |
450 | (#x4b1 . ?\e$A%"\e(B) | |
451 | (#x4b2 . ?\e$A%$\e(B) | |
452 | (#x4b3 . ?\e$A%&\e(B) | |
453 | (#x4b4 . ?\e$A%(\e(B) | |
454 | (#x4b5 . ?\e$A%*\e(B) | |
455 | (#x4b6 . ?\e$A%+\e(B) | |
456 | (#x4b7 . ?\e$A%-\e(B) | |
457 | (#x4b8 . ?\e$A%/\e(B) | |
458 | (#x4b9 . ?\e$A%1\e(B) | |
459 | (#x4ba . ?\e$A%3\e(B) | |
460 | (#x4bb . ?\e$A%5\e(B) | |
461 | (#x4bc . ?\e$A%7\e(B) | |
462 | (#x4bd . ?\e$A%9\e(B) | |
463 | (#x4be . ?\e$A%;\e(B) | |
464 | (#x4bf . ?\e$A%=\e(B) | |
465 | (#x4c0 . ?\e$A%?\e(B) | |
466 | (#x4c1 . ?\e$A%A\e(B) | |
467 | (#x4c2 . ?\e$A%D\e(B) | |
468 | (#x4c3 . ?\e$A%F\e(B) | |
469 | (#x4c4 . ?\e$A%H\e(B) | |
470 | (#x4c5 . ?\e$A%J\e(B) | |
471 | (#x4c6 . ?\e$A%K\e(B) | |
472 | (#x4c7 . ?\e$A%L\e(B) | |
473 | (#x4c8 . ?\e$A%M\e(B) | |
474 | (#x4c9 . ?\e$A%N\e(B) | |
475 | (#x4ca . ?\e$A%O\e(B) | |
476 | (#x4cb . ?\e$A%R\e(B) | |
477 | (#x4cc . ?\e$A%U\e(B) | |
478 | (#x4cd . ?\e$A%X\e(B) | |
479 | (#x4ce . ?\e$A%[\e(B) | |
480 | (#x4cf . ?\e$A%^\e(B) | |
481 | (#x4d0 . ?\e$A%_\e(B) | |
482 | (#x4d1 . ?\e$A%`\e(B) | |
483 | (#x4d2 . ?\e$A%a\e(B) | |
484 | (#x4d3 . ?\e$A%b\e(B) | |
485 | (#x4d4 . ?\e$A%d\e(B) | |
486 | (#x4d5 . ?\e$A%f\e(B) | |
487 | (#x4d6 . ?\e$A%h\e(B) | |
488 | (#x4d7 . ?\e$A%i\e(B) | |
489 | (#x4d8 . ?\e$A%j\e(B) | |
490 | (#x4d9 . ?\e$A%k\e(B) | |
491 | (#x4da . ?\e$A%l\e(B) | |
492 | (#x4db . ?\e$A%m\e(B) | |
493 | (#x4dc . ?\e$A%o\e(B) | |
494 | (#x4dd . ?\e$A%s\e(B) | |
495 | (#x4de . ?\e$B!+\e(B) | |
496 | (#x4df . ?\e$B!,\e(B) | |
cf07d2bd DL |
497 | ;; Arabic |
498 | (#x5ac . ?\e,G,\e(B) | |
499 | (#x5bb . ?\e,G;\e(B) | |
500 | (#x5bf . ?\e,G?\e(B) | |
501 | (#x5c1 . ?\e,GA\e(B) | |
502 | (#x5c2 . ?\e,GB\e(B) | |
503 | (#x5c3 . ?\e,GC\e(B) | |
504 | (#x5c4 . ?\e,GD\e(B) | |
505 | (#x5c5 . ?\e,GE\e(B) | |
506 | (#x5c6 . ?\e,GF\e(B) | |
507 | (#x5c7 . ?\e,GG\e(B) | |
508 | (#x5c8 . ?\e,GH\e(B) | |
509 | (#x5c9 . ?\e,GI\e(B) | |
510 | (#x5ca . ?\e,GJ\e(B) | |
511 | (#x5cb . ?\e,GK\e(B) | |
512 | (#x5cc . ?\e,GL\e(B) | |
513 | (#x5cd . ?\e,GM\e(B) | |
514 | (#x5ce . ?\e,GN\e(B) | |
515 | (#x5cf . ?\e,GO\e(B) | |
516 | (#x5d0 . ?\e,GP\e(B) | |
517 | (#x5d1 . ?\e,GQ\e(B) | |
518 | (#x5d2 . ?\e,GR\e(B) | |
519 | (#x5d3 . ?\e,GS\e(B) | |
520 | (#x5d4 . ?\e,GT\e(B) | |
521 | (#x5d5 . ?\e,GU\e(B) | |
522 | (#x5d6 . ?\e,GV\e(B) | |
523 | (#x5d7 . ?\e,GW\e(B) | |
524 | (#x5d8 . ?\e,GX\e(B) | |
525 | (#x5d9 . ?\e,GY\e(B) | |
526 | (#x5da . ?\e,GZ\e(B) | |
527 | (#x5e0 . ?\e,G`\e(B) | |
528 | (#x5e1 . ?\e,Ga\e(B) | |
529 | (#x5e2 . ?\e,Gb\e(B) | |
530 | (#x5e3 . ?\e,Gc\e(B) | |
531 | (#x5e4 . ?\e,Gd\e(B) | |
532 | (#x5e5 . ?\e,Ge\e(B) | |
533 | (#x5e6 . ?\e,Gf\e(B) | |
534 | (#x5e7 . ?\e,Gg\e(B) | |
535 | (#x5e8 . ?\e,Gh\e(B) | |
536 | (#x5e9 . ?\e,Gi\e(B) | |
537 | (#x5ea . ?\e,Gj\e(B) | |
538 | (#x5eb . ?\e,Gk\e(B) | |
539 | (#x5ec . ?\e,Gl\e(B) | |
540 | (#x5ed . ?\e,Gm\e(B) | |
541 | (#x5ee . ?\e,Gn\e(B) | |
542 | (#x5ef . ?\e,Go\e(B) | |
543 | (#x5f0 . ?\e,Gp\e(B) | |
544 | (#x5f1 . ?\e,Gq\e(B) | |
545 | (#x5f2 . ?\e,Gr\e(B) | |
546 | ;; Cyrillic | |
1cbe1e4b KH |
547 | (#x680 . ?\e$,1)R\e(B) |
548 | (#x681 . ?\e$,1)V\e(B) | |
549 | (#x682 . ?\e$,1)Z\e(B) | |
550 | (#x683 . ?\e$,1)\\e(B) | |
551 | (#x684 . ?\e$,1)b\e(B) | |
552 | (#x685 . ?\e$,1)n\e(B) | |
553 | (#x686 . ?\e$,1)p\e(B) | |
554 | (#x687 . ?\e$,1)r\e(B) | |
555 | (#x688 . ?\e$,1)v\e(B) | |
556 | (#x689 . ?\e$,1)x\e(B) | |
557 | (#x68a . ?\e$,1)z\e(B) | |
558 | (#x68c . ?\e$,1*8\e(B) | |
559 | (#x68d . ?\e$,1*B\e(B) | |
560 | (#x68e . ?\e$,1*H\e(B) | |
561 | (#x68f . ?\e$,1*N\e(B) | |
562 | (#x690 . ?\e$,1)S\e(B) | |
563 | (#x691 . ?\e$,1)W\e(B) | |
564 | (#x692 . ?\e$,1)[\e(B) | |
565 | (#x693 . ?\e$,1)]\e(B) | |
566 | (#x694 . ?\e$,1)c\e(B) | |
567 | (#x695 . ?\e$,1)o\e(B) | |
568 | (#x696 . ?\e$,1)q\e(B) | |
569 | (#x697 . ?\e$,1)s\e(B) | |
570 | (#x698 . ?\e$,1)w\e(B) | |
571 | (#x699 . ?\e$,1)y\e(B) | |
572 | (#x69a . ?\e$,1){\e(B) | |
573 | (#x69c . ?\e$,1*9\e(B) | |
574 | (#x69d . ?\e$,1*C\e(B) | |
575 | (#x69e . ?\e$,1*I\e(B) | |
576 | (#x69f . ?\e$,1*O\e(B) | |
cf07d2bd DL |
577 | (#x6a1 . ?\e,Lr\e(B) |
578 | (#x6a2 . ?\e,Ls\e(B) | |
579 | (#x6a3 . ?\e,Lq\e(B) | |
580 | (#x6a4 . ?\e,Lt\e(B) | |
581 | (#x6a5 . ?\e,Lu\e(B) | |
582 | (#x6a6 . ?\e,Lv\e(B) | |
583 | (#x6a7 . ?\e,Lw\e(B) | |
584 | (#x6a8 . ?\e,Lx\e(B) | |
585 | (#x6a9 . ?\e,Ly\e(B) | |
586 | (#x6aa . ?\e,Lz\e(B) | |
587 | (#x6ab . ?\e,L{\e(B) | |
588 | (#x6ac . ?\e,L|\e(B) | |
589 | (#x6ae . ?\e,L~\e(B) | |
590 | (#x6af . ?\e,L\7f\e(B) | |
591 | (#x6b0 . ?\e,Lp\e(B) | |
592 | (#x6b1 . ?\e,L"\e(B) | |
593 | (#x6b2 . ?\e,L#\e(B) | |
594 | (#x6b3 . ?\e,L!\e(B) | |
595 | (#x6b4 . ?\e,L$\e(B) | |
596 | (#x6b5 . ?\e,L%\e(B) | |
597 | (#x6b6 . ?\e,L&\e(B) | |
598 | (#x6b7 . ?\e,L'\e(B) | |
599 | (#x6b8 . ?\e,L(\e(B) | |
600 | (#x6b9 . ?\e,L)\e(B) | |
601 | (#x6ba . ?\e,L*\e(B) | |
602 | (#x6bb . ?\e,L+\e(B) | |
603 | (#x6bc . ?\e,L,\e(B) | |
604 | (#x6be . ?\e,L.\e(B) | |
605 | (#x6bf . ?\e,L/\e(B) | |
606 | (#x6c0 . ?\e,Ln\e(B) | |
607 | (#x6c1 . ?\e,LP\e(B) | |
608 | (#x6c2 . ?\e,LQ\e(B) | |
609 | (#x6c3 . ?\e,Lf\e(B) | |
610 | (#x6c4 . ?\e,LT\e(B) | |
611 | (#x6c5 . ?\e,LU\e(B) | |
612 | (#x6c6 . ?\e,Ld\e(B) | |
613 | (#x6c7 . ?\e,LS\e(B) | |
614 | (#x6c8 . ?\e,Le\e(B) | |
615 | (#x6c9 . ?\e,LX\e(B) | |
616 | (#x6ca . ?\e,LY\e(B) | |
617 | (#x6cb . ?\e,LZ\e(B) | |
618 | (#x6cc . ?\e,L[\e(B) | |
619 | (#x6cd . ?\e,L\\e(B) | |
620 | (#x6ce . ?\e,L]\e(B) | |
621 | (#x6cf . ?\e,L^\e(B) | |
622 | (#x6d0 . ?\e,L_\e(B) | |
623 | (#x6d1 . ?\e,Lo\e(B) | |
624 | (#x6d2 . ?\e,L`\e(B) | |
625 | (#x6d3 . ?\e,La\e(B) | |
626 | (#x6d4 . ?\e,Lb\e(B) | |
627 | (#x6d5 . ?\e,Lc\e(B) | |
628 | (#x6d6 . ?\e,LV\e(B) | |
629 | (#x6d7 . ?\e,LR\e(B) | |
630 | (#x6d8 . ?\e,Ll\e(B) | |
631 | (#x6d9 . ?\e,Lk\e(B) | |
632 | (#x6da . ?\e,LW\e(B) | |
633 | (#x6db . ?\e,Lh\e(B) | |
634 | (#x6dc . ?\e,Lm\e(B) | |
635 | (#x6dd . ?\e,Li\e(B) | |
636 | (#x6de . ?\e,Lg\e(B) | |
637 | (#x6df . ?\e,Lj\e(B) | |
638 | (#x6e0 . ?\e,LN\e(B) | |
639 | (#x6e1 . ?\e,L0\e(B) | |
640 | (#x6e2 . ?\e,L1\e(B) | |
641 | (#x6e3 . ?\e,LF\e(B) | |
642 | (#x6e4 . ?\e,L4\e(B) | |
643 | (#x6e5 . ?\e,L5\e(B) | |
644 | (#x6e6 . ?\e,LD\e(B) | |
645 | (#x6e7 . ?\e,L3\e(B) | |
646 | (#x6e8 . ?\e,LE\e(B) | |
647 | (#x6e9 . ?\e,L8\e(B) | |
648 | (#x6ea . ?\e,L9\e(B) | |
649 | (#x6eb . ?\e,L:\e(B) | |
650 | (#x6ec . ?\e,L;\e(B) | |
651 | (#x6ed . ?\e,L<\e(B) | |
652 | (#x6ee . ?\e,L=\e(B) | |
653 | (#x6ef . ?\e,L>\e(B) | |
654 | (#x6f0 . ?\e,L?\e(B) | |
655 | (#x6f1 . ?\e,LO\e(B) | |
656 | (#x6f2 . ?\e,L@\e(B) | |
657 | (#x6f3 . ?\e,LA\e(B) | |
658 | (#x6f4 . ?\e,LB\e(B) | |
659 | (#x6f5 . ?\e,LC\e(B) | |
660 | (#x6f6 . ?\e,L6\e(B) | |
661 | (#x6f7 . ?\e,L2\e(B) | |
662 | (#x6f8 . ?\e,LL\e(B) | |
663 | (#x6f9 . ?\e,LK\e(B) | |
664 | (#x6fa . ?\e,L7\e(B) | |
665 | (#x6fb . ?\e,LH\e(B) | |
666 | (#x6fc . ?\e,LM\e(B) | |
667 | (#x6fd . ?\e,LI\e(B) | |
668 | (#x6fe . ?\e,LG\e(B) | |
669 | (#x6ff . ?\e,LJ\e(B) | |
670 | ;; Greek | |
671 | (#x7a1 . ?\e,F6\e(B) | |
672 | (#x7a2 . ?\e,F8\e(B) | |
673 | (#x7a3 . ?\e,F9\e(B) | |
674 | (#x7a4 . ?\e,F:\e(B) | |
675 | (#x7a5 . ?\e,FZ\e(B) | |
676 | (#x7a7 . ?\e,F<\e(B) | |
677 | (#x7a8 . ?\e,F>\e(B) | |
678 | (#x7a9 . ?\e,F[\e(B) | |
679 | (#x7ab . ?\e,F?\e(B) | |
680 | (#x7ae . ?\e,F5\e(B) | |
681 | (#x7af . ?\e,F/\e(B) | |
682 | (#x7b1 . ?\e,F\\e(B) | |
683 | (#x7b2 . ?\e,F]\e(B) | |
684 | (#x7b3 . ?\e,F^\e(B) | |
685 | (#x7b4 . ?\e,F_\e(B) | |
686 | (#x7b5 . ?\e,Fz\e(B) | |
687 | (#x7b6 . ?\e,F@\e(B) | |
688 | (#x7b7 . ?\e,F|\e(B) | |
689 | (#x7b8 . ?\e,F}\e(B) | |
690 | (#x7b9 . ?\e,F{\e(B) | |
691 | (#x7ba . ?\e,F`\e(B) | |
692 | (#x7bb . ?\e,F~\e(B) | |
693 | (#x7c1 . ?\e,FA\e(B) | |
694 | (#x7c2 . ?\e,FB\e(B) | |
695 | (#x7c3 . ?\e,FC\e(B) | |
696 | (#x7c4 . ?\e,FD\e(B) | |
697 | (#x7c5 . ?\e,FE\e(B) | |
698 | (#x7c6 . ?\e,FF\e(B) | |
699 | (#x7c7 . ?\e,FG\e(B) | |
700 | (#x7c8 . ?\e,FH\e(B) | |
701 | (#x7c9 . ?\e,FI\e(B) | |
702 | (#x7ca . ?\e,FJ\e(B) | |
703 | (#x7cb . ?\e,FK\e(B) | |
704 | (#x7cc . ?\e,FL\e(B) | |
705 | (#x7cd . ?\e,FM\e(B) | |
706 | (#x7ce . ?\e,FN\e(B) | |
707 | (#x7cf . ?\e,FO\e(B) | |
708 | (#x7d0 . ?\e,FP\e(B) | |
709 | (#x7d1 . ?\e,FQ\e(B) | |
710 | (#x7d2 . ?\e,FS\e(B) | |
711 | (#x7d4 . ?\e,FT\e(B) | |
712 | (#x7d5 . ?\e,FU\e(B) | |
713 | (#x7d6 . ?\e,FV\e(B) | |
714 | (#x7d7 . ?\e,FW\e(B) | |
715 | (#x7d8 . ?\e,FX\e(B) | |
716 | (#x7d9 . ?\e,FY\e(B) | |
717 | (#x7e1 . ?\e,Fa\e(B) | |
718 | (#x7e2 . ?\e,Fb\e(B) | |
719 | (#x7e3 . ?\e,Fc\e(B) | |
720 | (#x7e4 . ?\e,Fd\e(B) | |
721 | (#x7e5 . ?\e,Fe\e(B) | |
722 | (#x7e6 . ?\e,Ff\e(B) | |
723 | (#x7e7 . ?\e,Fg\e(B) | |
724 | (#x7e8 . ?\e,Fh\e(B) | |
725 | (#x7e9 . ?\e,Fi\e(B) | |
726 | (#x7ea . ?\e,Fj\e(B) | |
727 | (#x7eb . ?\e,Fk\e(B) | |
728 | (#x7ec . ?\e,Fl\e(B) | |
729 | (#x7ed . ?\e,Fm\e(B) | |
730 | (#x7ee . ?\e,Fn\e(B) | |
731 | (#x7ef . ?\e,Fo\e(B) | |
732 | (#x7f0 . ?\e,Fp\e(B) | |
733 | (#x7f1 . ?\e,Fq\e(B) | |
734 | (#x7f2 . ?\e,Fs\e(B) | |
735 | (#x7f3 . ?\e,Fr\e(B) | |
736 | (#x7f4 . ?\e,Ft\e(B) | |
737 | (#x7f5 . ?\e,Fu\e(B) | |
738 | (#x7f6 . ?\e,Fv\e(B) | |
739 | (#x7f7 . ?\e,Fw\e(B) | |
740 | (#x7f8 . ?\e,Fx\e(B) | |
741 | (#x7f9 . ?\e,Fy\e(B) | |
742 | ;; Technical | |
743 | (#x8a1 . ?\e$,1|W\e(B) | |
6b61353c KH |
744 | (#x8a2 . ?\e$A)0\e(B) |
745 | (#x8a3 . ?\e$A)$\e(B) | |
cf07d2bd DL |
746 | (#x8a4 . ?\e$,1{ \e(B) |
747 | (#x8a5 . ?\e$,1{!\e(B) | |
6b61353c | 748 | (#x8a6 . ?\e$A)&\e(B) |
cf07d2bd DL |
749 | (#x8a7 . ?\e$,1|A\e(B) |
750 | (#x8a8 . ?\e$,1|C\e(B) | |
751 | (#x8a9 . ?\e$,1|D\e(B) | |
752 | (#x8aa . ?\e$,1|F\e(B) | |
753 | (#x8ab . ?\e$,1|;\e(B) | |
754 | (#x8ac . ?\e$,1|=\e(B) | |
755 | (#x8ad . ?\e$,1|>\e(B) | |
756 | (#x8ae . ?\e$,1|@\e(B) | |
757 | (#x8af . ?\e$,1|H\e(B) | |
758 | (#x8b0 . ?\e$,1|L\e(B) | |
6b61353c KH |
759 | (#x8bc . ?\e$A!\\e(B) |
760 | (#x8bd . ?\e$A!Y\e(B) | |
761 | (#x8be . ?\e$A!]\e(B) | |
762 | (#x8bf . ?\e$A!R\e(B) | |
763 | (#x8c0 . ?\e$A!`\e(B) | |
764 | (#x8c1 . ?\e$A!X\e(B) | |
765 | (#x8c2 . ?\e$A!^\e(B) | |
766 | (#x8c5 . ?\e$B"`\e(B) | |
767 | (#x8c8 . ?\e$(G"D\e(B) | |
768 | (#x8c9 . ?\e$(O"l\e(B) | |
769 | (#x8cd . ?\e$B"N\e(B) | |
770 | (#x8ce . ?\e$B"M\e(B) | |
771 | (#x8cf . ?\e$A!T\e(B) | |
772 | (#x8d6 . ?\e$A!L\e(B) | |
773 | (#x8da . ?\e$B">\e(B) | |
774 | (#x8db . ?\e$B"?\e(B) | |
775 | (#x8dc . ?\e$A!I\e(B) | |
776 | (#x8dd . ?\e$A!H\e(B) | |
777 | (#x8de . ?\e$A!D\e(B) | |
778 | (#x8df . ?\e$A!E\e(B) | |
779 | (#x8ef . ?\e$B"_\e(B) | |
cf07d2bd | 780 | (#x8f6 . ?\e$,1!R\e(B) |
6b61353c KH |
781 | (#x8fb . ?\e$A!{\e(B) |
782 | (#x8fc . ?\e$A!|\e(B) | |
783 | (#x8fd . ?\e$A!z\e(B) | |
784 | (#x8fe . ?\e$A!}\e(B) | |
cf07d2bd | 785 | ;; Special |
6b61353c KH |
786 | (#x9e0 . ?\e$A!t\e(B) |
787 | (#x9e1 . ?\e$(C"F\e(B) | |
788 | (#x9e2 . ?\e$(GB*\e(B) | |
789 | (#x9e3 . ?\e$(GB-\e(B) | |
790 | (#x9e4 . ?\e$(GB.\e(B) | |
791 | (#x9e5 . ?\e$(GB+\e(B) | |
cf07d2bd | 792 | (#x9e8 . ?\e$,1}d\e(B) |
6b61353c KH |
793 | (#x9e9 . ?\e$(GB,\e(B) |
794 | (#x9ea . ?\e$A)<\e(B) | |
795 | (#x9eb . ?\e$A)4\e(B) | |
796 | (#x9ec . ?\e$A)0\e(B) | |
797 | (#x9ed . ?\e$A)8\e(B) | |
798 | (#x9ee . ?\e$A)`\e(B) | |
cf07d2bd DL |
799 | (#x9ef . ?\e$,1|Z\e(B) |
800 | (#x9f0 . ?\e$,1|[\e(B) | |
6b61353c | 801 | (#x9f1 . ?\e$A)$\e(B) |
cf07d2bd DL |
802 | (#x9f2 . ?\e$,1|\\e(B) |
803 | (#x9f3 . ?\e$,1|]\e(B) | |
6b61353c KH |
804 | (#x9f4 . ?\e$A)@\e(B) |
805 | (#x9f5 . ?\e$A)H\e(B) | |
806 | (#x9f6 . ?\e$A)X\e(B) | |
807 | (#x9f7 . ?\e$A)P\e(B) | |
808 | (#x9f8 . ?\e$A)&\e(B) | |
cf07d2bd DL |
809 | ;; Publishing |
810 | (#xaa1 . ?\e$,1rc\e(B) | |
811 | (#xaa2 . ?\e$,1rb\e(B) | |
812 | (#xaa3 . ?\e$,1rd\e(B) | |
813 | (#xaa4 . ?\e$,1re\e(B) | |
814 | (#xaa5 . ?\e$,1rg\e(B) | |
815 | (#xaa6 . ?\e$,1rh\e(B) | |
816 | (#xaa7 . ?\e$,1ri\e(B) | |
817 | (#xaa8 . ?\e$,1rj\e(B) | |
6b61353c KH |
818 | (#xaa9 . ?\e$(G!7\e(B) |
819 | (#xaaa . ?\e$(G!9\e(B) | |
820 | (#xaae . ?\e$A!-\e(B) | |
821 | (#xaaf . ?\e$(G!-\e(B) | |
822 | (#xab0 . ?\e$(O'x\e(B) | |
823 | (#xab1 . ?\e$(O'y\e(B) | |
824 | (#xab2 . ?\e$(O'z\e(B) | |
cf07d2bd DL |
825 | (#xab3 . ?\e$,1v6\e(B) |
826 | (#xab4 . ?\e$,1v7\e(B) | |
827 | (#xab5 . ?\e$,1v8\e(B) | |
828 | (#xab6 . ?\e$,1v9\e(B) | |
829 | (#xab7 . ?\e$,1v:\e(B) | |
6b61353c | 830 | (#xab8 . ?\e$(G""\e(B) |
cf07d2bd DL |
831 | (#xabb . ?\e$,1rr\e(B) |
832 | (#xabc . ?\e$,1{)\e(B) | |
833 | (#xabe . ?\e$,1{*\e(B) | |
6b61353c KH |
834 | (#xac3 . ?\e$(C({\e(B) |
835 | (#xac4 . ?\e$(C(|\e(B) | |
836 | (#xac5 . ?\e$(C(}\e(B) | |
837 | (#xac6 . ?\e$(C(~\e(B) | |
838 | (#xac9 . ?\e$(D"o\e(B) | |
cf07d2bd | 839 | (#xaca . ?\e$,2"s\e(B) |
6b61353c KH |
840 | (#xacc . ?\e$(O##\e(B) |
841 | (#xacd . ?\e$(O#!\e(B) | |
842 | (#xace . ?\e$A!p\e(B) | |
cf07d2bd | 843 | (#xacf . ?\e$,2!o\e(B) |
6b61353c KH |
844 | (#xad0 . ?\e,F!\e(B) |
845 | (#xad1 . ?\e,F"\e(B) | |
846 | (#xad2 . ?\e,Y4\e(B) | |
847 | (#xad3 . ?\e,Y!\e(B) | |
cf07d2bd | 848 | (#xad4 . ?\e$,1u^\e(B) |
6b61353c KH |
849 | (#xad6 . ?\e$A!d\e(B) |
850 | (#xad7 . ?\e$A!e\e(B) | |
cf07d2bd DL |
851 | (#xad9 . ?\e$,2%]\e(B) |
852 | (#xadb . ?\e$,2!l\e(B) | |
6b61353c KH |
853 | (#xadc . ?\e$(O#$\e(B) |
854 | (#xadd . ?\e$(O#"\e(B) | |
855 | (#xade . ?\e$A!q\e(B) | |
cf07d2bd | 856 | (#xadf . ?\e$,2!n\e(B) |
6b61353c | 857 | (#xae0 . ?\e$(O#?\e(B) |
cf07d2bd DL |
858 | (#xae1 . ?\e$,2!k\e(B) |
859 | (#xae2 . ?\e$,2!m\e(B) | |
6b61353c KH |
860 | (#xae3 . ?\e$A!w\e(B) |
861 | (#xae4 . ?\e$(G!}\e(B) | |
862 | (#xae5 . ?\e$A!n\e(B) | |
863 | (#xae6 . ?\e$(O#@\e(B) | |
cf07d2bd | 864 | (#xae7 . ?\e$,2!j\e(B) |
6b61353c KH |
865 | (#xae8 . ?\e$A!x\e(B) |
866 | (#xae9 . ?\e$(G!~\e(B) | |
867 | (#xaea . ?\e$(C"P\e(B) | |
868 | (#xaeb . ?\e$(O-~\e(B) | |
869 | (#xaec . ?\e$(O&@\e(B) | |
870 | (#xaed . ?\e$(O&<\e(B) | |
871 | (#xaee . ?\e$(O&>\e(B) | |
cf07d2bd | 872 | (#xaf0 . ?\e$,2%`\e(B) |
6b61353c KH |
873 | (#xaf1 . ?\e$B"w\e(B) |
874 | (#xaf2 . ?\e$B"x\e(B) | |
875 | (#xaf3 . ?\e$(O'{\e(B) | |
cf07d2bd | 876 | (#xaf4 . ?\e$,2%W\e(B) |
6b61353c KH |
877 | (#xaf5 . ?\e$B"t\e(B) |
878 | (#xaf6 . ?\e$B"u\e(B) | |
879 | (#xaf7 . ?\e$A!a\e(B) | |
880 | (#xaf8 . ?\e$A!b\e(B) | |
881 | (#xaf9 . ?\e$(O&g\e(B) | |
cf07d2bd DL |
882 | (#xafa . ?\e$,1zu\e(B) |
883 | (#xafb . ?\e$,1uW\e(B) | |
884 | (#xafc . ?\e$,1s8\e(B) | |
885 | (#xafd . ?\e$,1rz\e(B) | |
6b61353c | 886 | (#xafe . ?\e,Y%\e(B) |
cf07d2bd DL |
887 | ;; APL |
888 | (#xba3 . ?<) | |
889 | (#xba6 . ?>) | |
6b61353c KH |
890 | (#xba8 . ?\e$A!E\e(B) |
891 | (#xba9 . ?\e$A!D\e(B) | |
cf07d2bd | 892 | (#xbc0 . ?\e,A/\e(B) |
6b61353c KH |
893 | (#xbc2 . ?\e$A!M\e(B) |
894 | (#xbc3 . ?\e$A!I\e(B) | |
cf07d2bd DL |
895 | (#xbc4 . ?\e$,1zj\e(B) |
896 | (#xbc6 . ?_) | |
897 | (#xbca . ?\e$,1x8\e(B) | |
898 | (#xbcc . ?\e$,1|5\e(B) | |
899 | (#xbce . ?\e$,1yd\e(B) | |
6b61353c | 900 | (#xbcf . ?\e$A!p\e(B) |
cf07d2bd | 901 | (#xbd3 . ?\e$,1zh\e(B) |
6b61353c KH |
902 | (#xbd6 . ?\e$A!H\e(B) |
903 | (#xbd8 . ?\e$B"?\e(B) | |
904 | (#xbda . ?\e$B">\e(B) | |
cf07d2bd DL |
905 | (#xbdc . ?\e$,1yb\e(B) |
906 | (#xbfc . ?\e$,1yc\e(B) | |
907 | ;; Hebrew | |
908 | (#xcdf . ?\e,H_\e(B) | |
909 | (#xce0 . ?\e,H`\e(B) | |
910 | (#xce1 . ?\e,Ha\e(B) | |
911 | (#xce2 . ?\e,Hb\e(B) | |
912 | (#xce3 . ?\e,Hc\e(B) | |
913 | (#xce4 . ?\e,Hd\e(B) | |
914 | (#xce5 . ?\e,He\e(B) | |
915 | (#xce6 . ?\e,Hf\e(B) | |
916 | (#xce7 . ?\e,Hg\e(B) | |
917 | (#xce8 . ?\e,Hh\e(B) | |
918 | (#xce9 . ?\e,Hi\e(B) | |
919 | (#xcea . ?\e,Hj\e(B) | |
920 | (#xceb . ?\e,Hk\e(B) | |
921 | (#xcec . ?\e,Hl\e(B) | |
922 | (#xced . ?\e,Hm\e(B) | |
923 | (#xcee . ?\e,Hn\e(B) | |
924 | (#xcef . ?\e,Ho\e(B) | |
925 | (#xcf0 . ?\e,Hp\e(B) | |
926 | (#xcf1 . ?\e,Hq\e(B) | |
927 | (#xcf2 . ?\e,Hr\e(B) | |
928 | (#xcf3 . ?\e,Hs\e(B) | |
929 | (#xcf4 . ?\e,Ht\e(B) | |
930 | (#xcf5 . ?\e,Hu\e(B) | |
931 | (#xcf6 . ?\e,Hv\e(B) | |
932 | (#xcf7 . ?\e,Hw\e(B) | |
933 | (#xcf8 . ?\e,Hx\e(B) | |
934 | (#xcf9 . ?\e,Hy\e(B) | |
935 | (#xcfa . ?\e,Hz\e(B) | |
936 | ;; Thai | |
937 | (#xda1 . ?\e,T!\e(B) | |
938 | (#xda2 . ?\e,T"\e(B) | |
939 | (#xda3 . ?\e,T#\e(B) | |
940 | (#xda4 . ?\e,T$\e(B) | |
941 | (#xda5 . ?\e,T%\e(B) | |
942 | (#xda6 . ?\e,T&\e(B) | |
943 | (#xda7 . ?\e,T'\e(B) | |
944 | (#xda8 . ?\e,T(\e(B) | |
945 | (#xda9 . ?\e,T)\e(B) | |
946 | (#xdaa . ?\e,T*\e(B) | |
947 | (#xdab . ?\e,T+\e(B) | |
948 | (#xdac . ?\e,T,\e(B) | |
949 | (#xdad . ?\e,T-\e(B) | |
950 | (#xdae . ?\e,T.\e(B) | |
951 | (#xdaf . ?\e,T/\e(B) | |
952 | (#xdb0 . ?\e,T0\e(B) | |
953 | (#xdb1 . ?\e,T1\e(B) | |
954 | (#xdb2 . ?\e,T2\e(B) | |
955 | (#xdb3 . ?\e,T3\e(B) | |
956 | (#xdb4 . ?\e,T4\e(B) | |
957 | (#xdb5 . ?\e,T5\e(B) | |
958 | (#xdb6 . ?\e,T6\e(B) | |
959 | (#xdb7 . ?\e,T7\e(B) | |
960 | (#xdb8 . ?\e,T8\e(B) | |
961 | (#xdb9 . ?\e,T9\e(B) | |
962 | (#xdba . ?\e,T:\e(B) | |
963 | (#xdbb . ?\e,T;\e(B) | |
964 | (#xdbc . ?\e,T<\e(B) | |
965 | (#xdbd . ?\e,T=\e(B) | |
966 | (#xdbe . ?\e,T>\e(B) | |
967 | (#xdbf . ?\e,T?\e(B) | |
968 | (#xdc0 . ?\e,T@\e(B) | |
969 | (#xdc1 . ?\e,TA\e(B) | |
970 | (#xdc2 . ?\e,TB\e(B) | |
971 | (#xdc3 . ?\e,TC\e(B) | |
972 | (#xdc4 . ?\e,TD\e(B) | |
973 | (#xdc5 . ?\e,TE\e(B) | |
974 | (#xdc6 . ?\e,TF\e(B) | |
975 | (#xdc7 . ?\e,TG\e(B) | |
976 | (#xdc8 . ?\e,TH\e(B) | |
977 | (#xdc9 . ?\e,TI\e(B) | |
978 | (#xdca . ?\e,TJ\e(B) | |
979 | (#xdcb . ?\e,TK\e(B) | |
980 | (#xdcc . ?\e,TL\e(B) | |
981 | (#xdcd . ?\e,TM\e(B) | |
982 | (#xdce . ?\e,TN\e(B) | |
983 | (#xdcf . ?\e,TO\e(B) | |
984 | (#xdd0 . ?\e,TP\e(B) | |
985 | (#xdd1 . ?\e,TQ\e(B) | |
986 | (#xdd2 . ?\e,TR\e(B) | |
987 | (#xdd3 . ?\e,TS\e(B) | |
988 | (#xdd4 . ?\e,TT\e(B) | |
989 | (#xdd5 . ?\e,TU\e(B) | |
990 | (#xdd6 . ?\e,TV\e(B) | |
991 | (#xdd7 . ?\e,TW\e(B) | |
992 | (#xdd8 . ?\e,TX\e(B) | |
993 | (#xdd9 . ?\e,TY\e(B) | |
994 | (#xdda . ?\e,TZ\e(B) | |
995 | (#xddf . ?\e,T_\e(B) | |
996 | (#xde0 . ?\e,T`\e(B) | |
997 | (#xde1 . ?\e,Ta\e(B) | |
998 | (#xde2 . ?\e,Tb\e(B) | |
999 | (#xde3 . ?\e,Tc\e(B) | |
1000 | (#xde4 . ?\e,Td\e(B) | |
1001 | (#xde5 . ?\e,Te\e(B) | |
1002 | (#xde6 . ?\e,Tf\e(B) | |
1003 | (#xde7 . ?\e,Tg\e(B) | |
1004 | (#xde8 . ?\e,Th\e(B) | |
1005 | (#xde9 . ?\e,Ti\e(B) | |
1006 | (#xdea . ?\e,Tj\e(B) | |
1007 | (#xdeb . ?\e,Tk\e(B) | |
1008 | (#xdec . ?\e,Tl\e(B) | |
1009 | (#xded . ?\e,Tm\e(B) | |
1010 | (#xdf0 . ?\e,Tp\e(B) | |
1011 | (#xdf1 . ?\e,Tq\e(B) | |
1012 | (#xdf2 . ?\e,Tr\e(B) | |
1013 | (#xdf3 . ?\e,Ts\e(B) | |
1014 | (#xdf4 . ?\e,Tt\e(B) | |
1015 | (#xdf5 . ?\e,Tu\e(B) | |
1016 | (#xdf6 . ?\e,Tv\e(B) | |
1017 | (#xdf7 . ?\e,Tw\e(B) | |
1018 | (#xdf8 . ?\e,Tx\e(B) | |
1019 | (#xdf9 . ?\e,Ty\e(B) | |
1020 | ;; Korean | |
1021 | (#xea1 . ?\e$(C$!\e(B) | |
1022 | (#xea2 . ?\e$(C$"\e(B) | |
1023 | (#xea3 . ?\e$(C$#\e(B) | |
1024 | (#xea4 . ?\e$(C$$\e(B) | |
1025 | (#xea5 . ?\e$(C$%\e(B) | |
1026 | (#xea6 . ?\e$(C$&\e(B) | |
1027 | (#xea7 . ?\e$(C$'\e(B) | |
1028 | (#xea8 . ?\e$(C$(\e(B) | |
1029 | (#xea9 . ?\e$(C$)\e(B) | |
1030 | (#xeaa . ?\e$(C$*\e(B) | |
1031 | (#xeab . ?\e$(C$+\e(B) | |
1032 | (#xeac . ?\e$(C$,\e(B) | |
1033 | (#xead . ?\e$(C$-\e(B) | |
1034 | (#xeae . ?\e$(C$.\e(B) | |
1035 | (#xeaf . ?\e$(C$/\e(B) | |
1036 | (#xeb0 . ?\e$(C$0\e(B) | |
1037 | (#xeb1 . ?\e$(C$1\e(B) | |
1038 | (#xeb2 . ?\e$(C$2\e(B) | |
1039 | (#xeb3 . ?\e$(C$3\e(B) | |
1040 | (#xeb4 . ?\e$(C$4\e(B) | |
1041 | (#xeb5 . ?\e$(C$5\e(B) | |
1042 | (#xeb6 . ?\e$(C$6\e(B) | |
1043 | (#xeb7 . ?\e$(C$7\e(B) | |
1044 | (#xeb8 . ?\e$(C$8\e(B) | |
1045 | (#xeb9 . ?\e$(C$9\e(B) | |
1046 | (#xeba . ?\e$(C$:\e(B) | |
1047 | (#xebb . ?\e$(C$;\e(B) | |
1048 | (#xebc . ?\e$(C$<\e(B) | |
1049 | (#xebd . ?\e$(C$=\e(B) | |
1050 | (#xebe . ?\e$(C$>\e(B) | |
1051 | (#xebf . ?\e$(C$?\e(B) | |
1052 | (#xec0 . ?\e$(C$@\e(B) | |
1053 | (#xec1 . ?\e$(C$A\e(B) | |
1054 | (#xec2 . ?\e$(C$B\e(B) | |
1055 | (#xec3 . ?\e$(C$C\e(B) | |
1056 | (#xec4 . ?\e$(C$D\e(B) | |
1057 | (#xec5 . ?\e$(C$E\e(B) | |
1058 | (#xec6 . ?\e$(C$F\e(B) | |
1059 | (#xec7 . ?\e$(C$G\e(B) | |
1060 | (#xec8 . ?\e$(C$H\e(B) | |
1061 | (#xec9 . ?\e$(C$I\e(B) | |
1062 | (#xeca . ?\e$(C$J\e(B) | |
1063 | (#xecb . ?\e$(C$K\e(B) | |
1064 | (#xecc . ?\e$(C$L\e(B) | |
1065 | (#xecd . ?\e$(C$M\e(B) | |
1066 | (#xece . ?\e$(C$N\e(B) | |
1067 | (#xecf . ?\e$(C$O\e(B) | |
1068 | (#xed0 . ?\e$(C$P\e(B) | |
1069 | (#xed1 . ?\e$(C$Q\e(B) | |
1070 | (#xed2 . ?\e$(C$R\e(B) | |
1071 | (#xed3 . ?\e$(C$S\e(B) | |
1072 | (#xed4 . ?\e$,1LH\e(B) | |
1073 | (#xed5 . ?\e$,1LI\e(B) | |
1074 | (#xed6 . ?\e$,1LJ\e(B) | |
1075 | (#xed7 . ?\e$,1LK\e(B) | |
1076 | (#xed8 . ?\e$,1LL\e(B) | |
1077 | (#xed9 . ?\e$,1LM\e(B) | |
1078 | (#xeda . ?\e$,1LN\e(B) | |
1079 | (#xedb . ?\e$,1LO\e(B) | |
1080 | (#xedc . ?\e$,1LP\e(B) | |
1081 | (#xedd . ?\e$,1LQ\e(B) | |
1082 | (#xede . ?\e$,1LR\e(B) | |
1083 | (#xedf . ?\e$,1LS\e(B) | |
1084 | (#xee0 . ?\e$,1LT\e(B) | |
1085 | (#xee1 . ?\e$,1LU\e(B) | |
1086 | (#xee2 . ?\e$,1LV\e(B) | |
1087 | (#xee3 . ?\e$,1LW\e(B) | |
1088 | (#xee4 . ?\e$,1LX\e(B) | |
1089 | (#xee5 . ?\e$,1LY\e(B) | |
1090 | (#xee6 . ?\e$,1LZ\e(B) | |
1091 | (#xee7 . ?\e$,1L[\e(B) | |
1092 | (#xee8 . ?\e$,1L\\e(B) | |
1093 | (#xee9 . ?\e$,1L]\e(B) | |
1094 | (#xeea . ?\e$,1L^\e(B) | |
1095 | (#xeeb . ?\e$,1L_\e(B) | |
1096 | (#xeec . ?\e$,1L`\e(B) | |
1097 | (#xeed . ?\e$,1La\e(B) | |
1098 | (#xeee . ?\e$,1Lb\e(B) | |
1099 | (#xeef . ?\e$(C$]\e(B) | |
1100 | (#xef0 . ?\e$(C$a\e(B) | |
1101 | (#xef1 . ?\e$(C$h\e(B) | |
1102 | (#xef2 . ?\e$(C$o\e(B) | |
1103 | (#xef3 . ?\e$(C$q\e(B) | |
1104 | (#xef4 . ?\e$(C$t\e(B) | |
1105 | (#xef5 . ?\e$(C$v\e(B) | |
1106 | (#xef6 . ?\e$(C$}\e(B) | |
1107 | (#xef7 . ?\e$(C$~\e(B) | |
1108 | (#xef8 . ?\e$,1M+\e(B) | |
1109 | (#xef9 . ?\e$,1M0\e(B) | |
1110 | (#xefa . ?\e$,1M9\e(B) | |
1111 | (#xeff . ?\e$,1tI\e(B) | |
1112 | ;; Latin-5 | |
1113 | ;; Latin-6 | |
1114 | ;; Latin-7 | |
1115 | ;; Latin-8 | |
1116 | ;; Latin-9 | |
1117 | (#x13bc . ?\e,b<\e(B) | |
1118 | (#x13bd . ?\e,b=\e(B) | |
6b61353c | 1119 | (#x13be . ?\e,_/\e(B) |
cf07d2bd DL |
1120 | ;; Currency |
1121 | (#x20a0 . ?\e$,1t@\e(B) | |
1122 | (#x20a1 . ?\e$,1tA\e(B) | |
1123 | (#x20a2 . ?\e$,1tB\e(B) | |
1124 | (#x20a3 . ?\e$,1tC\e(B) | |
1125 | (#x20a4 . ?\e$,1tD\e(B) | |
1126 | (#x20a5 . ?\e$,1tE\e(B) | |
1127 | (#x20a6 . ?\e$,1tF\e(B) | |
1128 | (#x20a7 . ?\e$,1tG\e(B) | |
1129 | (#x20a8 . ?\e$,1tH\e(B) | |
1130 | (#x20aa . ?\e$,1tJ\e(B) | |
1131 | (#x20ab . ?\e$,1tK\e(B) | |
2aa2157b PE |
1132 | ;; Kana: Fixme: needs checking. Using Emacs to convert this to Unicode |
1133 | ;; and back changes this from "\e,b$\e(B" (i.e., bytes "ESC , b $ ESC ( B") to | |
1134 | ;; "\e,F$\e(B" (i.e., bytes "ESC , F $ ESC ( B"). | |
cf07d2bd DL |
1135 | (#x20ac . ?\e,b$\e(B))) |
1136 | (puthash (car pair) (cdr pair) x-keysym-table)) | |
1137 | ||
1138 | ;; The following keysym codes for graphics are listed in the document | |
1139 | ;; as not having unicodes available: | |
1140 | ||
1141 | ;; #x08b1 TOP LEFT SUMMATION Technical | |
1142 | ;; #x08b2 BOTTOM LEFT SUMMATION Technical | |
1143 | ;; #x08b3 TOP VERTICAL SUMMATION CONNECTOR Technical | |
1144 | ;; #x08b4 BOTTOM VERTICAL SUMMATION CONNECTOR Technical | |
1145 | ;; #x08b5 TOP RIGHT SUMMATION Technical | |
1146 | ;; #x08b6 BOTTOM RIGHT SUMMATION Technical | |
1147 | ;; #x08b7 RIGHT MIDDLE SUMMATION Technical | |
1148 | ;; #x0aac SIGNIFICANT BLANK SYMBOL Publish | |
1149 | ;; #x0abd DECIMAL POINT Publish | |
1150 | ;; #x0abf MARKER Publish | |
1151 | ;; #x0acb TRADEMARK SIGN IN CIRCLE Publish | |
1152 | ;; #x0ada HEXAGRAM Publish | |
1153 | ;; #x0aff CURSOR Publish | |
1154 | ;; #x0dde THAI MAIHANAKAT Thai | |
1155 | ||
2fb263f6 | 1156 | \f |
45240125 | 1157 | ;;;; Selections |
67c86cfc | 1158 | |
1c7c774b SM |
1159 | ;; We keep track of the last text selected here, so we can check the |
1160 | ;; current selection against it, and avoid passing back our own text | |
6d7cc563 | 1161 | ;; from x-selection-value. We track both |
5a89f0a7 | 1162 | ;; separately in case another X application only sets one of them |
6d7cc563 | 1163 | ;; we aren't fooled by the PRIMARY or CLIPBOARD selection staying the same. |
ae10d597 PJ |
1164 | (defvar x-last-selected-text-clipboard nil |
1165 | "The value of the CLIPBOARD X selection last time we selected or | |
1166 | pasted text.") | |
089bc712 | 1167 | (defvar x-last-selected-text-primary nil |
ae10d597 PJ |
1168 | "The value of the PRIMARY X selection last time we selected or |
1169 | pasted text.") | |
2666a6a5 | 1170 | |
2490cbbc | 1171 | (defcustom x-select-enable-primary nil |
73fe9da0 RS |
1172 | "Non-nil means cutting and pasting uses the primary selection." |
1173 | :type 'boolean | |
2490cbbc CY |
1174 | :group 'killing |
1175 | :version "24.1") | |
73fe9da0 | 1176 | |
53ef76c7 GM |
1177 | (defcustom x-select-request-type nil |
1178 | "Data type request for X selection. | |
0c861f59 | 1179 | The value is one of the following data types, a list of them, or nil: |
c7d9df18 KH |
1180 | `COMPOUND_TEXT', `UTF8_STRING', `STRING', `TEXT' |
1181 | ||
53ef76c7 | 1182 | If the value is one of the above symbols, try only the specified type. |
c7d9df18 KH |
1183 | |
1184 | If the value is a list of them, try each of them in the specified | |
0c861f59 | 1185 | order until succeed. |
c7d9df18 | 1186 | |
53ef76c7 GM |
1187 | The value nil is the same as the list (UTF8_STRING COMPOUND_TEXT STRING)." |
1188 | :type '(choice (const :tag "Default" nil) | |
1189 | (const COMPOUND_TEXT) | |
1190 | (const UTF8_STRING) | |
1191 | (const STRING) | |
1192 | (const TEXT) | |
1193 | (set :tag "List of values" | |
1194 | (const COMPOUND_TEXT) | |
1195 | (const UTF8_STRING) | |
1196 | (const STRING) | |
1197 | (const TEXT))) | |
1198 | :group 'killing) | |
c7d9df18 | 1199 | |
d8338794 | 1200 | ;; Get a selection value of type TYPE by calling x-get-selection with |
db9e401b | 1201 | ;; an appropriate DATA-TYPE argument decided by `x-select-request-type'. |
d8338794 KH |
1202 | ;; The return value is already decoded. If x-get-selection causes an |
1203 | ;; error, this function return nil. | |
1204 | ||
6d7cc563 | 1205 | (defun x-selection-value-internal (type) |
0c861f59 KH |
1206 | (let ((request-type (or x-select-request-type |
1207 | '(UTF8_STRING COMPOUND_TEXT STRING))) | |
a03c851c KH |
1208 | text) |
1209 | (if (consp request-type) | |
1210 | (while (and request-type (not text)) | |
1211 | (condition-case nil | |
1212 | (setq text (x-get-selection type (car request-type))) | |
1213 | (error nil)) | |
1214 | (setq request-type (cdr request-type))) | |
1215 | (condition-case nil | |
1216 | (setq text (x-get-selection type request-type)) | |
1217 | (error nil))) | |
c7d9df18 KH |
1218 | (if text |
1219 | (remove-text-properties 0 (length text) '(foreign-selection nil) text)) | |
1220 | text)) | |
5fd6d89f | 1221 | |
1c7c774b | 1222 | ;; Return the value of the current X selection. |
6d7cc563 | 1223 | ;; Consult the selection. Treat empty strings as if they were unset. |
1c7c774b SM |
1224 | ;; If this function is called twice and finds the same text, |
1225 | ;; it returns nil the second time. This is so that a single | |
1226 | ;; selection won't be added to the kill ring over and over. | |
6d7cc563 | 1227 | (defun x-selection-value () |
c7e36bd9 SM |
1228 | ;; With multi-tty, this function may be called from a tty frame. |
1229 | (when (eq (framep (selected-frame)) 'x) | |
6d7cc563 | 1230 | (let (clip-text primary-text) |
c7e36bd9 | 1231 | (when x-select-enable-clipboard |
6d7cc563 | 1232 | (setq clip-text (x-selection-value-internal 'CLIPBOARD)) |
c7e36bd9 SM |
1233 | (if (string= clip-text "") (setq clip-text nil)) |
1234 | ||
1235 | ;; Check the CLIPBOARD selection for 'newness', is it different | |
0b381c7e | 1236 | ;; from what we remembered them to be last time we did a |
c7e36bd9 SM |
1237 | ;; cut/paste operation. |
1238 | (setq clip-text | |
1239 | (cond ;; check clipboard | |
1240 | ((or (not clip-text) (string= clip-text "")) | |
1241 | (setq x-last-selected-text-clipboard nil)) | |
1242 | ((eq clip-text x-last-selected-text-clipboard) nil) | |
1243 | ((string= clip-text x-last-selected-text-clipboard) | |
1244 | ;; Record the newer string, | |
1245 | ;; so subsequent calls can use the `eq' test. | |
1246 | (setq x-last-selected-text-clipboard clip-text) | |
1247 | nil) | |
1248 | (t (setq x-last-selected-text-clipboard clip-text))))) | |
1249 | ||
73fe9da0 | 1250 | (when x-select-enable-primary |
6d7cc563 | 1251 | (setq primary-text (x-selection-value-internal 'PRIMARY)) |
73fe9da0 | 1252 | ;; Check the PRIMARY selection for 'newness', is it different |
0b381c7e | 1253 | ;; from what we remembered them to be last time we did a |
73fe9da0 RS |
1254 | ;; cut/paste operation. |
1255 | (setq primary-text | |
1256 | (cond ;; check primary selection | |
1257 | ((or (not primary-text) (string= primary-text "")) | |
1258 | (setq x-last-selected-text-primary nil)) | |
1259 | ((eq primary-text x-last-selected-text-primary) nil) | |
1260 | ((string= primary-text x-last-selected-text-primary) | |
1261 | ;; Record the newer string, | |
1262 | ;; so subsequent calls can use the `eq' test. | |
1263 | (setq x-last-selected-text-primary primary-text) | |
1264 | nil) | |
1265 | (t | |
1266 | (setq x-last-selected-text-primary primary-text))))) | |
c7e36bd9 | 1267 | |
c7e36bd9 SM |
1268 | ;; As we have done one selection, clear this now. |
1269 | (setq next-selection-coding-system nil) | |
1270 | ||
1271 | ;; At this point we have recorded the current values for the | |
6d7cc563 JD |
1272 | ;; selection from clipboard (if we are supposed to) and primary. |
1273 | ;; So return the first one that has changed | |
c7e36bd9 SM |
1274 | ;; (which is the first non-null one). |
1275 | ;; | |
1276 | ;; NOTE: There will be cases where more than one of these has | |
1277 | ;; changed and the new values differ. This indicates that | |
1278 | ;; something like the following has happened since the last time | |
1279 | ;; we looked at the selections: Application X set all the | |
6d7cc563 JD |
1280 | ;; selections, then Application Y set only one of them. |
1281 | ;; In this case since we don't have | |
c7e36bd9 SM |
1282 | ;; timestamps there is no way to know what the 'correct' value to |
1283 | ;; return is. The nice thing to do would be to tell the user we | |
1284 | ;; saw multiple possible selections and ask the user which was the | |
1285 | ;; one they wanted. | |
6d7cc563 | 1286 | (or clip-text primary-text) |
c7e36bd9 SM |
1287 | ))) |
1288 | ||
117c96c7 CY |
1289 | (define-obsolete-function-alias 'x-cut-buffer-or-selection-value |
1290 | 'x-selection-value "24.1") | |
1291 | ||
c7e36bd9 SM |
1292 | ;; Arrange for the kill and yank functions to set and check the clipboard. |
1293 | (setq interprogram-cut-function 'x-select-text) | |
6d7cc563 | 1294 | (setq interprogram-paste-function 'x-selection-value) |
492878e4 | 1295 | |
04e63796 JD |
1296 | ;; Make paste from other applications use the decoding in x-select-request-type |
1297 | ;; and not just STRING. | |
1298 | (defun x-get-selection-value () | |
1299 | "Get the current value of the PRIMARY selection. | |
1300 | Request data types in the order specified by `x-select-request-type'." | |
1301 | (x-selection-value-internal 'PRIMARY)) | |
1302 | ||
2a36494c KL |
1303 | (defun x-clipboard-yank () |
1304 | "Insert the clipboard contents, or the last stretch of killed text." | |
3f87f67e | 1305 | (interactive "*") |
6d7cc563 | 1306 | (let ((clipboard-text (x-selection-value-internal 'CLIPBOARD)) |
2a36494c KL |
1307 | (x-select-enable-clipboard t)) |
1308 | (if (and clipboard-text (> (length clipboard-text) 0)) | |
1309 | (kill-new clipboard-text)) | |
1310 | (yank))) | |
88046be2 | 1311 | |
aa360da1 GM |
1312 | (declare-function accelerate-menu "xmenu.c" (&optional frame) t) |
1313 | ||
12b6af5c | 1314 | (defun x-menu-bar-open (&optional frame) |
bbf0e7d9 | 1315 | "Open the menu bar if it is shown. |
e1894109 | 1316 | `popup-menu' is used if it is off." |
12b6af5c | 1317 | (interactive "i") |
bbf0e7d9 MY |
1318 | (cond |
1319 | ((and (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0))) | |
1320 | (fboundp 'accelerate-menu)) | |
1321 | (accelerate-menu frame)) | |
1322 | (t | |
e1894109 | 1323 | (popup-menu (mouse-menu-bar-map) last-nonmenu-event)))) |
553624bf | 1324 | |
2fb263f6 | 1325 | \f |
e9cda827 | 1326 | ;;; Window system initialization. |
84f1b454 | 1327 | |
3d80ef3f | 1328 | (defun x-win-suspend-error () |
54da3bdf CY |
1329 | ;; Don't allow suspending if any of the frames are X frames. |
1330 | (if (memq 'x (mapcar 'window-system (frame-list))) | |
1331 | (error "Cannot suspend Emacs while running under X"))) | |
c8c72d6b | 1332 | |
e9cda827 KL |
1333 | (defvar x-initialized nil |
1334 | "Non-nil if the X window system has been initialized.") | |
1335 | ||
aa360da1 GM |
1336 | (declare-function x-open-connection "xfns.c" |
1337 | (display &optional xrm-string must-succeed)) | |
1338 | (declare-function x-server-max-request-size "xfns.c" (&optional terminal)) | |
1339 | (declare-function x-get-resource "frame.c" | |
1340 | (attribute class &optional component subclass)) | |
f2d9c15f GM |
1341 | (declare-function x-parse-geometry "frame.c" (string)) |
1342 | (defvar x-resource-name) | |
1343 | (defvar x-display-name) | |
1344 | (defvar x-command-line-resources) | |
aa360da1 | 1345 | |
ebb19708 | 1346 | (defun x-initialize-window-system (&optional display) |
e9cda827 | 1347 | "Initialize Emacs for X frames and open the first connection to an X server." |
efc3dd3c DC |
1348 | (cl-assert (not x-initialized)) |
1349 | ||
e9cda827 KL |
1350 | ;; Make sure we have a valid resource name. |
1351 | (or (stringp x-resource-name) | |
1352 | (let (i) | |
1353 | (setq x-resource-name (invocation-name)) | |
1354 | ||
1355 | ;; Change any . or * characters in x-resource-name to hyphens, | |
1356 | ;; so as not to choke when we use it in X resource queries. | |
1357 | (while (setq i (string-match "[.*]" x-resource-name)) | |
1358 | (aset x-resource-name i ?-)))) | |
1359 | ||
ebb19708 | 1360 | (x-open-connection (or display |
36ab8612 | 1361 | (setq x-display-name (or (getenv "DISPLAY" (selected-frame)) |
f105f403 | 1362 | (getenv "DISPLAY")))) |
e9cda827 KL |
1363 | x-command-line-resources |
1364 | ;; Exit Emacs with fatal error if this fails and we | |
1365 | ;; are the initial display. | |
1366 | (eq initial-window-system 'x)) | |
1367 | ||
2d4e20ec KH |
1368 | ;; Create the default fontset. |
1369 | (create-default-fontset) | |
e9cda827 KL |
1370 | |
1371 | ;; Create the standard fontset. | |
2d4e20ec KH |
1372 | (condition-case err |
1373 | (create-fontset-from-fontset-spec standard-fontset-spec t) | |
db9e401b | 1374 | (error (display-warning |
2d4e20ec KH |
1375 | 'initialization |
1376 | (format "Creation of the standard fontset failed: %s" err) | |
1377 | :error))) | |
e9cda827 KL |
1378 | |
1379 | ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...). | |
1380 | (create-fontset-from-x-resource) | |
1381 | ||
65e86587 KL |
1382 | ;; Set scroll bar mode to right if set by X resources. Default is left. |
1383 | (if (equal (x-get-resource "verticalScrollBars" "ScrollBars") "right") | |
1384 | (customize-set-variable 'scroll-bar-mode 'right)) | |
1385 | ||
e9cda827 KL |
1386 | ;; Apply a geometry resource to the initial frame. Put it at the end |
1387 | ;; of the alist, so that anything specified on the command line takes | |
1388 | ;; precedence. | |
1389 | (let* ((res-geometry (x-get-resource "geometry" "Geometry")) | |
1390 | parsed) | |
1391 | (if res-geometry | |
1392 | (progn | |
1393 | (setq parsed (x-parse-geometry res-geometry)) | |
1394 | ;; If the resource specifies a position, | |
1395 | ;; call the position and size "user-specified". | |
1396 | (if (or (assq 'top parsed) (assq 'left parsed)) | |
1397 | (setq parsed (cons '(user-position . t) | |
1398 | (cons '(user-size . t) parsed)))) | |
1399 | ;; All geometry parms apply to the initial frame. | |
1400 | (setq initial-frame-alist (append initial-frame-alist parsed)) | |
f6959eb4 | 1401 | ;; The size parms apply to all frames. Don't set it if there are |
14bcc1e0 KL |
1402 | ;; sizes there already (from command line). |
1403 | (if (and (assq 'height parsed) | |
1404 | (not (assq 'height default-frame-alist))) | |
e9cda827 KL |
1405 | (setq default-frame-alist |
1406 | (cons (cons 'height (cdr (assq 'height parsed))) | |
1407 | default-frame-alist))) | |
14bcc1e0 KL |
1408 | (if (and (assq 'width parsed) |
1409 | (not (assq 'width default-frame-alist))) | |
e9cda827 KL |
1410 | (setq default-frame-alist |
1411 | (cons (cons 'width (cdr (assq 'width parsed))) | |
1412 | default-frame-alist)))))) | |
1413 | ||
1414 | ;; Check the reverseVideo resource. | |
1415 | (let ((case-fold-search t)) | |
1416 | (let ((rv (x-get-resource "reverseVideo" "ReverseVideo"))) | |
1417 | (if (and rv | |
1418 | (string-match "^\\(true\\|yes\\|on\\)$" rv)) | |
1419 | (setq default-frame-alist | |
1420 | (cons '(reverse . t) default-frame-alist))))) | |
63c86e17 | 1421 | |
e9cda827 | 1422 | ;; Set x-selection-timeout, measured in milliseconds. |
3c9dfce6 CY |
1423 | (let ((res-selection-timeout (x-get-resource "selectionTimeout" |
1424 | "SelectionTimeout"))) | |
1425 | (setq x-selection-timeout | |
1426 | (if res-selection-timeout | |
1427 | (string-to-number res-selection-timeout) | |
1428 | 5000))) | |
5cdb3f1e | 1429 | |
0b0d3e0b | 1430 | ;; Don't let Emacs suspend under X. |
e9cda827 | 1431 | (add-hook 'suspend-hook 'x-win-suspend-error) |
53631723 | 1432 | |
b04f3e61 CY |
1433 | ;; During initialization, we defer sending size hints to the window |
1434 | ;; manager, because that can induce a race condition: | |
1435 | ;; http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html | |
1436 | ;; Send the size hints once initialization is done. | |
1437 | (add-hook 'after-init-hook 'x-wm-set-size-hint) | |
1438 | ||
e9cda827 KL |
1439 | ;; Turn off window-splitting optimization; X is usually fast enough |
1440 | ;; that this is only annoying. | |
1441 | (setq split-window-keep-point t) | |
c3ef5084 | 1442 | |
e9cda827 KL |
1443 | ;; Motif direct handling of f10 wasn't working right, |
1444 | ;; So temporarily we've turned it off in lwlib-Xm.c | |
1445 | ;; and turned the Emacs f10 back on. | |
1446 | ;; ;; Motif normally handles f10 itself, so don't try to handle it a second time. | |
1447 | ;; (if (featurep 'motif) | |
1448 | ;; (global-set-key [f10] 'ignore)) | |
9541a441 | 1449 | |
2a36494c KL |
1450 | ;; Enable CLIPBOARD copy/paste through menu bar commands. |
1451 | (menu-bar-enable-clipboard) | |
6b61353c | 1452 | |
f9d71b42 CY |
1453 | ;; ;; Override Paste so it looks at CLIPBOARD first. |
1454 | ;; (define-key menu-bar-edit-menu [paste] | |
1455 | ;; (append '(menu-item "Paste" x-clipboard-yank | |
1456 | ;; :enable (not buffer-read-only) | |
1457 | ;; :help "Paste (yank) text most recently cut/copied") | |
1458 | ;; nil)) | |
6b61353c | 1459 | |
15cd8efd | 1460 | (x-apply-session-resources) |
e9cda827 | 1461 | (setq x-initialized t)) |
c3ef5084 | 1462 | |
efc3dd3c | 1463 | (add-to-list 'display-format-alist '("\\`[^:]*:[0-9]+\\(\\.[0-9]+\\)?\\'" . x)) |
e9cda827 KL |
1464 | (add-to-list 'handle-args-function-alist '(x . x-handle-args)) |
1465 | (add-to-list 'frame-creation-function-alist '(x . x-create-frame-with-faces)) | |
1466 | (add-to-list 'window-system-initialization-alist '(x . x-initialize-window-system)) | |
6b61353c KH |
1467 | |
1468 | ;; Initiate drag and drop | |
1469 | (add-hook 'after-make-frame-functions 'x-dnd-init-frame) | |
c0acb3ee | 1470 | (define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event) |
6b61353c | 1471 | |
dd314751 | 1472 | (defcustom x-gtk-stock-map |
e8e4d5c8 SS |
1473 | (mapcar (lambda (arg) |
1474 | (cons (purecopy (car arg)) (purecopy (cdr arg)))) | |
dd314751 | 1475 | '( |
5cb94d12 JD |
1476 | ("etc/images/new" . "gtk-new") |
1477 | ("etc/images/open" . "gtk-open") | |
5db55b9e | 1478 | ("etc/images/diropen" . "n:system-file-manager") |
5cb94d12 JD |
1479 | ("etc/images/close" . "gtk-close") |
1480 | ("etc/images/save" . "gtk-save") | |
1481 | ("etc/images/saveas" . "gtk-save-as") | |
1482 | ("etc/images/undo" . "gtk-undo") | |
1483 | ("etc/images/cut" . "gtk-cut") | |
1484 | ("etc/images/copy" . "gtk-copy") | |
1485 | ("etc/images/paste" . "gtk-paste") | |
1486 | ("etc/images/search" . "gtk-find") | |
1487 | ("etc/images/print" . "gtk-print") | |
1488 | ("etc/images/preferences" . "gtk-preferences") | |
1489 | ("etc/images/help" . "gtk-help") | |
1490 | ("etc/images/left-arrow" . "gtk-go-back") | |
1491 | ("etc/images/right-arrow" . "gtk-go-forward") | |
1492 | ("etc/images/home" . "gtk-home") | |
1493 | ("etc/images/jump-to" . "gtk-jump-to") | |
1494 | ("etc/images/index" . "gtk-index") | |
1495 | ("etc/images/search" . "gtk-find") | |
2e55c986 | 1496 | ("etc/images/exit" . "gtk-quit") |
c96a0d64 | 1497 | ("etc/images/cancel" . "gtk-cancel") |
418fddf5 | 1498 | ("etc/images/info" . "gtk-info") |
bdc398a9 | 1499 | ("etc/images/bookmark_add" . "n:bookmark_add") |
2e55c986 | 1500 | ;; Used in Gnus and/or MH-E: |
c96a0d64 JD |
1501 | ("etc/images/attach" . "gtk-attach") |
1502 | ("etc/images/connect" . "gtk-connect") | |
1503 | ("etc/images/contact" . "gtk-contact") | |
1504 | ("etc/images/delete" . "gtk-delete") | |
1505 | ("etc/images/describe" . "gtk-properties") | |
1506 | ("etc/images/disconnect" . "gtk-disconnect") | |
1507 | ;; ("etc/images/exit" . "gtk-exit") | |
1508 | ("etc/images/lock-broken" . "gtk-lock_broken") | |
1509 | ("etc/images/lock-ok" . "gtk-lock_ok") | |
1510 | ("etc/images/lock" . "gtk-lock") | |
1511 | ("etc/images/next-page" . "gtk-next-page") | |
1512 | ("etc/images/refresh" . "gtk-refresh") | |
1513 | ("etc/images/sort-ascending" . "gtk-sort-ascending") | |
1514 | ("etc/images/sort-column-ascending" . "gtk-sort-column-ascending") | |
1515 | ("etc/images/sort-criteria" . "gtk-sort-criteria") | |
1516 | ("etc/images/sort-descending" . "gtk-sort-descending") | |
1517 | ("etc/images/sort-row-ascending" . "gtk-sort-row-ascending") | |
1518 | ("images/gnus/toggle-subscription" . "gtk-task-recurring") | |
1519 | ("images/mail/compose" . "gtk-mail-compose") | |
1520 | ("images/mail/copy" . "gtk-mail-copy") | |
1521 | ("images/mail/forward" . "gtk-mail-forward") | |
1522 | ("images/mail/inbox" . "gtk-inbox") | |
1523 | ("images/mail/move" . "gtk-mail-move") | |
1524 | ("images/mail/not-spam" . "gtk-not-spam") | |
1525 | ("images/mail/outbox" . "gtk-outbox") | |
1526 | ("images/mail/reply-all" . "gtk-mail-reply-to-all") | |
1527 | ("images/mail/reply" . "gtk-mail-reply") | |
1528 | ("images/mail/save-draft" . "gtk-mail-handling") | |
1529 | ("images/mail/send" . "gtk-mail-send") | |
1530 | ("images/mail/spam" . "gtk-spam") | |
7ee6c59b NR |
1531 | ;; Used for GDB Graphical Interface |
1532 | ("images/gud/break" . "gtk-no") | |
1533 | ("images/gud/recstart" . "gtk-media-record") | |
1534 | ("images/gud/recstop" . "gtk-media-stop") | |
2e55c986 | 1535 | ;; No themed versions available: |
c96a0d64 JD |
1536 | ;; mail/preview (combining stock_mail and stock_zoom) |
1537 | ;; mail/save (combining stock_mail, stock_save and stock_convert) | |
6bdad9ae | 1538 | )) |
dd314751 | 1539 | "How icons for tool bars are mapped to Gtk+ stock items. |
5db55b9e JD |
1540 | Emacs must be compiled with the Gtk+ toolkit for this to have any effect. |
1541 | A value that begins with n: denotes a named icon instead of a stock icon." | |
7fbe8079 | 1542 | :version "22.2" |
2e55c986 RS |
1543 | :type '(choice (repeat (choice symbol |
1544 | (cons (string :tag "Emacs icon") | |
1545 | (string :tag "Stock/named"))))) | |
dd314751 JD |
1546 | :group 'x) |
1547 | ||
2e55c986 | 1548 | (defcustom icon-map-list '(x-gtk-stock-map) |
db9e401b | 1549 | "A list of alists that map icon file names to stock/named icons. |
5db55b9e JD |
1550 | The alists are searched in the order they appear. The first match is used. |
1551 | The keys in the alists are file names without extension and with two directory | |
1552 | components. For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm | |
1553 | to stock item gtk-open, use: | |
1554 | ||
1555 | (\"etc/images/open\" . \"gtk-open\") | |
1556 | ||
1557 | Themes also have named icons. To map to one of those, use n: before the name: | |
1558 | ||
1559 | (\"etc/images/diropen\" . \"n:system-file-manager\") | |
1560 | ||
2e55c986 RS |
1561 | The list elements are either the symbol name for the alist or the |
1562 | alist itself. | |
1563 | ||
1564 | If you don't want stock icons, set the variable to nil." | |
1565 | :version "22.2" | |
1566 | :type '(choice (const :tag "Don't use stock icons" nil) | |
1567 | (repeat (choice symbol | |
1568 | (cons (string :tag "Emacs icon") | |
1569 | (string :tag "Stock/named"))))) | |
1570 | :group 'x) | |
5db55b9e | 1571 | |
2543eb39 CY |
1572 | (defconst x-gtk-stock-cache (make-hash-table :weakness t :test 'equal)) |
1573 | ||
dd314751 | 1574 | (defun x-gtk-map-stock (file) |
2543eb39 CY |
1575 | "Map icon with file name FILE to a Gtk+ stock name. |
1576 | This uses `icon-map-list' to map icon file names to stock icon names." | |
1577 | (when (stringp file) | |
1578 | (or (gethash file x-gtk-stock-cache) | |
1579 | (puthash | |
1580 | file | |
1581 | (save-match-data | |
1582 | (let* ((file-sans (file-name-sans-extension file)) | |
1583 | (key (and (string-match "/\\([^/]+/[^/]+/[^/]+$\\)" | |
1584 | file-sans) | |
1585 | (match-string 1 file-sans))) | |
1586 | (icon-map icon-map-list) | |
1587 | elem value) | |
1588 | (while (and (null value) icon-map) | |
1589 | (setq elem (car icon-map) | |
1590 | value (assoc-string (or key file-sans) | |
1591 | (if (symbolp elem) | |
1592 | (symbol-value elem) | |
1593 | elem)) | |
1594 | icon-map (cdr icon-map))) | |
1595 | (and value (cdr value)))) | |
1596 | x-gtk-stock-cache)))) | |
dd314751 | 1597 | |
7c1bfecc | 1598 | (provide 'x-win) |
e380957e | 1599 | |
5cdb3f1e | 1600 | ;;; x-win.el ends here |