48091
|
1 ;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit;-*-
|
14170
|
2
|
95841
|
3 ;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
|
|
4 ;; 2008 Free Software Foundation, Inc.
|
2157
|
5
|
|
6 ;; Author: FSF
|
48091
|
7 ;; Keywords: terminals, i18n
|
2157
|
8
|
14170
|
9 ;; This file is part of GNU Emacs.
|
|
10
|
94671
|
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
|
14170
|
12 ;; it under the terms of the GNU General Public License as published by
|
94671
|
13 ;; the Free Software Foundation, either version 3 of the License, or
|
|
14 ;; (at your option) any later version.
|
14170
|
15
|
|
16 ;; GNU Emacs is distributed in the hope that it will be useful,
|
|
17 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
19 ;; GNU General Public License for more details.
|
|
20
|
|
21 ;; You should have received a copy of the GNU General Public License
|
94671
|
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
54
|
23
|
2157
|
24 ;;; Commentary:
|
54
|
25
|
83018
|
26 ;; X-win.el: this file defines functions to initialize the X window
|
|
27 ;; system and process X-specific command line parameters before
|
|
28 ;; creating the first X frame.
|
|
29
|
|
30 ;; Note that contrary to previous Emacs versions, the act of loading
|
|
31 ;; this file should not have the side effect of initializing the
|
|
32 ;; window system or processing command line arguments (this file is
|
|
33 ;; now loaded in loadup.el). See the variables
|
|
34 ;; `handle-args-function-alist' and
|
|
35 ;; `window-system-initialization-alist' for more details.
|
54
|
36
|
|
37 ;; startup.el will then examine startup files, and eventually call the hooks
|
48091
|
38 ;; which create the first window(s).
|
2157
|
39
|
|
40 ;;; Code:
|
54
|
41
|
|
42 ;; These are the standard X switches from the Xt Initialize.c file of
|
|
43 ;; Release 4.
|
|
44
|
|
45 ;; Command line Resource Manager string
|
|
46
|
|
47 ;; +rv *reverseVideo
|
|
48 ;; +synchronous *synchronous
|
|
49 ;; -background *background
|
|
50 ;; -bd *borderColor
|
|
51 ;; -bg *background
|
|
52 ;; -bordercolor *borderColor
|
|
53 ;; -borderwidth .borderWidth
|
|
54 ;; -bw .borderWidth
|
|
55 ;; -display .display
|
|
56 ;; -fg *foreground
|
|
57 ;; -fn *font
|
|
58 ;; -font *font
|
|
59 ;; -foreground *foreground
|
|
60 ;; -geometry .geometry
|
|
61 ;; -iconic .iconic
|
|
62 ;; -name .name
|
|
63 ;; -reverse *reverseVideo
|
|
64 ;; -rv *reverseVideo
|
|
65 ;; -selectionTimeout .selectionTimeout
|
|
66 ;; -synchronous *synchronous
|
|
67 ;; -xrm
|
|
68
|
|
69 ;; An alist of X options and the function which handles them. See
|
|
70 ;; ../startup.el.
|
|
71
|
83014
|
72 (if (not (fboundp 'x-create-frame))
|
4132
|
73 (error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
|
49599
|
74
|
779
|
75 (require 'frame)
|
467
|
76 (require 'mouse)
|
1972
|
77 (require 'scroll-bar)
|
2718
|
78 (require 'faces)
|
|
79 (require 'select)
|
2808
|
80 (require 'menu-bar)
|
49288
|
81 (require 'fontset)
|
53789
|
82 (require 'x-dnd)
|
273
|
83
|
3373
|
84 (defvar x-invocation-args)
|
65259
ba3854e2c98c
(x-keysym-table, x-selection-timeout, x-session-id, x-session-previous-id):
Juanma Barranquero <lekktu@gmail.com>
diff
changeset
|
85 (defvar x-keysym-table)
|
ba3854e2c98c
(x-keysym-table, x-selection-timeout, x-session-id, x-session-previous-id):
Juanma Barranquero <lekktu@gmail.com>
diff
changeset
|
86 (defvar x-selection-timeout)
|
ba3854e2c98c
(x-keysym-table, x-selection-timeout, x-session-id, x-session-previous-id):
Juanma Barranquero <lekktu@gmail.com>
diff
changeset
|
87 (defvar x-session-id)
|
ba3854e2c98c
(x-keysym-table, x-selection-timeout, x-session-id, x-session-previous-id):
Juanma Barranquero <lekktu@gmail.com>
diff
changeset
|
88 (defvar x-session-previous-id)
|
3373
|
89
|
78186
|
90 (defun x-handle-no-bitmap-icon (switch)
|
|
91 (setq default-frame-alist (cons '(icon-type) default-frame-alist)))
|
|
92
|
91628
|
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))
|
91655
|
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)))
|
91628
|
102
|
43820
|
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
|
51181
|
112 "Special hook run when a save-session event occurs.
|
|
113 The functions do not get any argument.
|
43820
|
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))
|
81343
|
124 (emacs-dir user-emacs-directory))
|
43820
|
125 (expand-file-name (if (file-directory-p emacs-dir)
|
|
126 (concat emacs-dir basename)
|
|
127 (concat "~/.emacs-" basename)))))
|
49599
|
128
|
43820
|
129 (defun emacs-session-save ()
|
|
130 "This function is called when the window system is shutting down.
|
|
131 If this function returns non-nil, the window system shutdown is cancelled.
|
|
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
|
|
137 lisp code to save the session state. The buffer is saved
|
|
138 in a file in the home directory of the user running Emacs. The file
|
|
139 is evaluated when Emacs is restarted by the session manager.
|
|
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
|
43869
606bb58da5c4
(emacs-session-save): Add comment that return t means cancel shutdown
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
150 ;; A return of t means cancel the shutdown.
|
49599
|
151 (run-hook-with-args-until-success
|
43820
|
152 'emacs-save-session-functions)
|
|
153 (error t))))
|
|
154 (unless cancel-shutdown
|
|
155 (write-file filename))
|
|
156 (kill-buffer buf)
|
|
157 cancel-shutdown))))
|
|
158
|
43866
|
159 (defun emacs-session-restore (previous-session-id)
|
43820
|
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."
|
43866
|
163 (let ((filename (emacs-session-filename previous-session-id)))
|
43820
|
164 (when (file-exists-p filename)
|
|
165 (load-file filename)
|
|
166 (delete-file filename)
|
|
167 (message "Restored session data"))))
|
|
168
|
49599
|
169
|
|
170
|
54
|
171
|
|
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)
|
83813
|
253 (defconst x-pointer-invisible 255)
|
96830
|
254
|
54
|
255
|
97422
|
256 (defvar x-colors)
|
|
257
|
26736
|
258 (defun xw-defined-colors (&optional frame)
|
|
259 "Internal function called by `defined-colors', which see."
|
11466
|
260 (or frame (setq frame (selected-frame)))
|
54
|
261 (let ((all-colors x-colors)
|
|
262 (this-color nil)
|
|
263 (defined-colors nil))
|
|
264 (while all-colors
|
|
265 (setq this-color (car all-colors)
|
|
266 all-colors (cdr all-colors))
|
27101
|
267 (and (color-supported-p this-color frame t)
|
54
|
268 (setq defined-colors (cons this-color defined-colors))))
|
|
269 defined-colors))
|
396
|
270
|
|
271 ;;;; Function keys
|
|
272
|
85104
|
273 (defvar x-alternatives-map
|
|
274 (let ((map (make-sparse-keymap)))
|
|
275 ;; Map certain keypad keys into ASCII characters that people usually expect.
|
|
276 (define-key map [backspace] [127])
|
|
277 (define-key map [delete] [127])
|
|
278 (define-key map [tab] [?\t])
|
|
279 (define-key map [linefeed] [?\n])
|
|
280 (define-key map [clear] [?\C-l])
|
|
281 (define-key map [return] [?\C-m])
|
|
282 (define-key map [escape] [?\e])
|
|
283 (define-key map [M-backspace] [?\M-\d])
|
|
284 (define-key map [M-delete] [?\M-\d])
|
|
285 (define-key map [M-tab] [?\M-\t])
|
|
286 (define-key map [M-linefeed] [?\M-\n])
|
|
287 (define-key map [M-clear] [?\M-\C-l])
|
|
288 (define-key map [M-return] [?\M-\C-m])
|
|
289 (define-key map [M-escape] [?\M-\e])
|
|
290 (define-key map [iso-lefttab] [backtab])
|
85111
|
291 (define-key map [S-iso-lefttab] [backtab])
|
85104
|
292 map)
|
|
293 "Keymap of possible alternative meanings for some keys.")
|
1546
|
294
|
83316
|
295 (defun x-setup-function-keys (frame)
|
|
296 "Set up `function-key-map' on FRAME for the X window system."
|
83503
ad1fbeffe3cb
Fix delete key after C-x 5 2 on X. (Catched by Dan Nicolaescu.)
Karoly Lorentey <lorentey@elte.hu>
diff
changeset
|
297 ;; Don't do this twice on the same display, or it would break
|
ad1fbeffe3cb
Fix delete key after C-x 5 2 on X. (Catched by Dan Nicolaescu.)
Karoly Lorentey <lorentey@elte.hu>
diff
changeset
|
298 ;; normal-erase-is-backspace-mode.
|
ad1fbeffe3cb
Fix delete key after C-x 5 2 on X. (Catched by Dan Nicolaescu.)
Karoly Lorentey <lorentey@elte.hu>
diff
changeset
|
299 (unless (terminal-parameter frame 'x-setup-function-keys)
|
ad1fbeffe3cb
Fix delete key after C-x 5 2 on X. (Catched by Dan Nicolaescu.)
Karoly Lorentey <lorentey@elte.hu>
diff
changeset
|
300 ;; Map certain keypad keys into ASCII characters that people usually expect.
|
ad1fbeffe3cb
Fix delete key after C-x 5 2 on X. (Catched by Dan Nicolaescu.)
Karoly Lorentey <lorentey@elte.hu>
diff
changeset
|
301 (with-selected-frame frame
|
85104
|
302 (let ((map (copy-keymap x-alternatives-map)))
|
|
303 (set-keymap-parent map (keymap-parent local-function-key-map))
|
|
304 (set-keymap-parent local-function-key-map map)))
|
83503
ad1fbeffe3cb
Fix delete key after C-x 5 2 on X. (Catched by Dan Nicolaescu.)
Karoly Lorentey <lorentey@elte.hu>
diff
changeset
|
305 (set-terminal-parameter frame 'x-setup-function-keys t)))
|
2145
|
306
|
|
307 ;; These tell read-char how to convert
|
|
308 ;; these special chars to ASCII.
|
|
309 (put 'backspace 'ascii-character 127)
|
|
310 (put 'delete 'ascii-character 127)
|
|
311 (put 'tab 'ascii-character ?\t)
|
|
312 (put 'linefeed 'ascii-character ?\n)
|
|
313 (put 'clear 'ascii-character 12)
|
|
314 (put 'return 'ascii-character 13)
|
|
315 (put 'escape 'ascii-character ?\e)
|
5515
|
316
|
48091
|
317
|
|
318 ;;;; Keysyms
|
|
319
|
11821
|
320 (defun vendor-specific-keysyms (vendor)
|
50075
cfb7d0684cf8
(vendor-specific-keysyms, x-last-selected-text-primary): Doc fixes.
John Paul Wallington <jpw@pobox.com>
diff
changeset
|
321 "Return the appropriate value of `system-key-alist' for VENDOR.
|
11821
|
322 VENDOR is a string containing the name of the X Server's vendor,
|
50075
cfb7d0684cf8
(vendor-specific-keysyms, x-last-selected-text-primary): Doc fixes.
John Paul Wallington <jpw@pobox.com>
diff
changeset
|
323 as returned by `x-server-vendor'."
|
87595
|
324 (cond ((or (string-equal vendor "Hewlett-Packard Incorporated")
|
11902
|
325 (string-equal vendor "Hewlett-Packard Company"))
|
11821
|
326 '(( 168 . mute-acute)
|
|
327 ( 169 . mute-grave)
|
|
328 ( 170 . mute-asciicircum)
|
|
329 ( 171 . mute-diaeresis)
|
|
330 ( 172 . mute-asciitilde)
|
|
331 ( 175 . lira)
|
|
332 ( 190 . guilder)
|
|
333 ( 252 . block)
|
|
334 ( 256 . longminus)
|
|
335 (65388 . reset)
|
|
336 (65389 . system)
|
|
337 (65390 . user)
|
|
338 (65391 . clearline)
|
|
339 (65392 . insertline)
|
|
340 (65393 . deleteline)
|
|
341 (65394 . insertchar)
|
|
342 (65395 . deletechar)
|
|
343 (65396 . backtab)
|
|
344 (65397 . kp-backtab)))
|
48091
|
345 ;; Fixme: What about non-X11/NeWS sun server?
|
12057
|
346 ((or (string-equal vendor "X11/NeWS - Sun Microsystems Inc.")
|
|
347 (string-equal vendor "X Consortium"))
|
12556
|
348 '((392976 . f36)
|
|
349 (392977 . f37)
|
11821
|
350 (393056 . req)
|
|
351 ;; These are for Sun under X11R6
|
|
352 (393072 . props)
|
|
353 (393073 . front)
|
|
354 (393074 . copy)
|
|
355 (393075 . open)
|
|
356 (393076 . paste)
|
|
357 (393077 . cut)))
|
|
358 (t
|
|
359 ;; This is used by DEC's X server.
|
|
360 '((65280 . remove)))))
|
|
361
|
89246
|
362 ;; Latin-1
|
48091
|
363 (let ((i 160))
|
|
364 (while (< i 256)
|
89240
|
365 (puthash i i x-keysym-table)
|
48091
|
366 (setq i (1+ i))))
|
|
367
|
|
368 ;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
|
|
369 ;; appendix to the X protocol definition.
|
|
370 (dolist
|
|
371 (pair
|
|
372 '(
|
|
373 ;; Latin-2
|
|
374 (#x1a1 . ?,B!(B)
|
|
375 (#x1a2 . ?,B"(B)
|
|
376 (#x1a3 . ?,B#(B)
|
|
377 (#x1a5 . ?,B%(B)
|
|
378 (#x1a6 . ?,B&(B)
|
|
379 (#x1a9 . ?,B)(B)
|
|
380 (#x1aa . ?,B*(B)
|
|
381 (#x1ab . ?,B+(B)
|
|
382 (#x1ac . ?,B,(B)
|
|
383 (#x1ae . ?,B.(B)
|
|
384 (#x1af . ?,B/(B)
|
|
385 (#x1b1 . ?,B1(B)
|
|
386 (#x1b2 . ?,B2(B)
|
|
387 (#x1b3 . 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
|
|
433 (#x2a6 . ?,C&(B)
|
|
434 (#x2a9 . ?,C)(B)
|
|
435 (#x2ab . ?,C+(B)
|
|
436 (#x2ac . ?,C,(B)
|
|
437 (#x2b1 . ?,C1(B)
|
|
438 (#x2b6 . ?,C6(B)
|
|
439 (#x2b9 . ?,C9(B)
|
|
440 (#x2bb . ?,C;(B)
|
|
441 (#x2bc . ?,C<(B)
|
|
442 (#x2c5 . ?,CE(B)
|
|
443 (#x2c6 . ?,CF(B)
|
|
444 (#x2d5 . ?,CU(B)
|
|
445 (#x2d8 . ?,CX(B)
|
|
446 (#x2dd . ?,C](B)
|
|
447 (#x2de . ?,C^(B)
|
|
448 (#x2e5 . ?,Ce(B)
|
|
449 (#x2e6 . ?,Cf(B)
|
|
450 (#x2f5 . ?,Cu(B)
|
|
451 (#x2f8 . ?,Cx(B)
|
|
452 (#x2fd . ?,C}(B)
|
|
453 (#x2fe . ?,C~(B)
|
|
454 ;; Latin-4
|
|
455 (#x3a2 . ?,D"(B)
|
|
456 (#x3a3 . ?,D#(B)
|
|
457 (#x3a5 . ?,D%(B)
|
|
458 (#x3a6 . ?,D&(B)
|
|
459 (#x3aa . ?,D*(B)
|
|
460 (#x3ab . ?,D+(B)
|
|
461 (#x3ac . ?,D,(B)
|
|
462 (#x3b3 . ?,D3(B)
|
|
463 (#x3b5 . ?,D5(B)
|
|
464 (#x3b6 . ?,D6(B)
|
|
465 (#x3ba . ?,D:(B)
|
|
466 (#x3bb . ?,D;(B)
|
|
467 (#x3bc . ?,D<(B)
|
|
468 (#x3bd . ?,D=(B)
|
|
469 (#x3bf . ?,D?(B)
|
|
470 (#x3c0 . ?,D@(B)
|
|
471 (#x3c7 . ?,DG(B)
|
|
472 (#x3cc . ?,DL(B)
|
|
473 (#x3cf . ?,DO(B)
|
|
474 (#x3d1 . ?,DQ(B)
|
|
475 (#x3d2 . ?,DR(B)
|
|
476 (#x3d3 . ?,DS(B)
|
|
477 (#x3d9 . ?,DY(B)
|
|
478 (#x3dd . ?,D](B)
|
|
479 (#x3de . ?,D^(B)
|
|
480 (#x3e0 . ?,D`(B)
|
|
481 (#x3e7 . ?,Dg(B)
|
|
482 (#x3ec . ?,Dl(B)
|
|
483 (#x3ef . ?,Do(B)
|
|
484 (#x3f1 . ?,Dq(B)
|
|
485 (#x3f2 . ?,Dr(B)
|
|
486 (#x3f3 . ?,Ds(B)
|
|
487 (#x3f9 . ?,Dy(B)
|
|
488 (#x3fd . ?,D}(B)
|
|
489 (#x3fe . ?,D~(B)
|
|
490 ;; Kana: Fixme: needs conversion to Japanese charset -- seems
|
|
491 ;; to require jisx0213, for which the Unicode translation
|
|
492 ;; isn't clear.
|
89909
|
493 (#x47e . ?(J~(B)
|
|
494 (#x4a1 . ?$A!#(B)
|
|
495 (#x4a2 . ?\$A!8(B)
|
|
496 (#x4a3 . ?\$A!9(B)
|
|
497 (#x4a4 . ?$A!"(B)
|
|
498 (#x4a5 . ?$A!$(B)
|
|
499 (#x4a6 . ?$A%r(B)
|
|
500 (#x4a7 . ?$A%!(B)
|
|
501 (#x4a8 . ?$A%#(B)
|
|
502 (#x4a9 . ?$A%%(B)
|
|
503 (#x4aa . ?$A%'(B)
|
|
504 (#x4ab . ?$A%)(B)
|
|
505 (#x4ac . ?$A%c(B)
|
|
506 (#x4ad . ?$A%e(B)
|
|
507 (#x4ae . ?$A%g(B)
|
|
508 (#x4af . ?$A%C(B)
|
|
509 (#x4b0 . ?$B!<(B)
|
|
510 (#x4b1 . ?$A%"(B)
|
|
511 (#x4b2 . ?$A%$(B)
|
|
512 (#x4b3 . ?$A%&(B)
|
|
513 (#x4b4 . ?$A%((B)
|
|
514 (#x4b5 . ?$A%*(B)
|
|
515 (#x4b6 . ?$A%+(B)
|
|
516 (#x4b7 . ?$A%-(B)
|
|
517 (#x4b8 . ?$A%/(B)
|
|
518 (#x4b9 . ?$A%1(B)
|
|
519 (#x4ba . ?$A%3(B)
|
|
520 (#x4bb . ?$A%5(B)
|
|
521 (#x4bc . ?$A%7(B)
|
|
522 (#x4bd . ?$A%9(B)
|
|
523 (#x4be . ?$A%;(B)
|
|
524 (#x4bf . ?$A%=(B)
|
|
525 (#x4c0 . ?$A%?(B)
|
|
526 (#x4c1 . ?$A%A(B)
|
|
527 (#x4c2 . ?$A%D(B)
|
|
528 (#x4c3 . ?$A%F(B)
|
|
529 (#x4c4 . ?$A%H(B)
|
|
530 (#x4c5 . ?$A%J(B)
|
|
531 (#x4c6 . ?$A%K(B)
|
|
532 (#x4c7 . ?$A%L(B)
|
|
533 (#x4c8 . ?$A%M(B)
|
|
534 (#x4c9 . ?$A%N(B)
|
|
535 (#x4ca . ?$A%O(B)
|
|
536 (#x4cb . ?$A%R(B)
|
|
537 (#x4cc . ?$A%U(B)
|
|
538 (#x4cd . ?$A%X(B)
|
|
539 (#x4ce . ?$A%[(B)
|
|
540 (#x4cf . ?$A%^(B)
|
|
541 (#x4d0 . ?$A%_(B)
|
|
542 (#x4d1 . ?$A%`(B)
|
|
543 (#x4d2 . ?$A%a(B)
|
|
544 (#x4d3 . ?$A%b(B)
|
|
545 (#x4d4 . ?$A%d(B)
|
|
546 (#x4d5 . ?$A%f(B)
|
|
547 (#x4d6 . ?$A%h(B)
|
|
548 (#x4d7 . ?$A%i(B)
|
|
549 (#x4d8 . ?$A%j(B)
|
|
550 (#x4d9 . ?$A%k(B)
|
|
551 (#x4da . ?$A%l(B)
|
|
552 (#x4db . ?$A%m(B)
|
|
553 (#x4dc . ?$A%o(B)
|
|
554 (#x4dd . ?$A%s(B)
|
|
555 (#x4de . ?$B!+(B)
|
|
556 (#x4df . ?$B!,(B)
|
48091
|
557 ;; Arabic
|
|
558 (#x5ac . ?,G,(B)
|
|
559 (#x5bb . ?,G;(B)
|
|
560 (#x5bf . ?,G?(B)
|
|
561 (#x5c1 . ?,GA(B)
|
|
562 (#x5c2 . ?,GB(B)
|
|
563 (#x5c3 . ?,GC(B)
|
|
564 (#x5c4 . ?,GD(B)
|
|
565 (#x5c5 . ?,GE(B)
|
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. ?$,1)\(B)
|
|
611 (#x684 . ?$,1)b(B)
|
|
612 (#x685 . ?$,1)n(B)
|
|
613 (#x686 . ?$,1)p(B)
|
|
614 (#x687 . ?$,1)r(B)
|
|
615 (#x688 . ?$,1)v(B)
|
|
616 (#x689 . ?$,1)x(B)
|
|
617 (#x68a . ?$,1)z(B)
|
|
618 (#x68c . ?$,1*8(B)
|
|
619 (#x68d . ?$,1*B(B)
|
|
620 (#x68e . ?$,1*H(B)
|
|
621 (#x68f . ?$,1*N(B)
|
|
622 (#x690 . ?$,1)S(B)
|
|
623 (#x691 . ?$,1)W(B)
|
|
624 (#x692 . ?$,1)[(B)
|
|
625 (#x693 . ?$,1)](B)
|
|
626 (#x694 . ?$,1)c(B)
|
|
627 (#x695 . ?$,1)o(B)
|
|
628 (#x696 . ?$,1)q(B)
|
|
629 (#x697 . ?$,1)s(B)
|
|
630 (#x698 . ?$,1)w(B)
|
|
631 (#x699 . ?$,1)y(B)
|
|
632 (#x69a . ?$,1){(B)
|
|
633 (#x69c . ?$,1*9(B)
|
|
634 (#x69d . ?$,1*C(B)
|
|
635 (#x69e . ?$,1*I(B)
|
|
636 (#x69f . ?$,1*O(B)
|
48091
|
637 (#x6a1 . ?,Lr(B)
|
|
638 (#x6a2 . ?,Ls(B)
|
|
639 (#x6a3 . ?,Lq(B)
|
|
640 (#x6a4 . ?,Lt(B)
|
|
641 (#x6a5 . ?,Lu(B)
|
|
642 (#x6a6 . ?,Lv(B)
|
|
643 (#x6a7 . ?,Lw(B)
|
|
644 (#x6a8 . ?,Lx(B)
|
|
645 (#x6a9 . ?,Ly(B)
|
|
646 (#x6aa . ?,Lz(B)
|
|
647 (#x6ab . ?,L{(B)
|
|
648 (#x6ac . ?,L|(B)
|
|
649 (#x6ae . ?,L~(B)
|
|
650 (#x6af . ?,L(B)
|
|
651 (#x6b0 . ?,Lp(B)
|
|
652 (#x6b1 . ?,L"(B)
|
|
653 (#x6b2 . ?,L#(B)
|
|
654 (#x6b3 . ?,L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0(B)
|
|
700 (#x6e2 . ?,L1(B)
|
|
701 (#x6e3 . ?,LF(B)
|
|
702 (#x6e4 . ?,L4(B)
|
|
703 (#x6e5 . ?,L5(B)
|
|
704 (#x6e6 . ?,LD(B)
|
|
705 (#x6e7 . ?,L3(B)
|
|
706 (#x6e8 . ?,LE(B)
|
|
707 (#x6e9 . ?,L8(B)
|
|
708 (#x6ea . ?,L9(B)
|
|
709 (#x6eb . ?,L:(B)
|
|
710 (#x6ec . ?,L;(B)
|
|
711 (#x6ed . ?,L<(B)
|
|
712 (#x6ee . ?,L=(B)
|
|
713 (#x6ef . ?,L>(B)
|
|
714 (#x6f0 . ?,L?(B)
|
|
715 (#x6f1 . ?,LO(B)
|
|
716 (#x6f2 . ?,L@(B)
|
|
717 (#x6f3 . ?,LA(B)
|
|
718 (#x6f4 . ?,LB(B)
|
|
719 (#x6f5 . ?,LC(B)
|
|
720 (#x6f6 . ?,L6(B)
|
|
721 (#x6f7 . ?,L2(B)
|
|
722 (#x6f8 . ?,LL(B)
|
|
723 (#x6f9 . ?,LK(B)
|
|
724 (#x6fa . ?,L7(B)
|
|
725 (#x6fb . ?,LH(B)
|
|
726 (#x6fc . ?,LM(B)
|
|
727 (#x6fd . ?,LI(B)
|
|
728 (#x6fe . ?,LG(B)
|
|
729 (#x6ff . ?,LJ(B)
|
|
730 ;; Greek
|
|
731 (#x7a1 . ?,F6(B)
|
|
732 (#x7a2 . ?,F8(B)
|
|
733 (#x7a3 . ?,F9(B)
|
|
734 (#x7a4 . ?,F:(B)
|
|
735 (#x7a5 . ?,FZ(B)
|
|
736 (#x7a7 . ?,F<(B)
|
|
737 (#x7a8 . ?,F>(B)
|
|
738 (#x7a9 . ?,F[(B)
|
|
739 (#x7ab . ?,F?(B)
|
|
740 (#x7ae . ?,F5(B)
|
|
741 (#x7af . ?,F/(B)
|
|
742 (#x7b1 . ?,F\(B)
|
|
743 (#x7b2 . ?,F](B)
|
|
744 (#x7b3 . ?,F^(B)
|
|
745 (#x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fm(B)
|
|
790 (#x7ee . ?,Fn(B)
|
|
791 (#x7ef . ?,Fo(B)
|
|
792 (#x7f0 . ?,Fp(B)
|
|
793 (#x7f1 . ?,Fq(B)
|
|
794 (#x7f2 . ?,Fs(B)
|
|
795 (#x7f3 . ?,Fr(B)
|
|
796 (#x7f4 . ?,Ft(B)
|
|
797 (#x7f5 . ?,Fu(B)
|
|
798 (#x7f6 . ?,Fv(B)
|
|
799 (#x7f7 . ?,Fw(B)
|
|
800 (#x7f8 . ?,Fx(B)
|
|
801 (#x7f9 . ?,Fy(B)
|
|
802 ;; Technical
|
|
803 (#x8a1 . ?$,1|W(B)
|
89909
|
804 (#x8a2 . ?$A)0(B)
|
|
805 (#x8a3 . ?$A)$(B)
|
48091
|
806 (#x8a4 . ?$,1{ (B)
|
|
807 (#x8a5 . ?$,1{!(B)
|
89909
|
808 (#x8a6 . ?$A)&(B)
|
48091
|
809 (#x8a7 . ?$,1|A(B)
|
|
810 (#x8a8 . ?$,1|C(B)
|
|
811 (#x8a9 . ?$,1|D(B)
|
|
812 (#x8aa . ?$,1|F(B)
|
|
813 (#x8ab . ?$,1|;(B)
|
|
814 (#x8ac . ?$,1|=(B)
|
|
815 (#x8ad . ?$,1|>(B)
|
|
816 (#x8ae . ?$,1|@(B)
|
|
817 (#x8af . ?$,1|H(B)
|
|
818 (#x8b0 . ?$,1|L(B)
|
89909
|
819 (#x8bc . ?$A!\(B)
|
|
820 (#x8bd . ?$A!Y(B)
|
|
821 (#x8be . ?$A!](B)
|
|
822 (#x8bf . ?$A!R(B)
|
|
823 (#x8c0 . ?$A!`(B)
|
|
824 (#x8c1 . ?$A!X(B)
|
|
825 (#x8c2 . ?$A!^(B)
|
|
826 (#x8c5 . ?$B"`(B)
|
|
827 (#x8c8 . ?$(G"D(B)
|
|
828 (#x8c9 . ?$(O"l(B)
|
|
829 (#x8cd . ?$B"N(B)
|
|
830 (#x8ce . ?$B"M(B)
|
|
831 (#x8cf . ?$A!T(B)
|
|
832 (#x8d6 . ?$A!L(B)
|
|
833 (#x8da . ?$B">(B)
|
|
834 (#x8db . ?$B"?(B)
|
|
835 (#x8dc . ?$A!I(B)
|
|
836 (#x8dd . ?$A!H(B)
|
|
837 (#x8de . ?$A!D(B)
|
|
838 (#x8df . ?$A!E(B)
|
|
839 (#x8ef . ?$B"_(B)
|
48091
|
840 (#x8f6 . ?$,1!R(B)
|
89909
|
841 (#x8fb . ?$A!{(B)
|
|
842 (#x8fc . ?$A!|(B)
|
|
843 (#x8fd . ?$A!z(B)
|
|
844 (#x8fe . ?$A!}(B)
|
48091
|
845 ;; Special
|
89909
|
846 (#x9e0 . ?$A!t(B)
|
|
847 (#x9e1 . ?$(C"F(B)
|
|
848 (#x9e2 . ?$(GB*(B)
|
|
849 (#x9e3 . ?$(GB-(B)
|
|
850 (#x9e4 . ?$(GB.(B)
|
|
851 (#x9e5 . ?$(GB+(B)
|
48091
|
852 (#x9e8 . ?$,1}d(B)
|
89909
|
853 (#x9e9 . ?$(GB,(B)
|
|
854 (#x9ea . ?$A)<(B)
|
|
855 (#x9eb . ?$A)4(B)
|
|
856 (#x9ec . ?$A)0(B)
|
|
857 (#x9ed . ?$A)8(B)
|
|
858 (#x9ee . ?$A)`(B)
|
48091
|
859 (#x9ef . ?$,1|Z(B)
|
|
860 (#x9f0 . ?$,1|[(B)
|
89909
|
861 (#x9f1 . ?$A)$(B)
|
48091
|
862 (#x9f2 . ?$,1|\(B)
|
|
863 (#x9f3 . ?$,1|](B)
|
89909
|
864 (#x9f4 . ?$A)@(B)
|
|
865 (#x9f5 . ?$A)H(B)
|
|
866 (#x9f6 . ?$A)X(B)
|
|
867 (#x9f7 . ?$A)P(B)
|
|
868 (#x9f8 . ?$A)&(B)
|
48091
|
869 ;; Publishing
|
|
870 (#xaa1 . ?$,1rc(B)
|
|
871 (#xaa2 . ?$,1rb(B)
|
|
872 (#xaa3 . ?$,1rd(B)
|
|
873 (#xaa4 . ?$,1re(B)
|
|
874 (#xaa5 . ?$,1rg(B)
|
|
875 (#xaa6 . ?$,1rh(B)
|
|
876 (#xaa7 . ?$,1ri(B)
|
|
877 (#xaa8 . ?$,1rj(B)
|
89909
|
878 (#xaa9 . ?$(G!7(B)
|
|
879 (#xaaa . ?$(G!9(B)
|
|
880 (#xaae . ?$A!-(B)
|
|
881 (#xaaf . ?$(G!-(B)
|
|
882 (#xab0 . ?$(O'x(B)
|
|
883 (#xab1 . ?$(O'y(B)
|
|
884 (#xab2 . ?$(O'z(B)
|
48091
|
885 (#xab3 . ?$,1v6(B)
|
|
886 (#xab4 . ?$,1v7(B)
|
|
887 (#xab5 . ?$,1v8(B)
|
|
888 (#xab6 . ?$,1v9(B)
|
|
889 (#xab7 . ?$,1v:(B)
|
89909
|
890 (#xab8 . ?$(G""(B)
|
48091
|
891 (#xabb . ?$,1rr(B)
|
|
892 (#xabc . ?$,1{)(B)
|
|
893 (#xabe . ?$,1{*(B)
|
89909
|
894 (#xac3 . ?$(C({(B)
|
|
895 (#xac4 . ?$(C(|(B)
|
|
896 (#xac5 . ?$(C(}(B)
|
|
897 (#xac6 . ?$(C(~(B)
|
|
898 (#xac9 . ?$(D"o(B)
|
48091
|
899 (#xaca . ?$,2"s(B)
|
89909
|
900 (#xacc . ?$(O##(B)
|
|
901 (#xacd . ?$(O#!(B)
|
|
902 (#xace . ?$A!p(B)
|
48091
|
903 (#xacf . ?$,2!o(B)
|
89909
|
904 (#xad0 . ?,F!(B)
|
|
905 (#xad1 . ?,F"(B)
|
|
906 (#xad2 . ?,Y4(B)
|
|
907 (#xad3 . ?,Y!(B)
|
48091
|
908 (#xad4 . ?$,1u^(B)
|
89909
|
909 (#xad6 . ?$A!d(B)
|
|
910 (#xad7 . ?$A!e(B)
|
48091
|
911 (#xad9 . ?$,2%](B)
|
|
912 (#xadb . ?$,2!l(B)
|
89909
|
913 (#xadc . ?$(O#$(B)
|
|
914 (#xadd . ?$(O#"(B)
|
|
915 (#xade . ?$A!q(B)
|
48091
|
916 (#xadf . ?$,2!n(B)
|
89909
|
917 (#xae0 . ?$(O#?(B)
|
48091
|
918 (#xae1 . ?$,2!k(B)
|
|
919 (#xae2 . ?$,2!m(B)
|
89909
|
920 (#xae3 . ?$A!w(B)
|
|
921 (#xae4 . ?$(G!}(B)
|
|
922 (#xae5 . ?$A!n(B)
|
|
923 (#xae6 . ?$(O#@(B)
|
48091
|
924 (#xae7 . ?$,2!j(B)
|
89909
|
925 (#xae8 . ?$A!x(B)
|
|
926 (#xae9 . ?$(G!~(B)
|
|
927 (#xaea . ?$(C"P(B)
|
|
928 (#xaeb . ?$(O-~(B)
|
|
929 (#xaec . ?$(O&@(B)
|
|
930 (#xaed . ?$(O&<(B)
|
|
931 (#xaee . ?$(O&>(B)
|
48091
|
932 (#xaf0 . ?$,2%`(B)
|
89909
|
933 (#xaf1 . ?$B"w(B)
|
|
934 (#xaf2 . ?$B"x(B)
|
|
935 (#xaf3 . ?$(O'{(B)
|
48091
|
936 (#xaf4 . ?$,2%W(B)
|
89909
|
937 (#xaf5 . ?$B"t(B)
|
|
938 (#xaf6 . ?$B"u(B)
|
|
939 (#xaf7 . ?$A!a(B)
|
|
940 (#xaf8 . ?$A!b(B)
|
|
941 (#xaf9 . ?$(O&g(B)
|
48091
|
942 (#xafa . ?$,1zu(B)
|
|
943 (#xafb . ?$,1uW(B)
|
|
944 (#xafc . ?$,1s8(B)
|
|
945 (#xafd . ?$,1rz(B)
|
89909
|
946 (#xafe . ?,Y%(B)
|
48091
|
947 ;; APL
|
|
948 (#xba3 . ?<)
|
|
949 (#xba6 . ?>)
|
89909
|
950 (#xba8 . ?$A!E(B)
|
|
951 (#xba9 . ?$A!D(B)
|
48091
|
952 (#xbc0 . ?,A/(B)
|
89909
|
953 (#xbc2 . ?$A!M(B)
|
|
954 (#xbc3 . ?$A!I(B)
|
48091
|
955 (#xbc4 . ?$,1zj(B)
|
|
956 (#xbc6 . ?_)
|
|
957 (#xbca . ?$,1x8(B)
|
|
958 (#xbcc . ?$,1|5(B)
|
|
959 (#xbce . ?$,1yd(B)
|
89909
|
960 (#xbcf . ?$A!p(B)
|
48091
|
961 (#xbd3 . ?$,1zh(B)
|
89909
|
962 (#xbd6 . ?$A!H(B)
|
|
963 (#xbd8 . ?$B"?(B)
|
|
964 (#xbda . ?$B">(B)
|
48091
|
965 (#xbdc . ?$,1yb(B)
|
|
966 (#xbfc . ?$,1yc(B)
|
|
967 ;; Hebrew
|
|
968 (#xcdf . ?,H_(B)
|
|
969 (#xce0 . ?,H`(B)
|
|
970 (#xce1 . ?,Ha(B)
|
|
971 (#xce2 . ?,Hb(B)
|
|
972 (#xce3 . ?,Hc(B)
|
|
973 (#xce4 . ?,Hd(B)
|
|
974 (#xce5 . ?,He(B)
|
|
975 (#xce6 . ?,Hf(B)
|
|
976 (#xce7 . ?,Hg(B)
|
|
977 (#xce8 . ?,Hh(B)
|
|
978 (#xce9 . ?,Hi(B)
|
|
979 (#xcea . ?,Hj(B)
|
|
980 (#xceb . ?,Hk(B)
|
|
981 (#xcec . ?,Hl(B)
|
|
982 (#xced . ?,Hm(B)
|
|
983 (#xcee . ?,Hn(B)
|
|
984 (#xcef . ?,Ho(B)
|
|
985 (#xcf0 . ?,Hp(B)
|
|
986 (#xcf1 . ?,Hq(B)
|
|
987 (#xcf2 . ?,Hr(B)
|
|
988 (#xcf3 . ?,Hs(B)
|
|
989 (#xcf4 . ?,Ht(B)
|
|
990 (#xcf5 . ?,Hu(B)
|
|
991 (#xcf6 . ?,Hv(B)
|
|
992 (#xcf7 . ?,Hw(B)
|
|
993 (#xcf8 . ?,Hx(B)
|
|
994 (#xcf9 . ?,Hy(B)
|
|
995 (#xcfa . ?,Hz(B)
|
|
996 ;; Thai
|
|
997 (#xda1 . ?,T!(B)
|
|
998 (#xda2 . ?,T"(B)
|
|
999 (#xda3 . ?,T#(B)
|
|
1000 (#xda4 . ?,T$(B)
|
|
1001 (#xda5 . ?,T%(B)
|
|
1002 (#xda6 . ?,T&(B)
|
|
1003 (#xda7 . ?,T'(B)
|
|
1004 (#xda8 . ?,T((B)
|
|
1005 (#xda9 . ?,T)(B)
|
|
1006 (#xdaa . ?,T*(B)
|
|
1007 (#xdab . ?,T+(B)
|
|
1008 (#xdac . ?,T,(B)
|
|
1009 (#xdad . ?,T-(B)
|
|
1010 (#xdae . ?,T.(B)
|
|
1011 (#xdaf . ?,T/(B)
|
|
1012 (#xdb0 . ?,T0(B)
|
|
1013 (#xdb1 . ?,T1(B)
|
|
1014 (#xdb2 . ?,T2(B)
|
|
1015 (#xdb3 . ?,T3(B)
|
|
1016 (#xdb4 . ?,T4(B)
|
|
1017 (#xdb5 . ?,T5(B)
|
|
1018 (#xdb6 . ?,T6(B)
|
|
1019 (#xdb7 . ?,T7(B)
|
|
1020 (#xdb8 . ?,T8(B)
|
|
1021 (#xdb9 . ?,T9(B)
|
|
1022 (#xdba . ?,T:(B)
|
|
1023 (#xdbb . ?,T;(B)
|
|
1024 (#xdbc . ?,T<(B)
|
|
1025 (#xdbd . ?,T=(B)
|
|
1026 (#xdbe . ?,T>(B)
|
|
1027 (#xdbf . ?,T?(B)
|
|
1028 (#xdc0 . ?,T@(B)
|
|
1029 (#xdc1 . ?,TA(B)
|
|
1030 (#xdc2 . ?,TB(B)
|
|
1031 (#xdc3 . ?,TC(B)
|
|
1032 (#xdc4 . ?,TD(B)
|
|
1033 (#xdc5 . ?,TE(B)
|
|
1034 (#xdc6 . ?,TF(B)
|
|
1035 (#xdc7 . ?,TG(B)
|
|
1036 (#xdc8 . ?,TH(B)
|
|
1037 (#xdc9 . ?,TI(B)
|
|
1038 (#xdca . ?,TJ(B)
|
|
1039 (#xdcb . ?,TK(B)
|
|
1040 (#xdcc . ?,TL(B)
|
|
1041 (#xdcd . ?,TM(B)
|
|
1042 (#xdce . ?,TN(B)
|
|
1043 (#xdcf . ?,TO(B)
|
|
1044 (#xdd0 . ?,TP(B)
|
|
1045 (#xdd1 . ?,TQ(B)
|
|
1046 (#xdd2 . ?,TR(B)
|
|
1047 (#xdd3 . ?,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. ?$(C$*(B)
|
|
1091 (#xeab . ?$(C$+(B)
|
|
1092 (#xeac . ?$(C$,(B)
|
|
1093 (#xead . ?$(C$-(B)
|
|
1094 (#xeae . ?$(C$.(B)
|
|
1095 (#xeaf . ?$(C$/(B)
|
|
1096 (#xeb0 . ?$(C$0(B)
|
|
1097 (#xeb1 . ?$(C$1(B)
|
|
1098 (#xeb2 . ?$(C$2(B)
|
|
1099 (#xeb3 . ?$(C$3(B)
|
|
1100 (#xeb4 . ?$(C$4(B)
|
|
1101 (#xeb5 . ?$(C$5(B)
|
|
1102 (#xeb6 . ?$(C$6(B)
|
|
1103 (#xeb7 . ?$(C$7(B)
|
|
1104 (#xeb8 . ?$(C$8(B)
|
|
1105 (#xeb9 . ?$(C$9(B)
|
|
1106 (#xeba . ?$(C$:(B)
|
|
1107 (#xebb . ?$(C$;(B)
|
|
1108 (#xebc . ?$(C$<(B)
|
|
1109 (#xebd . ?$(C$=(B)
|
|
1110 (#xebe . ?$(C$>(B)
|
|
1111 (#xebf . ?$(C$?(B)
|
|
1112 (#xec0 . ?$(C$@(B)
|
|
1113 (#xec1 . ?$(C$A(B)
|
|
1114 (#xec2 . ?$(C$B(B)
|
|
1115 (#xec3 . ?$(C$C(B)
|
|
1116 (#xec4 . ?$(C$D(B)
|
|
1117 (#xec5 . ?$(C$E(B)
|
|
1118 (#xec6 . ?$(C$F(B)
|
|
1119 (#xec7 . ?$(C$G(B)
|
|
1120 (#xec8 . ?$(C$H(B)
|
|
1121 (#xec9 . ?$(C$I(B)
|
|
1122 (#xeca . ?$(C$J(B)
|
|
1123 (#xecb . ?$(C$K(B)
|
|
1124 (#xecc . ?$(C$L(B)
|
|
1125 (#xecd . ?$(C$M(B)
|
|
1126 (#xece . ?$(C$N(B)
|
|
1127 (#xecf . ?$(C$O(B)
|
|
1128 (#xed0 . ?$(C$P(B)
|
|
1129 (#xed1 . ?$(C$Q(B)
|
|
1130 (#xed2 . ?$(C$R(B)
|
|
1131 (#xed3 . ?$(C$S(B)
|
|
1132 (#xed4 . ?$,1LH(B)
|
|
1133 (#xed5 . ?$,1LI(B)
|
|
1134 (#xed6 . ?$,1LJ(B)
|
|
1135 (#xed7 . ?$,1LK(B)
|
|
1136 (#xed8 . ?$,1LL(B)
|
|
1137 (#xed9 . ?$,1LM(B)
|
|
1138 (#xeda . ?$,1LN(B)
|
|
1139 (#xedb . ?$,1LO(B)
|
|
1140 (#xedc . ?$,1LP(B)
|
|
1141 (#xedd . ?$,1LQ(B)
|
|
1142 (#xede . ?$,1LR(B)
|
|
1143 (#xedf . ?$,1LS(B)
|
|
1144 (#xee0 . ?$,1LT(B)
|
|
1145 (#xee1 . ?$,1LU(B)
|
|
1146 (#xee2 . ?$,1LV(B)
|
|
1147 (#xee3 . ?$,1LW(B)
|
|
1148 (#xee4 . ?$,1LX(B)
|
|
1149 (#xee5 . ?$,1LY(B)
|
|
1150 (#xee6 . ?$,1LZ(B)
|
|
1151 (#xee7 . ?$,1L[(B)
|
|
1152 (#xee8 . ?$,1L\(B)
|
|
1153 (#xee9 . ?$,1L](B)
|
|
1154 (#xeea . ?$,1L^(B)
|
|
1155 (#xeeb . ?$,1L_(B)
|
|
1156 (#xeec . ?$,1L`(B)
|
|
1157 (#xeed . ?$,1La(B)
|
|
1158 (#xeee . ?$,1Lb(B)
|
|
1159 (#xeef . ?$(C$](B)
|
|
1160 (#xef0 . ?$(C$a(B)
|
|
1161 (#xef1 . ?$(C$h(B)
|
|
1162 (#xef2 . ?$(C$o(B)
|
|
1163 (#xef3 . ?$(C$q(B)
|
|
1164 (#xef4 . ?$(C$t(B)
|
|
1165 (#xef5 . ?$(C$v(B)
|
|
1166 (#xef6 . ?$(C$}(B)
|
|
1167 (#xef7 . ?$(C$~(B)
|
|
1168 (#xef8 . ?$,1M+(B)
|
|
1169 (#xef9 . ?$,1M0(B)
|
|
1170 (#xefa . ?$,1M9(B)
|
|
1171 (#xeff . ?$,1tI(B)
|
|
1172 ;; Latin-5
|
|
1173 ;; Latin-6
|
|
1174 ;; Latin-7
|
|
1175 ;; Latin-8
|
|
1176 ;; Latin-9
|
|
1177 (#x13bc . ?,b<(B)
|
|
1178 (#x13bd . ?,b=(B)
|
89909
|
1179 (#x13be . ?,_/(B)
|
48091
|
1180 ;; Currency
|
|
1181 (#x20a0 . ?$,1t@(B)
|
|
1182 (#x20a1 . ?$,1tA(B)
|
|
1183 (#x20a2 . ?$,1tB(B)
|
|
1184 (#x20a3 . ?$,1tC(B)
|
|
1185 (#x20a4 . ?$,1tD(B)
|
|
1186 (#x20a5 . ?$,1tE(B)
|
|
1187 (#x20a6 . ?$,1tF(B)
|
|
1188 (#x20a7 . ?$,1tG(B)
|
|
1189 (#x20a8 . ?$,1tH(B)
|
|
1190 (#x20aa . ?$,1tJ(B)
|
|
1191 (#x20ab . ?$,1tK(B)
|
|
1192 (#x20ac . ?,b$(B)))
|
|
1193 (puthash (car pair) (cdr pair) x-keysym-table))
|
|
1194
|
|
1195 ;; The following keysym codes for graphics are listed in the document
|
|
1196 ;; as not having unicodes available:
|
|
1197
|
|
1198 ;; #x08b1 TOP LEFT SUMMATION Technical
|
|
1199 ;; #x08b2 BOTTOM LEFT SUMMATION Technical
|
|
1200 ;; #x08b3 TOP VERTICAL SUMMATION CONNECTOR Technical
|
|
1201 ;; #x08b4 BOTTOM VERTICAL SUMMATION CONNECTOR Technical
|
|
1202 ;; #x08b5 TOP RIGHT SUMMATION Technical
|
|
1203 ;; #x08b6 BOTTOM RIGHT SUMMATION Technical
|
|
1204 ;; #x08b7 RIGHT MIDDLE SUMMATION Technical
|
|
1205 ;; #x0aac SIGNIFICANT BLANK SYMBOL Publish
|
|
1206 ;; #x0abd DECIMAL POINT Publish
|
|
1207 ;; #x0abf MARKER Publish
|
|
1208 ;; #x0acb TRADEMARK SIGN IN CIRCLE Publish
|
|
1209 ;; #x0ada HEXAGRAM Publish
|
|
1210 ;; #x0aff CURSOR Publish
|
|
1211 ;; #x0dde THAI MAIHANAKAT Thai
|
|
1212
|
54
|
1213
|
1546
|
1214 ;;;; Selections and cut buffers
|
707
|
1215
|
66640
|
1216 ;; We keep track of the last text selected here, so we can check the
|
|
1217 ;; current selection against it, and avoid passing back our own text
|
|
1218 ;; from x-cut-buffer-or-selection-value. We track all three
|
|
1219 ;; seperately in case another X application only sets one of them
|
|
1220 ;; (say the cut buffer) we aren't fooled by the PRIMARY or
|
|
1221 ;; CLIPBOARD selection staying the same.
|
44807
ca555c0c4e07
(x-select-text, x-cut-buffer-or-selection-value): Check if any of the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
1222 (defvar x-last-selected-text-clipboard nil
|
ca555c0c4e07
(x-select-text, x-cut-buffer-or-selection-value): Check if any of the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
1223 "The value of the CLIPBOARD X selection last time we selected or
|
ca555c0c4e07
(x-select-text, x-cut-buffer-or-selection-value): Check if any of the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
1224 pasted text.")
|
50075
cfb7d0684cf8
(vendor-specific-keysyms, x-last-selected-text-primary): Doc fixes.
John Paul Wallington <jpw@pobox.com>
diff
changeset
|
1225 (defvar x-last-selected-text-primary nil
|
44807
ca555c0c4e07
(x-select-text, x-cut-buffer-or-selection-value): Check if any of the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
1226 "The value of the PRIMARY X selection last time we selected or
|
ca555c0c4e07
(x-select-text, x-cut-buffer-or-selection-value): Check if any of the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
1227 pasted text.")
|
50075
cfb7d0684cf8
(vendor-specific-keysyms, x-last-selected-text-primary): Doc fixes.
John Paul Wallington <jpw@pobox.com>
diff
changeset
|
1228 (defvar x-last-selected-text-cut nil
|
58695
|
1229 "The value of the X cut buffer last time we selected or pasted text.
|
|
1230 The actual text stored in the X cut buffer is what encoded from this value.")
|
|
1231 (defvar x-last-selected-text-cut-encoded nil
|
|
1232 "The value of the X cut buffer last time we selected or pasted text.
|
|
1233 This is the actual text stored in the X cut buffer.")
|
74094
|
1234 (defvar x-last-cut-buffer-coding 'iso-latin-1
|
|
1235 "The coding we last used to encode/decode the text from the X cut buffer")
|
727
|
1236
|
66640
|
1237 (defvar x-cut-buffer-max 20000 ; Note this value is overridden below.
|
|
1238 "Max number of characters to put in the cut buffer.
|
|
1239 It is said that overlarge strings are slow to put into the cut buffer.")
|
4236
|
1240
|
33917
|
1241 (defcustom x-select-enable-clipboard nil
|
6698
|
1242 "Non-nil means cutting and pasting uses the clipboard.
|
33917
|
1243 This is in addition to, but in preference to, the primary selection."
|
|
1244 :type 'boolean
|
|
1245 :group 'killing)
|
6698
|
1246
|
87385
|
1247 (defcustom x-select-enable-primary t
|
|
1248 "Non-nil means cutting and pasting uses the primary selection."
|
|
1249 :type 'boolean
|
|
1250 :group 'killing)
|
|
1251
|
3036
|
1252 (defun x-select-text (text &optional push)
|
66640
|
1253 "Make TEXT, a string, the primary X selection.
|
|
1254 Also, set the value of X cut buffer 0, for backward compatibility
|
|
1255 with older X applications.
|
|
1256 gildea@stop.mail-abuse.org says it's not desirable to put kills
|
|
1257 in the clipboard."
|
85995
|
1258 ;; With multi-tty, this function may be called from a tty frame.
|
|
1259 (when (eq (framep (selected-frame)) 'x)
|
|
1260 ;; Don't send the cut buffer too much text.
|
|
1261 ;; It becomes slow, and if really big it causes errors.
|
|
1262 (cond ((>= (length text) x-cut-buffer-max)
|
|
1263 (x-set-cut-buffer "" push)
|
|
1264 (setq x-last-selected-text-cut ""
|
|
1265 x-last-selected-text-cut-encoded ""))
|
|
1266 (t
|
|
1267 (setq x-last-selected-text-cut text
|
|
1268 x-last-cut-buffer-coding 'iso-latin-1
|
|
1269 x-last-selected-text-cut-encoded
|
|
1270 ;; ICCCM says cut buffer always contain ISO-Latin-1
|
|
1271 (encode-coding-string text 'iso-latin-1))
|
|
1272 (x-set-cut-buffer x-last-selected-text-cut-encoded push)))
|
87385
|
1273 (when x-select-enable-primary
|
|
1274 (x-set-selection 'PRIMARY text)
|
|
1275 (setq x-last-selected-text-primary text))
|
85995
|
1276 (when x-select-enable-clipboard
|
|
1277 (x-set-selection 'CLIPBOARD text)
|
|
1278 (setq x-last-selected-text-clipboard text))))
|
643
|
1279
|
51601
|
1280 (defvar x-select-request-type nil
|
|
1281 "*Data type request for X selection.
|
91106
|
1282 The value is one of the following data types, a list of them, or nil:
|
51601
|
1283 `COMPOUND_TEXT', `UTF8_STRING', `STRING', `TEXT'
|
|
1284
|
|
1285 If the value is one of the above symbols, try only the specified
|
|
1286 type.
|
|
1287
|
|
1288 If the value is a list of them, try each of them in the specified
|
91106
|
1289 order until succeed.
|
51601
|
1290
|
91106
|
1291 The value nil is the same as this list:
|
|
1292 \(UTF8_STRING COMPOUND_TEXT STRING)
|
|
1293 ")
|
51601
|
1294
|
63191
|
1295 ;; Get a selection value of type TYPE by calling x-get-selection with
|
91101
|
1296 ;; an appropiate DATA-TYPE argument decided by `x-select-request-type'.
|
63191
|
1297 ;; The return value is already decoded. If x-get-selection causes an
|
|
1298 ;; error, this function return nil.
|
|
1299
|
51601
|
1300 (defun x-selection-value (type)
|
91106
|
1301 (let ((request-type (or x-select-request-type
|
|
1302 '(UTF8_STRING COMPOUND_TEXT STRING)))
|
91101
|
1303 text)
|
|
1304 (if (consp request-type)
|
|
1305 (while (and request-type (not text))
|
|
1306 (condition-case nil
|
|
1307 (setq text (x-get-selection type (car request-type)))
|
|
1308 (error nil))
|
|
1309 (setq request-type (cdr request-type)))
|
|
1310 (condition-case nil
|
|
1311 (setq text (x-get-selection type request-type))
|
|
1312 (error nil)))
|
51601
|
1313 (if text
|
|
1314 (remove-text-properties 0 (length text) '(foreign-selection nil) text))
|
|
1315 text))
|
64701
|
1316
|
66640
|
1317 ;; Return the value of the current X selection.
|
|
1318 ;; Consult the selection, and the cut buffer. Treat empty strings
|
|
1319 ;; as if they were unset.
|
|
1320 ;; If this function is called twice and finds the same text,
|
|
1321 ;; it returns nil the second time. This is so that a single
|
|
1322 ;; selection won't be added to the kill ring over and over.
|
707
|
1323 (defun x-cut-buffer-or-selection-value ()
|
85995
|
1324 ;; With multi-tty, this function may be called from a tty frame.
|
|
1325 (when (eq (framep (selected-frame)) 'x)
|
|
1326 (let (clip-text primary-text cut-text)
|
|
1327 (when x-select-enable-clipboard
|
|
1328 (setq clip-text (x-selection-value 'CLIPBOARD))
|
|
1329 (if (string= clip-text "") (setq clip-text nil))
|
44807
ca555c0c4e07
(x-select-text, x-cut-buffer-or-selection-value): Check if any of the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
1330
|
85995
|
1331 ;; Check the CLIPBOARD selection for 'newness', is it different
|
|
1332 ;; from what we remebered them to be last time we did a
|
|
1333 ;; cut/paste operation.
|
|
1334 (setq clip-text
|
|
1335 (cond ;; check clipboard
|
|
1336 ((or (not clip-text) (string= clip-text ""))
|
|
1337 (setq x-last-selected-text-clipboard nil))
|
|
1338 ((eq clip-text x-last-selected-text-clipboard) nil)
|
|
1339 ((string= clip-text x-last-selected-text-clipboard)
|
|
1340 ;; Record the newer string,
|
|
1341 ;; so subsequent calls can use the `eq' test.
|
|
1342 (setq x-last-selected-text-clipboard clip-text)
|
|
1343 nil)
|
|
1344 (t (setq x-last-selected-text-clipboard clip-text)))))
|
44807
ca555c0c4e07
(x-select-text, x-cut-buffer-or-selection-value): Check if any of the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
1345
|
87385
|
1346 (when x-select-enable-primary
|
|
1347 (setq primary-text (x-selection-value 'PRIMARY))
|
|
1348 ;; Check the PRIMARY selection for 'newness', is it different
|
|
1349 ;; from what we remebered them to be last time we did a
|
|
1350 ;; cut/paste operation.
|
|
1351 (setq primary-text
|
|
1352 (cond ;; check primary selection
|
|
1353 ((or (not primary-text) (string= primary-text ""))
|
|
1354 (setq x-last-selected-text-primary nil))
|
|
1355 ((eq primary-text x-last-selected-text-primary) nil)
|
|
1356 ((string= primary-text x-last-selected-text-primary)
|
|
1357 ;; Record the newer string,
|
|
1358 ;; so subsequent calls can use the `eq' test.
|
|
1359 (setq x-last-selected-text-primary primary-text)
|
|
1360 nil)
|
|
1361 (t
|
|
1362 (setq x-last-selected-text-primary primary-text)))))
|
85995
|
1363
|
|
1364 (setq cut-text (x-get-cut-buffer 0))
|
|
1365
|
|
1366 ;; Check the x cut buffer for 'newness', is it different
|
44807
ca555c0c4e07
(x-select-text, x-cut-buffer-or-selection-value): Check if any of the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
1367 ;; from what we remebered them to be last time we did a
|
ca555c0c4e07
(x-select-text, x-cut-buffer-or-selection-value): Check if any of the
Pavel Janík <Pavel@Janik.cz>
diff
changeset
|
1368 ;; cut/paste operation.
|
85995
|
1369 (setq cut-text
|
|
1370 (let ((next-coding (or next-selection-coding-system 'iso-latin-1)))
|
|
1371 (cond ;; check cut buffer
|
|
1372 ((or (not cut-text) (string= cut-text ""))
|
|
1373 (setq x-last-selected-text-cut nil))
|
|
1374 ;; This short cut doesn't work because x-get-cut-buffer
|
|
1375 ;; always returns a newly created string.
|
|
1376 ;; ((eq cut-text x-last-selected-text-cut) nil)
|
|
1377 ((and (string= cut-text x-last-selected-text-cut-encoded)
|
|
1378 (eq x-last-cut-buffer-coding next-coding))
|
|
1379 ;; See the comment above. No need of this recording.
|
|
1380 ;; Record the newer string,
|
|
1381 ;; so subsequent calls can use the `eq' test.
|
|
1382 ;; (setq x-last-selected-text-cut cut-text)
|
|
1383 nil)
|
|
1384 (t
|
|
1385 (setq x-last-selected-text-cut-encoded cut-text
|
|
1386 x-last-cut-buffer-coding next-coding
|
|
1387 x-last-selected-text-cut
|
|
1388 ;; ICCCM says cut buffer always contain ISO-Latin-1, but
|
|
1389 ;; use next-selection-coding-system if not nil.
|
|
1390 (decode-coding-string
|
|
1391 cut-text next-coding))))))
|
4132
|
1392
|
85995
|
1393 ;; As we have done one selection, clear this now.
|
|
1394 (setq next-selection-coding-system nil)
|
17014
|
1395
|
85995
|
1396 ;; At this point we have recorded the current values for the
|
|
1397 ;; selection from clipboard (if we are supposed to) primary,
|
|
1398 ;; and cut buffer. So return the first one that has changed
|
|
1399 ;; (which is the first non-null one).
|
|
1400 ;;
|
|
1401 ;; NOTE: There will be cases where more than one of these has
|
|
1402 ;; changed and the new values differ. This indicates that
|
|
1403 ;; something like the following has happened since the last time
|
|
1404 ;; we looked at the selections: Application X set all the
|
|
1405 ;; selections, then Application Y set only one or two of them (say
|
|
1406 ;; just the cut-buffer). In this case since we don't have
|
|
1407 ;; timestamps there is no way to know what the 'correct' value to
|
|
1408 ;; return is. The nice thing to do would be to tell the user we
|
|
1409 ;; saw multiple possible selections and ask the user which was the
|
|
1410 ;; one they wanted.
|
|
1411 ;; This code is still a big improvement because now the user can
|
|
1412 ;; futz with the current selection and get emacs to pay attention
|
|
1413 ;; to the cut buffer again (previously as soon as clipboard or
|
|
1414 ;; primary had been set the cut buffer would essentially never be
|
|
1415 ;; checked again).
|
|
1416 (or clip-text primary-text cut-text)
|
|
1417 )))
|
2366
|
1418
|
66640
|
1419 ;; Arrange for the kill and yank functions to set and check the clipboard.
|
707
|
1420 (setq interprogram-cut-function 'x-select-text)
|
|
1421 (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
|
273
|
1422
|
53662
6f5e6bdd8cda
Enable clipboard on the menu bar and make Paste from the menu bar first
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
1423 (defun x-clipboard-yank ()
|
6f5e6bdd8cda
Enable clipboard on the menu bar and make Paste from the menu bar first
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
1424 "Insert the clipboard contents, or the last stretch of killed text."
|
72412
|
1425 (interactive "*")
|
63191
|
1426 (let ((clipboard-text (x-selection-value 'CLIPBOARD))
|
53662
6f5e6bdd8cda
Enable clipboard on the menu bar and make Paste from the menu bar first
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
1427 (x-select-enable-clipboard t))
|
6f5e6bdd8cda
Enable clipboard on the menu bar and make Paste from the menu bar first
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
1428 (if (and clipboard-text (> (length clipboard-text) 0))
|
6f5e6bdd8cda
Enable clipboard on the menu bar and make Paste from the menu bar first
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
1429 (kill-new clipboard-text))
|
6f5e6bdd8cda
Enable clipboard on the menu bar and make Paste from the menu bar first
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
1430 (yank)))
|
6f5e6bdd8cda
Enable clipboard on the menu bar and make Paste from the menu bar first
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
1431
|
95841
|
1432 (declare-function accelerate-menu "xmenu.c" (&optional frame) t)
|
|
1433
|
83542
|
1434 (defun x-menu-bar-open (&optional frame)
|
|
1435 "Open the menu bar if `menu-bar-mode' is on. otherwise call `tmm-menubar'."
|
|
1436 (interactive "i")
|
83639
|
1437 (if menu-bar-mode (accelerate-menu frame)
|
83542
|
1438 (tmm-menubar)))
|
|
1439
|
1546
|
1440
|
83018
|
1441 ;;; Window system initialization.
|
17014
|
1442
|
2145
|
1443 (defun x-win-suspend-error ()
|
97805
e826c0ef09ff
(x-win-suspend-error): Don't signal error if there are no X frames
Chong Yidong <cyd@stupidchicken.com>
diff
changeset
|
1444 ;; Don't allow suspending if any of the frames are X frames.
|
e826c0ef09ff
(x-win-suspend-error): Don't signal error if there are no X frames
Chong Yidong <cyd@stupidchicken.com>
diff
changeset
|
1445 (if (memq 'x (mapcar 'window-system (frame-list)))
|
e826c0ef09ff
(x-win-suspend-error): Don't signal error if there are no X frames
Chong Yidong <cyd@stupidchicken.com>
diff
changeset
|
1446 (error "Cannot suspend Emacs while running under X")))
|
83018
|
1447
|
|
1448 (defvar x-initialized nil
|
|
1449 "Non-nil if the X window system has been initialized.")
|
|
1450
|
95841
|
1451 (declare-function x-open-connection "xfns.c"
|
|
1452 (display &optional xrm-string must-succeed))
|
|
1453 (declare-function x-server-max-request-size "xfns.c" (&optional terminal))
|
|
1454 (declare-function x-get-resource "frame.c"
|
|
1455 (attribute class &optional component subclass))
|
97422
|
1456 (declare-function x-parse-geometry "frame.c" (string))
|
|
1457 (defvar x-resource-name)
|
|
1458 (defvar x-display-name)
|
|
1459 (defvar x-command-line-resources)
|
95841
|
1460
|
83018
|
1461 (defun x-initialize-window-system ()
|
|
1462 "Initialize Emacs for X frames and open the first connection to an X server."
|
|
1463 ;; Make sure we have a valid resource name.
|
|
1464 (or (stringp x-resource-name)
|
|
1465 (let (i)
|
|
1466 (setq x-resource-name (invocation-name))
|
|
1467
|
|
1468 ;; Change any . or * characters in x-resource-name to hyphens,
|
|
1469 ;; so as not to choke when we use it in X resource queries.
|
|
1470 (while (setq i (string-match "[.*]" x-resource-name))
|
|
1471 (aset x-resource-name i ?-))))
|
|
1472
|
|
1473 (x-open-connection (or x-display-name
|
83594
|
1474 (setq x-display-name (or (getenv "DISPLAY" (selected-frame))
|
83421
bb2edc915032
Implement automatic terminal-local environment variables via `local-environment-variables'.
Karoly Lorentey <lorentey@elte.hu>
diff
changeset
|
1475 (getenv "DISPLAY"))))
|
83018
|
1476 x-command-line-resources
|
|
1477 ;; Exit Emacs with fatal error if this fails and we
|
|
1478 ;; are the initial display.
|
|
1479 (eq initial-window-system 'x))
|
|
1480
|
|
1481 (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
|
|
1482 x-cut-buffer-max))
|
|
1483
|
|
1484 ;; Setup the default fontset.
|
|
1485 (setup-default-fontset)
|
2366
|
1486
|
83018
|
1487 ;; Create the standard fontset.
|
|
1488 (create-fontset-from-fontset-spec standard-fontset-spec t)
|
|
1489
|
|
1490 ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
|
|
1491 (create-fontset-from-x-resource)
|
|
1492
|
83550
|
1493 ;; Set scroll bar mode to right if set by X resources. Default is left.
|
|
1494 (if (equal (x-get-resource "verticalScrollBars" "ScrollBars") "right")
|
|
1495 (customize-set-variable 'scroll-bar-mode 'right))
|
|
1496
|
83018
|
1497 ;; Apply a geometry resource to the initial frame. Put it at the end
|
|
1498 ;; of the alist, so that anything specified on the command line takes
|
|
1499 ;; precedence.
|
|
1500 (let* ((res-geometry (x-get-resource "geometry" "Geometry"))
|
|
1501 parsed)
|
|
1502 (if res-geometry
|
|
1503 (progn
|
|
1504 (setq parsed (x-parse-geometry res-geometry))
|
|
1505 ;; If the resource specifies a position,
|
|
1506 ;; call the position and size "user-specified".
|
|
1507 (if (or (assq 'top parsed) (assq 'left parsed))
|
|
1508 (setq parsed (cons '(user-position . t)
|
|
1509 (cons '(user-size . t) parsed))))
|
|
1510 ;; All geometry parms apply to the initial frame.
|
|
1511 (setq initial-frame-alist (append initial-frame-alist parsed))
|
85111
|
1512 ;; The size parms apply to all frames. Don't set it if there are
|
83544
|
1513 ;; sizes there already (from command line).
|
|
1514 (if (and (assq 'height parsed)
|
|
1515 (not (assq 'height default-frame-alist)))
|
83018
|
1516 (setq default-frame-alist
|
|
1517 (cons (cons 'height (cdr (assq 'height parsed)))
|
|
1518 default-frame-alist)))
|
83544
|
1519 (if (and (assq 'width parsed)
|
|
1520 (not (assq 'width default-frame-alist)))
|
83018
|
1521 (setq default-frame-alist
|
|
1522 (cons (cons 'width (cdr (assq 'width parsed)))
|
|
1523 default-frame-alist))))))
|
|
1524
|
|
1525 ;; Check the reverseVideo resource.
|
|
1526 (let ((case-fold-search t))
|
|
1527 (let ((rv (x-get-resource "reverseVideo" "ReverseVideo")))
|
|
1528 (if (and rv
|
|
1529 (string-match "^\\(true\\|yes\\|on\\)$" rv))
|
|
1530 (setq default-frame-alist
|
|
1531 (cons '(reverse . t) default-frame-alist)))))
|
51181
|
1532
|
83018
|
1533 ;; Set x-selection-timeout, measured in milliseconds.
|
|
1534 (let ((res-selection-timeout
|
|
1535 (x-get-resource "selectionTimeout" "SelectionTimeout")))
|
|
1536 (setq x-selection-timeout 20000)
|
|
1537 (if res-selection-timeout
|
|
1538 (setq x-selection-timeout (string-to-number res-selection-timeout))))
|
|
1539
|
83065
|
1540 ;; Don't let Emacs suspend under X.
|
83018
|
1541 (add-hook 'suspend-hook 'x-win-suspend-error)
|
|
1542
|
99348
|
1543 ;; During initialization, we defer sending size hints to the window
|
|
1544 ;; manager, because that can induce a race condition:
|
|
1545 ;; http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html
|
|
1546 ;; Send the size hints once initialization is done.
|
|
1547 (add-hook 'after-init-hook 'x-wm-set-size-hint)
|
|
1548
|
83018
|
1549 ;; Turn off window-splitting optimization; X is usually fast enough
|
|
1550 ;; that this is only annoying.
|
|
1551 (setq split-window-keep-point t)
|
|
1552
|
|
1553 ;; Motif direct handling of f10 wasn't working right,
|
|
1554 ;; So temporarily we've turned it off in lwlib-Xm.c
|
|
1555 ;; and turned the Emacs f10 back on.
|
|
1556 ;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
|
|
1557 ;; (if (featurep 'motif)
|
|
1558 ;; (global-set-key [f10] 'ignore))
|
|
1559
|
|
1560 ;; Turn on support for mouse wheels.
|
|
1561 (mouse-wheel-mode 1)
|
|
1562
|
83019
|
1563 ;; Enable CLIPBOARD copy/paste through menu bar commands.
|
|
1564 (menu-bar-enable-clipboard)
|
|
1565
|
|
1566 ;; Override Paste so it looks at CLIPBOARD first.
|
|
1567 (define-key menu-bar-edit-menu [paste]
|
83543
|
1568 (append '(menu-item "Paste" x-clipboard-yank
|
|
1569 :enable (not buffer-read-only)
|
|
1570 :help "Paste (yank) text most recently cut/copied")
|
|
1571 nil))
|
83019
|
1572
|
83018
|
1573 (setq x-initialized t))
|
|
1574
|
|
1575 (add-to-list 'handle-args-function-alist '(x . x-handle-args))
|
|
1576 (add-to-list 'frame-creation-function-alist '(x . x-create-frame-with-faces))
|
|
1577 (add-to-list 'window-system-initialization-alist '(x . x-initialize-window-system))
|
53662
6f5e6bdd8cda
Enable clipboard on the menu bar and make Paste from the menu bar first
Jan Djärv <jan.h.d@swipnet.se>
diff
changeset
|
1578
|
53789
|
1579 ;; Initiate drag and drop
|
|
1580 (add-hook 'after-make-frame-functions 'x-dnd-init-frame)
|
72412
|
1581 (define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event)
|
53789
|
1582
|
78724
|
1583 (defcustom x-gtk-stock-map
|
|
1584 '(
|
|
1585 ("etc/images/new" . "gtk-new")
|
|
1586 ("etc/images/open" . "gtk-open")
|
|
1587 ("etc/images/diropen" . "n:system-file-manager")
|
|
1588 ("etc/images/close" . "gtk-close")
|
|
1589 ("etc/images/save" . "gtk-save")
|
|
1590 ("etc/images/saveas" . "gtk-save-as")
|
|
1591 ("etc/images/undo" . "gtk-undo")
|
|
1592 ("etc/images/cut" . "gtk-cut")
|
|
1593 ("etc/images/copy" . "gtk-copy")
|
|
1594 ("etc/images/paste" . "gtk-paste")
|
|
1595 ("etc/images/search" . "gtk-find")
|
|
1596 ("etc/images/print" . "gtk-print")
|
|
1597 ("etc/images/preferences" . "gtk-preferences")
|
|
1598 ("etc/images/help" . "gtk-help")
|
|
1599 ("etc/images/left-arrow" . "gtk-go-back")
|
|
1600 ("etc/images/right-arrow" . "gtk-go-forward")
|
|
1601 ("etc/images/home" . "gtk-home")
|
|
1602 ("etc/images/jump-to" . "gtk-jump-to")
|
|
1603 ("etc/images/index" . "gtk-index")
|
|
1604 ("etc/images/search" . "gtk-find")
|
84984
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1605 ("etc/images/exit" . "gtk-quit")
|
92202
|
1606 ("etc/images/cancel" . "gtk-cancel")
|
93911
|
1607 ("etc/images/info" . "gtk-info")
|
92524
|
1608 ("etc/images/bookmark_add" . "n:bookmark_add")
|
84984
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1609 ;; Used in Gnus and/or MH-E:
|
92202
|
1610 ("etc/images/attach" . "gtk-attach")
|
|
1611 ("etc/images/connect" . "gtk-connect")
|
|
1612 ("etc/images/contact" . "gtk-contact")
|
|
1613 ("etc/images/delete" . "gtk-delete")
|
|
1614 ("etc/images/describe" . "gtk-properties")
|
|
1615 ("etc/images/disconnect" . "gtk-disconnect")
|
|
1616 ;; ("etc/images/exit" . "gtk-exit")
|
|
1617 ("etc/images/lock-broken" . "gtk-lock_broken")
|
|
1618 ("etc/images/lock-ok" . "gtk-lock_ok")
|
|
1619 ("etc/images/lock" . "gtk-lock")
|
|
1620 ("etc/images/next-page" . "gtk-next-page")
|
|
1621 ("etc/images/refresh" . "gtk-refresh")
|
|
1622 ("etc/images/sort-ascending" . "gtk-sort-ascending")
|
|
1623 ("etc/images/sort-column-ascending" . "gtk-sort-column-ascending")
|
|
1624 ("etc/images/sort-criteria" . "gtk-sort-criteria")
|
|
1625 ("etc/images/sort-descending" . "gtk-sort-descending")
|
|
1626 ("etc/images/sort-row-ascending" . "gtk-sort-row-ascending")
|
|
1627 ("images/gnus/toggle-subscription" . "gtk-task-recurring")
|
|
1628 ("images/mail/compose" . "gtk-mail-compose")
|
|
1629 ("images/mail/copy" . "gtk-mail-copy")
|
|
1630 ("images/mail/forward" . "gtk-mail-forward")
|
|
1631 ("images/mail/inbox" . "gtk-inbox")
|
|
1632 ("images/mail/move" . "gtk-mail-move")
|
|
1633 ("images/mail/not-spam" . "gtk-not-spam")
|
|
1634 ("images/mail/outbox" . "gtk-outbox")
|
|
1635 ("images/mail/reply-all" . "gtk-mail-reply-to-all")
|
|
1636 ("images/mail/reply" . "gtk-mail-reply")
|
|
1637 ("images/mail/save-draft" . "gtk-mail-handling")
|
|
1638 ("images/mail/send" . "gtk-mail-send")
|
|
1639 ("images/mail/spam" . "gtk-spam")
|
84984
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1640 ;; No themed versions available:
|
92202
|
1641 ;; mail/preview (combining stock_mail and stock_zoom)
|
|
1642 ;; mail/save (combining stock_mail, stock_save and stock_convert)
|
84984
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1643 )
|
78724
|
1644 "How icons for tool bars are mapped to Gtk+ stock items.
|
|
1645 Emacs must be compiled with the Gtk+ toolkit for this to have any effect.
|
|
1646 A value that begins with n: denotes a named icon instead of a stock icon."
|
78917
|
1647 :version "22.2"
|
84984
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1648 :type '(choice (repeat (choice symbol
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1649 (cons (string :tag "Emacs icon")
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1650 (string :tag "Stock/named")))))
|
78724
|
1651 :group 'x)
|
|
1652
|
84984
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1653 (defcustom icon-map-list '(x-gtk-stock-map)
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1654 "A list of alists that maps icon file names to stock/named icons.
|
78724
|
1655 The alists are searched in the order they appear. The first match is used.
|
|
1656 The keys in the alists are file names without extension and with two directory
|
|
1657 components. For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm
|
|
1658 to stock item gtk-open, use:
|
|
1659
|
|
1660 (\"etc/images/open\" . \"gtk-open\")
|
|
1661
|
|
1662 Themes also have named icons. To map to one of those, use n: before the name:
|
|
1663
|
|
1664 (\"etc/images/diropen\" . \"n:system-file-manager\")
|
|
1665
|
84984
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1666 The list elements are either the symbol name for the alist or the
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1667 alist itself.
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1668
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1669 If you don't want stock icons, set the variable to nil."
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1670 :version "22.2"
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1671 :type '(choice (const :tag "Don't use stock icons" nil)
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1672 (repeat (choice symbol
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1673 (cons (string :tag "Emacs icon")
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1674 (string :tag "Stock/named")))))
|
8aa48ea4b5cb
(x-gtk-stock-map): Add Gnus and MH-E icons. Improve custom type.
Reiner Steib <Reiner.Steib@gmx.de>
diff
changeset
|
1675 :group 'x)
|
78724
|
1676
|
100024
|
1677 (defconst x-gtk-stock-cache (make-hash-table :weakness t :test 'equal))
|
|
1678
|
78724
|
1679 (defun x-gtk-map-stock (file)
|
100024
|
1680 "Map icon with file name FILE to a Gtk+ stock name.
|
|
1681 This uses `icon-map-list' to map icon file names to stock icon names."
|
|
1682 (when (stringp file)
|
|
1683 (or (gethash file x-gtk-stock-cache)
|
|
1684 (puthash
|
|
1685 file
|
|
1686 (save-match-data
|
|
1687 (let* ((file-sans (file-name-sans-extension file))
|
|
1688 (key (and (string-match "/\\([^/]+/[^/]+/[^/]+$\\)"
|
|
1689 file-sans)
|
|
1690 (match-string 1 file-sans)))
|
|
1691 (icon-map icon-map-list)
|
|
1692 elem value)
|
|
1693 (while (and (null value) icon-map)
|
|
1694 (setq elem (car icon-map)
|
|
1695 value (assoc-string (or key file-sans)
|
|
1696 (if (symbolp elem)
|
|
1697 (symbol-value elem)
|
|
1698 elem))
|
|
1699 icon-map (cdr icon-map)))
|
|
1700 (and value (cdr value))))
|
|
1701 x-gtk-stock-cache))))
|
78724
|
1702
|
83822
|
1703 (provide 'x-win)
|
71061
|
1704
|
66640
|
1705 ;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
|
2157
|
1706 ;;; x-win.el ends here
|