Switch to recommended form of GPLv3 permissions notice.
[emacs.git] / lisp / term / x-win.el
blob0db081532d9eb6bde44f9091168cb938f1de1186
1 ;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit;-*-
3 ;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004,
4 ;; 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
6 ;; Author: FSF
7 ;; Keywords: terminals, i18n
9 ;; This file is part of GNU Emacs.
11 ;; GNU Emacs is free software: you can redistribute it and/or modify
12 ;; it under the terms of the GNU General Public License as published by
13 ;; the Free Software Foundation, either version 3 of the License, or
14 ;; (at your option) any later version.
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.
21 ;; You should have received a copy of the GNU General Public License
22 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
24 ;;; Commentary:
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.
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.
37 ;; startup.el will then examine startup files, and eventually call the hooks
38 ;; which create the first window(s).
40 ;;; Code:
42 ;; These are the standard X switches from the Xt Initialize.c file of
43 ;; Release 4.
45 ;; Command line Resource Manager string
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
69 ;; An alist of X options and the function which handles them. See
70 ;; ../startup.el.
72 (if (not (fboundp 'x-create-frame))
73 (error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
75 (require 'frame)
76 (require 'mouse)
77 (require 'scroll-bar)
78 (require 'faces)
79 (require 'select)
80 (require 'menu-bar)
81 (require 'fontset)
82 (require 'x-dnd)
84 (defvar x-invocation-args)
85 (defvar x-keysym-table)
86 (defvar x-selection-timeout)
87 (defvar x-session-id)
88 (defvar x-session-previous-id)
90 (defvar x-command-line-resources nil)
92 ;; Handler for switches of the form "-switch value" or "-switch".
93 (defun x-handle-switch (switch)
94 (let ((aelt (assoc switch command-line-x-option-alist)))
95 (if aelt
96 (let ((param (nth 3 aelt))
97 (value (nth 4 aelt)))
98 (if value
99 (setq default-frame-alist
100 (cons (cons param value)
101 default-frame-alist))
102 (setq default-frame-alist
103 (cons (cons param
104 (car x-invocation-args))
105 default-frame-alist)
106 x-invocation-args (cdr x-invocation-args)))))))
108 ;; Handler for switches of the form "-switch n"
109 (defun x-handle-numeric-switch (switch)
110 (let ((aelt (assoc switch command-line-x-option-alist)))
111 (if aelt
112 (let ((param (nth 3 aelt)))
113 (setq default-frame-alist
114 (cons (cons param
115 (string-to-number (car x-invocation-args)))
116 default-frame-alist)
117 x-invocation-args
118 (cdr x-invocation-args))))))
120 ;; Handle options that apply to initial frame only
121 (defun x-handle-initial-switch (switch)
122 (let ((aelt (assoc switch command-line-x-option-alist)))
123 (if aelt
124 (let ((param (nth 3 aelt))
125 (value (nth 4 aelt)))
126 (if value
127 (setq initial-frame-alist
128 (cons (cons param value)
129 initial-frame-alist))
130 (setq initial-frame-alist
131 (cons (cons param
132 (car x-invocation-args))
133 initial-frame-alist)
134 x-invocation-args (cdr x-invocation-args)))))))
136 (defun x-handle-no-bitmap-icon (switch)
137 (setq default-frame-alist (cons '(icon-type) default-frame-alist)))
139 ;; Make -iconic apply only to the initial frame!
140 (defun x-handle-iconic (switch)
141 (setq initial-frame-alist
142 (cons '(visibility . icon) initial-frame-alist)))
144 ;; Handle the -xrm option.
145 (defun x-handle-xrm-switch (switch)
146 (unless (consp x-invocation-args)
147 (error "%s: missing argument to `%s' option" (invocation-name) switch))
148 (setq x-command-line-resources
149 (if (null x-command-line-resources)
150 (car x-invocation-args)
151 (concat x-command-line-resources "\n" (car x-invocation-args))))
152 (setq x-invocation-args (cdr x-invocation-args)))
154 ;; Handle the geometry option
155 (defun x-handle-geometry (switch)
156 (let* ((geo (x-parse-geometry (car x-invocation-args)))
157 (left (assq 'left geo))
158 (top (assq 'top geo))
159 (height (assq 'height geo))
160 (width (assq 'width geo)))
161 (if (or height width)
162 (setq default-frame-alist
163 (append default-frame-alist
164 '((user-size . t))
165 (if height (list height))
166 (if width (list width)))
167 initial-frame-alist
168 (append initial-frame-alist
169 '((user-size . t))
170 (if height (list height))
171 (if width (list width)))))
172 (if (or left top)
173 (setq initial-frame-alist
174 (append initial-frame-alist
175 '((user-position . t))
176 (if left (list left))
177 (if top (list top)))))
178 (setq x-invocation-args (cdr x-invocation-args))))
180 ;; Handle the -name option. Set the variable x-resource-name
181 ;; to the option's operand; set the name of
182 ;; the initial frame, too.
183 (defun x-handle-name-switch (switch)
184 (or (consp x-invocation-args)
185 (error "%s: missing argument to `%s' option" (invocation-name) switch))
186 (setq x-resource-name (car x-invocation-args)
187 x-invocation-args (cdr x-invocation-args))
188 (setq initial-frame-alist (cons (cons 'name x-resource-name)
189 initial-frame-alist)))
191 ;; Handle the --parent-id option.
192 (defun x-handle-parent-id (switch)
193 (or (consp x-invocation-args)
194 (error "%s: missing argument to `%s' option" (invocation-name) switch))
195 (setq initial-frame-alist (cons
196 (cons 'parent-id
197 (string-to-number (car x-invocation-args)))
198 initial-frame-alist)
199 x-invocation-args (cdr x-invocation-args)))
201 (defvar x-display-name nil
202 "The name of the X display on which Emacs was started.
204 For the X display name of individual frames, see the `display'
205 frame parameter.")
207 (defun x-handle-display (switch)
208 "Handle -display DISPLAY option."
209 (setq x-display-name (car x-invocation-args)
210 x-invocation-args (cdr x-invocation-args))
211 ;; Make subshell programs see the same DISPLAY value Emacs really uses.
212 ;; Note that this isn't completely correct, since Emacs can use
213 ;; multiple displays. However, there is no way to tell an already
214 ;; running subshell which display the user is currently typing on.
215 (setenv "DISPLAY" x-display-name))
217 (defun x-handle-args (args)
218 "Process the X-related command line options in ARGS.
219 This is done before the user's startup file is loaded. They are copied to
220 `x-invocation-args', from which the X-related things are extracted, first
221 the switch (e.g., \"-fg\") in the following code, and possible values
222 \(e.g., \"black\") in the option handler code (e.g., x-handle-switch).
223 This function returns ARGS minus the arguments that have been processed."
224 ;; We use ARGS to accumulate the args that we don't handle here, to return.
225 (setq x-invocation-args args
226 args nil)
227 (while (and x-invocation-args
228 (not (equal (car x-invocation-args) "--")))
229 (let* ((this-switch (car x-invocation-args))
230 (orig-this-switch this-switch)
231 completion argval aelt handler)
232 (setq x-invocation-args (cdr x-invocation-args))
233 ;; Check for long options with attached arguments
234 ;; and separate out the attached option argument into argval.
235 (if (string-match "^--[^=]*=" this-switch)
236 (setq argval (substring this-switch (match-end 0))
237 this-switch (substring this-switch 0 (1- (match-end 0)))))
238 ;; Complete names of long options.
239 (if (string-match "^--" this-switch)
240 (progn
241 (setq completion (try-completion this-switch command-line-x-option-alist))
242 (if (eq completion t)
243 ;; Exact match for long option.
245 (if (stringp completion)
246 (let ((elt (assoc completion command-line-x-option-alist)))
247 ;; Check for abbreviated long option.
248 (or elt
249 (error "Option `%s' is ambiguous" this-switch))
250 (setq this-switch completion))))))
251 (setq aelt (assoc this-switch command-line-x-option-alist))
252 (if aelt (setq handler (nth 2 aelt)))
253 (if handler
254 (if argval
255 (let ((x-invocation-args
256 (cons argval x-invocation-args)))
257 (funcall handler this-switch))
258 (funcall handler this-switch))
259 (setq args (cons orig-this-switch args)))))
260 (nconc (nreverse args) x-invocation-args))
262 ;; Handle the --smid switch. This is used by the session manager
263 ;; to give us back our session id we had on the previous run.
264 (defun x-handle-smid (switch)
265 (or (consp x-invocation-args)
266 (error "%s: missing argument to `%s' option" (invocation-name) switch))
267 (setq x-session-previous-id (car x-invocation-args)
268 x-invocation-args (cdr x-invocation-args)))
270 (defvar emacs-save-session-functions nil
271 "Special hook run when a save-session event occurs.
272 The functions do not get any argument.
273 Functions can return non-nil to inform the session manager that the
274 window system shutdown should be aborted.
276 See also `emacs-session-save'.")
278 (defun emacs-session-filename (session-id)
279 "Construct a filename to save the session in based on SESSION-ID.
280 If the directory ~/.emacs.d exists, we make a filename in there, otherwise
281 a file in the home directory."
282 (let ((basename (concat "session." session-id))
283 (emacs-dir user-emacs-directory))
284 (expand-file-name (if (file-directory-p emacs-dir)
285 (concat emacs-dir basename)
286 (concat "~/.emacs-" basename)))))
288 (defun emacs-session-save ()
289 "This function is called when the window system is shutting down.
290 If this function returns non-nil, the window system shutdown is cancelled.
292 When a session manager tells Emacs that the window system is shutting
293 down, this function is called. It calls the functions in the hook
294 `emacs-save-session-functions'. Functions are called with the current
295 buffer set to a temporary buffer. Functions should use `insert' to insert
296 lisp code to save the session state. The buffer is saved
297 in a file in the home directory of the user running Emacs. The file
298 is evaluated when Emacs is restarted by the session manager.
300 If any of the functions returns non-nil, no more functions are called
301 and this function returns non-nil. This will inform the session manager
302 that it should abort the window system shutdown."
303 (let ((filename (emacs-session-filename x-session-id))
304 (buf (get-buffer-create (concat " *SES " x-session-id))))
305 (when (file-exists-p filename)
306 (delete-file filename))
307 (with-current-buffer buf
308 (let ((cancel-shutdown (condition-case nil
309 ;; A return of t means cancel the shutdown.
310 (run-hook-with-args-until-success
311 'emacs-save-session-functions)
312 (error t))))
313 (unless cancel-shutdown
314 (write-file filename))
315 (kill-buffer buf)
316 cancel-shutdown))))
318 (defun emacs-session-restore (previous-session-id)
319 "Restore the Emacs session if started by a session manager.
320 The file saved by `emacs-session-save' is evaluated and deleted if it
321 exists."
322 (let ((filename (emacs-session-filename previous-session-id)))
323 (when (file-exists-p filename)
324 (load-file filename)
325 (delete-file filename)
326 (message "Restored session data"))))
332 ;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.
335 (defconst x-pointer-X-cursor 0)
336 (defconst x-pointer-arrow 2)
337 (defconst x-pointer-based-arrow-down 4)
338 (defconst x-pointer-based-arrow-up 6)
339 (defconst x-pointer-boat 8)
340 (defconst x-pointer-bogosity 10)
341 (defconst x-pointer-bottom-left-corner 12)
342 (defconst x-pointer-bottom-right-corner 14)
343 (defconst x-pointer-bottom-side 16)
344 (defconst x-pointer-bottom-tee 18)
345 (defconst x-pointer-box-spiral 20)
346 (defconst x-pointer-center-ptr 22)
347 (defconst x-pointer-circle 24)
348 (defconst x-pointer-clock 26)
349 (defconst x-pointer-coffee-mug 28)
350 (defconst x-pointer-cross 30)
351 (defconst x-pointer-cross-reverse 32)
352 (defconst x-pointer-crosshair 34)
353 (defconst x-pointer-diamond-cross 36)
354 (defconst x-pointer-dot 38)
355 (defconst x-pointer-dotbox 40)
356 (defconst x-pointer-double-arrow 42)
357 (defconst x-pointer-draft-large 44)
358 (defconst x-pointer-draft-small 46)
359 (defconst x-pointer-draped-box 48)
360 (defconst x-pointer-exchange 50)
361 (defconst x-pointer-fleur 52)
362 (defconst x-pointer-gobbler 54)
363 (defconst x-pointer-gumby 56)
364 (defconst x-pointer-hand1 58)
365 (defconst x-pointer-hand2 60)
366 (defconst x-pointer-heart 62)
367 (defconst x-pointer-icon 64)
368 (defconst x-pointer-iron-cross 66)
369 (defconst x-pointer-left-ptr 68)
370 (defconst x-pointer-left-side 70)
371 (defconst x-pointer-left-tee 72)
372 (defconst x-pointer-leftbutton 74)
373 (defconst x-pointer-ll-angle 76)
374 (defconst x-pointer-lr-angle 78)
375 (defconst x-pointer-man 80)
376 (defconst x-pointer-middlebutton 82)
377 (defconst x-pointer-mouse 84)
378 (defconst x-pointer-pencil 86)
379 (defconst x-pointer-pirate 88)
380 (defconst x-pointer-plus 90)
381 (defconst x-pointer-question-arrow 92)
382 (defconst x-pointer-right-ptr 94)
383 (defconst x-pointer-right-side 96)
384 (defconst x-pointer-right-tee 98)
385 (defconst x-pointer-rightbutton 100)
386 (defconst x-pointer-rtl-logo 102)
387 (defconst x-pointer-sailboat 104)
388 (defconst x-pointer-sb-down-arrow 106)
389 (defconst x-pointer-sb-h-double-arrow 108)
390 (defconst x-pointer-sb-left-arrow 110)
391 (defconst x-pointer-sb-right-arrow 112)
392 (defconst x-pointer-sb-up-arrow 114)
393 (defconst x-pointer-sb-v-double-arrow 116)
394 (defconst x-pointer-shuttle 118)
395 (defconst x-pointer-sizing 120)
396 (defconst x-pointer-spider 122)
397 (defconst x-pointer-spraycan 124)
398 (defconst x-pointer-star 126)
399 (defconst x-pointer-target 128)
400 (defconst x-pointer-tcross 130)
401 (defconst x-pointer-top-left-arrow 132)
402 (defconst x-pointer-top-left-corner 134)
403 (defconst x-pointer-top-right-corner 136)
404 (defconst x-pointer-top-side 138)
405 (defconst x-pointer-top-tee 140)
406 (defconst x-pointer-trek 142)
407 (defconst x-pointer-ul-angle 144)
408 (defconst x-pointer-umbrella 146)
409 (defconst x-pointer-ur-angle 148)
410 (defconst x-pointer-watch 150)
411 (defconst x-pointer-xterm 152)
412 (defconst x-pointer-invisible 255)
415 ;; Available colors
418 (defvar x-colors '("LightGreen"
419 "light green"
420 "DarkRed"
421 "dark red"
422 "DarkMagenta"
423 "dark magenta"
424 "DarkCyan"
425 "dark cyan"
426 "DarkBlue"
427 "dark blue"
428 "DarkGray"
429 "dark gray"
430 "DarkGrey"
431 "dark grey"
432 "grey100"
433 "gray100"
434 "grey99"
435 "gray99"
436 "grey98"
437 "gray98"
438 "grey97"
439 "gray97"
440 "grey96"
441 "gray96"
442 "grey95"
443 "gray95"
444 "grey94"
445 "gray94"
446 "grey93"
447 "gray93"
448 "grey92"
449 "gray92"
450 "grey91"
451 "gray91"
452 "grey90"
453 "gray90"
454 "grey89"
455 "gray89"
456 "grey88"
457 "gray88"
458 "grey87"
459 "gray87"
460 "grey86"
461 "gray86"
462 "grey85"
463 "gray85"
464 "grey84"
465 "gray84"
466 "grey83"
467 "gray83"
468 "grey82"
469 "gray82"
470 "grey81"
471 "gray81"
472 "grey80"
473 "gray80"
474 "grey79"
475 "gray79"
476 "grey78"
477 "gray78"
478 "grey77"
479 "gray77"
480 "grey76"
481 "gray76"
482 "grey75"
483 "gray75"
484 "grey74"
485 "gray74"
486 "grey73"
487 "gray73"
488 "grey72"
489 "gray72"
490 "grey71"
491 "gray71"
492 "grey70"
493 "gray70"
494 "grey69"
495 "gray69"
496 "grey68"
497 "gray68"
498 "grey67"
499 "gray67"
500 "grey66"
501 "gray66"
502 "grey65"
503 "gray65"
504 "grey64"
505 "gray64"
506 "grey63"
507 "gray63"
508 "grey62"
509 "gray62"
510 "grey61"
511 "gray61"
512 "grey60"
513 "gray60"
514 "grey59"
515 "gray59"
516 "grey58"
517 "gray58"
518 "grey57"
519 "gray57"
520 "grey56"
521 "gray56"
522 "grey55"
523 "gray55"
524 "grey54"
525 "gray54"
526 "grey53"
527 "gray53"
528 "grey52"
529 "gray52"
530 "grey51"
531 "gray51"
532 "grey50"
533 "gray50"
534 "grey49"
535 "gray49"
536 "grey48"
537 "gray48"
538 "grey47"
539 "gray47"
540 "grey46"
541 "gray46"
542 "grey45"
543 "gray45"
544 "grey44"
545 "gray44"
546 "grey43"
547 "gray43"
548 "grey42"
549 "gray42"
550 "grey41"
551 "gray41"
552 "grey40"
553 "gray40"
554 "grey39"
555 "gray39"
556 "grey38"
557 "gray38"
558 "grey37"
559 "gray37"
560 "grey36"
561 "gray36"
562 "grey35"
563 "gray35"
564 "grey34"
565 "gray34"
566 "grey33"
567 "gray33"
568 "grey32"
569 "gray32"
570 "grey31"
571 "gray31"
572 "grey30"
573 "gray30"
574 "grey29"
575 "gray29"
576 "grey28"
577 "gray28"
578 "grey27"
579 "gray27"
580 "grey26"
581 "gray26"
582 "grey25"
583 "gray25"
584 "grey24"
585 "gray24"
586 "grey23"
587 "gray23"
588 "grey22"
589 "gray22"
590 "grey21"
591 "gray21"
592 "grey20"
593 "gray20"
594 "grey19"
595 "gray19"
596 "grey18"
597 "gray18"
598 "grey17"
599 "gray17"
600 "grey16"
601 "gray16"
602 "grey15"
603 "gray15"
604 "grey14"
605 "gray14"
606 "grey13"
607 "gray13"
608 "grey12"
609 "gray12"
610 "grey11"
611 "gray11"
612 "grey10"
613 "gray10"
614 "grey9"
615 "gray9"
616 "grey8"
617 "gray8"
618 "grey7"
619 "gray7"
620 "grey6"
621 "gray6"
622 "grey5"
623 "gray5"
624 "grey4"
625 "gray4"
626 "grey3"
627 "gray3"
628 "grey2"
629 "gray2"
630 "grey1"
631 "gray1"
632 "grey0"
633 "gray0"
634 "thistle4"
635 "thistle3"
636 "thistle2"
637 "thistle1"
638 "MediumPurple4"
639 "MediumPurple3"
640 "MediumPurple2"
641 "MediumPurple1"
642 "purple4"
643 "purple3"
644 "purple2"
645 "purple1"
646 "DarkOrchid4"
647 "DarkOrchid3"
648 "DarkOrchid2"
649 "DarkOrchid1"
650 "MediumOrchid4"
651 "MediumOrchid3"
652 "MediumOrchid2"
653 "MediumOrchid1"
654 "plum4"
655 "plum3"
656 "plum2"
657 "plum1"
658 "orchid4"
659 "orchid3"
660 "orchid2"
661 "orchid1"
662 "magenta4"
663 "magenta3"
664 "magenta2"
665 "magenta1"
666 "VioletRed4"
667 "VioletRed3"
668 "VioletRed2"
669 "VioletRed1"
670 "maroon4"
671 "maroon3"
672 "maroon2"
673 "maroon1"
674 "PaleVioletRed4"
675 "PaleVioletRed3"
676 "PaleVioletRed2"
677 "PaleVioletRed1"
678 "LightPink4"
679 "LightPink3"
680 "LightPink2"
681 "LightPink1"
682 "pink4"
683 "pink3"
684 "pink2"
685 "pink1"
686 "HotPink4"
687 "HotPink3"
688 "HotPink2"
689 "HotPink1"
690 "DeepPink4"
691 "DeepPink3"
692 "DeepPink2"
693 "DeepPink1"
694 "red4"
695 "red3"
696 "red2"
697 "red1"
698 "OrangeRed4"
699 "OrangeRed3"
700 "OrangeRed2"
701 "OrangeRed1"
702 "tomato4"
703 "tomato3"
704 "tomato2"
705 "tomato1"
706 "coral4"
707 "coral3"
708 "coral2"
709 "coral1"
710 "DarkOrange4"
711 "DarkOrange3"
712 "DarkOrange2"
713 "DarkOrange1"
714 "orange4"
715 "orange3"
716 "orange2"
717 "orange1"
718 "LightSalmon4"
719 "LightSalmon3"
720 "LightSalmon2"
721 "LightSalmon1"
722 "salmon4"
723 "salmon3"
724 "salmon2"
725 "salmon1"
726 "brown4"
727 "brown3"
728 "brown2"
729 "brown1"
730 "firebrick4"
731 "firebrick3"
732 "firebrick2"
733 "firebrick1"
734 "chocolate4"
735 "chocolate3"
736 "chocolate2"
737 "chocolate1"
738 "tan4"
739 "tan3"
740 "tan2"
741 "tan1"
742 "wheat4"
743 "wheat3"
744 "wheat2"
745 "wheat1"
746 "burlywood4"
747 "burlywood3"
748 "burlywood2"
749 "burlywood1"
750 "sienna4"
751 "sienna3"
752 "sienna2"
753 "sienna1"
754 "IndianRed4"
755 "IndianRed3"
756 "IndianRed2"
757 "IndianRed1"
758 "RosyBrown4"
759 "RosyBrown3"
760 "RosyBrown2"
761 "RosyBrown1"
762 "DarkGoldenrod4"
763 "DarkGoldenrod3"
764 "DarkGoldenrod2"
765 "DarkGoldenrod1"
766 "goldenrod4"
767 "goldenrod3"
768 "goldenrod2"
769 "goldenrod1"
770 "gold4"
771 "gold3"
772 "gold2"
773 "gold1"
774 "yellow4"
775 "yellow3"
776 "yellow2"
777 "yellow1"
778 "LightYellow4"
779 "LightYellow3"
780 "LightYellow2"
781 "LightYellow1"
782 "LightGoldenrod4"
783 "LightGoldenrod3"
784 "LightGoldenrod2"
785 "LightGoldenrod1"
786 "khaki4"
787 "khaki3"
788 "khaki2"
789 "khaki1"
790 "DarkOliveGreen4"
791 "DarkOliveGreen3"
792 "DarkOliveGreen2"
793 "DarkOliveGreen1"
794 "OliveDrab4"
795 "OliveDrab3"
796 "OliveDrab2"
797 "OliveDrab1"
798 "chartreuse4"
799 "chartreuse3"
800 "chartreuse2"
801 "chartreuse1"
802 "green4"
803 "green3"
804 "green2"
805 "green1"
806 "SpringGreen4"
807 "SpringGreen3"
808 "SpringGreen2"
809 "SpringGreen1"
810 "PaleGreen4"
811 "PaleGreen3"
812 "PaleGreen2"
813 "PaleGreen1"
814 "SeaGreen4"
815 "SeaGreen3"
816 "SeaGreen2"
817 "SeaGreen1"
818 "DarkSeaGreen4"
819 "DarkSeaGreen3"
820 "DarkSeaGreen2"
821 "DarkSeaGreen1"
822 "aquamarine4"
823 "aquamarine3"
824 "aquamarine2"
825 "aquamarine1"
826 "DarkSlateGray4"
827 "DarkSlateGray3"
828 "DarkSlateGray2"
829 "DarkSlateGray1"
830 "cyan4"
831 "cyan3"
832 "cyan2"
833 "cyan1"
834 "turquoise4"
835 "turquoise3"
836 "turquoise2"
837 "turquoise1"
838 "CadetBlue4"
839 "CadetBlue3"
840 "CadetBlue2"
841 "CadetBlue1"
842 "PaleTurquoise4"
843 "PaleTurquoise3"
844 "PaleTurquoise2"
845 "PaleTurquoise1"
846 "LightCyan4"
847 "LightCyan3"
848 "LightCyan2"
849 "LightCyan1"
850 "LightBlue4"
851 "LightBlue3"
852 "LightBlue2"
853 "LightBlue1"
854 "LightSteelBlue4"
855 "LightSteelBlue3"
856 "LightSteelBlue2"
857 "LightSteelBlue1"
858 "SlateGray4"
859 "SlateGray3"
860 "SlateGray2"
861 "SlateGray1"
862 "LightSkyBlue4"
863 "LightSkyBlue3"
864 "LightSkyBlue2"
865 "LightSkyBlue1"
866 "SkyBlue4"
867 "SkyBlue3"
868 "SkyBlue2"
869 "SkyBlue1"
870 "DeepSkyBlue4"
871 "DeepSkyBlue3"
872 "DeepSkyBlue2"
873 "DeepSkyBlue1"
874 "SteelBlue4"
875 "SteelBlue3"
876 "SteelBlue2"
877 "SteelBlue1"
878 "DodgerBlue4"
879 "DodgerBlue3"
880 "DodgerBlue2"
881 "DodgerBlue1"
882 "blue4"
883 "blue3"
884 "blue2"
885 "blue1"
886 "RoyalBlue4"
887 "RoyalBlue3"
888 "RoyalBlue2"
889 "RoyalBlue1"
890 "SlateBlue4"
891 "SlateBlue3"
892 "SlateBlue2"
893 "SlateBlue1"
894 "azure4"
895 "azure3"
896 "azure2"
897 "azure1"
898 "MistyRose4"
899 "MistyRose3"
900 "MistyRose2"
901 "MistyRose1"
902 "LavenderBlush4"
903 "LavenderBlush3"
904 "LavenderBlush2"
905 "LavenderBlush1"
906 "honeydew4"
907 "honeydew3"
908 "honeydew2"
909 "honeydew1"
910 "ivory4"
911 "ivory3"
912 "ivory2"
913 "ivory1"
914 "cornsilk4"
915 "cornsilk3"
916 "cornsilk2"
917 "cornsilk1"
918 "LemonChiffon4"
919 "LemonChiffon3"
920 "LemonChiffon2"
921 "LemonChiffon1"
922 "NavajoWhite4"
923 "NavajoWhite3"
924 "NavajoWhite2"
925 "NavajoWhite1"
926 "PeachPuff4"
927 "PeachPuff3"
928 "PeachPuff2"
929 "PeachPuff1"
930 "bisque4"
931 "bisque3"
932 "bisque2"
933 "bisque1"
934 "AntiqueWhite4"
935 "AntiqueWhite3"
936 "AntiqueWhite2"
937 "AntiqueWhite1"
938 "seashell4"
939 "seashell3"
940 "seashell2"
941 "seashell1"
942 "snow4"
943 "snow3"
944 "snow2"
945 "snow1"
946 "thistle"
947 "MediumPurple"
948 "medium purple"
949 "purple"
950 "BlueViolet"
951 "blue violet"
952 "DarkViolet"
953 "dark violet"
954 "DarkOrchid"
955 "dark orchid"
956 "MediumOrchid"
957 "medium orchid"
958 "orchid"
959 "plum"
960 "violet"
961 "magenta"
962 "VioletRed"
963 "violet red"
964 "MediumVioletRed"
965 "medium violet red"
966 "maroon"
967 "PaleVioletRed"
968 "pale violet red"
969 "LightPink"
970 "light pink"
971 "pink"
972 "DeepPink"
973 "deep pink"
974 "HotPink"
975 "hot pink"
976 "red"
977 "OrangeRed"
978 "orange red"
979 "tomato"
980 "LightCoral"
981 "light coral"
982 "coral"
983 "DarkOrange"
984 "dark orange"
985 "orange"
986 "LightSalmon"
987 "light salmon"
988 "salmon"
989 "DarkSalmon"
990 "dark salmon"
991 "brown"
992 "firebrick"
993 "chocolate"
994 "tan"
995 "SandyBrown"
996 "sandy brown"
997 "wheat"
998 "beige"
999 "burlywood"
1000 "peru"
1001 "sienna"
1002 "SaddleBrown"
1003 "saddle brown"
1004 "IndianRed"
1005 "indian red"
1006 "RosyBrown"
1007 "rosy brown"
1008 "DarkGoldenrod"
1009 "dark goldenrod"
1010 "goldenrod"
1011 "LightGoldenrod"
1012 "light goldenrod"
1013 "gold"
1014 "yellow"
1015 "LightYellow"
1016 "light yellow"
1017 "LightGoldenrodYellow"
1018 "light goldenrod yellow"
1019 "PaleGoldenrod"
1020 "pale goldenrod"
1021 "khaki"
1022 "DarkKhaki"
1023 "dark khaki"
1024 "OliveDrab"
1025 "olive drab"
1026 "ForestGreen"
1027 "forest green"
1028 "YellowGreen"
1029 "yellow green"
1030 "LimeGreen"
1031 "lime green"
1032 "GreenYellow"
1033 "green yellow"
1034 "MediumSpringGreen"
1035 "medium spring green"
1036 "chartreuse"
1037 "green"
1038 "LawnGreen"
1039 "lawn green"
1040 "SpringGreen"
1041 "spring green"
1042 "PaleGreen"
1043 "pale green"
1044 "LightSeaGreen"
1045 "light sea green"
1046 "MediumSeaGreen"
1047 "medium sea green"
1048 "SeaGreen"
1049 "sea green"
1050 "DarkSeaGreen"
1051 "dark sea green"
1052 "DarkOliveGreen"
1053 "dark olive green"
1054 "DarkGreen"
1055 "dark green"
1056 "aquamarine"
1057 "MediumAquamarine"
1058 "medium aquamarine"
1059 "CadetBlue"
1060 "cadet blue"
1061 "LightCyan"
1062 "light cyan"
1063 "cyan"
1064 "turquoise"
1065 "MediumTurquoise"
1066 "medium turquoise"
1067 "DarkTurquoise"
1068 "dark turquoise"
1069 "PaleTurquoise"
1070 "pale turquoise"
1071 "PowderBlue"
1072 "powder blue"
1073 "LightBlue"
1074 "light blue"
1075 "LightSteelBlue"
1076 "light steel blue"
1077 "SteelBlue"
1078 "steel blue"
1079 "LightSkyBlue"
1080 "light sky blue"
1081 "SkyBlue"
1082 "sky blue"
1083 "DeepSkyBlue"
1084 "deep sky blue"
1085 "DodgerBlue"
1086 "dodger blue"
1087 "blue"
1088 "RoyalBlue"
1089 "royal blue"
1090 "MediumBlue"
1091 "medium blue"
1092 "LightSlateBlue"
1093 "light slate blue"
1094 "MediumSlateBlue"
1095 "medium slate blue"
1096 "SlateBlue"
1097 "slate blue"
1098 "DarkSlateBlue"
1099 "dark slate blue"
1100 "CornflowerBlue"
1101 "cornflower blue"
1102 "NavyBlue"
1103 "navy blue"
1104 "navy"
1105 "MidnightBlue"
1106 "midnight blue"
1107 "LightGray"
1108 "light gray"
1109 "LightGrey"
1110 "light grey"
1111 "grey"
1112 "gray"
1113 "LightSlateGrey"
1114 "light slate grey"
1115 "LightSlateGray"
1116 "light slate gray"
1117 "SlateGrey"
1118 "slate grey"
1119 "SlateGray"
1120 "slate gray"
1121 "DimGrey"
1122 "dim grey"
1123 "DimGray"
1124 "dim gray"
1125 "DarkSlateGrey"
1126 "dark slate grey"
1127 "DarkSlateGray"
1128 "dark slate gray"
1129 "black"
1130 "white"
1131 "MistyRose"
1132 "misty rose"
1133 "LavenderBlush"
1134 "lavender blush"
1135 "lavender"
1136 "AliceBlue"
1137 "alice blue"
1138 "azure"
1139 "MintCream"
1140 "mint cream"
1141 "honeydew"
1142 "seashell"
1143 "LemonChiffon"
1144 "lemon chiffon"
1145 "ivory"
1146 "cornsilk"
1147 "moccasin"
1148 "NavajoWhite"
1149 "navajo white"
1150 "PeachPuff"
1151 "peach puff"
1152 "bisque"
1153 "BlanchedAlmond"
1154 "blanched almond"
1155 "PapayaWhip"
1156 "papaya whip"
1157 "AntiqueWhite"
1158 "antique white"
1159 "linen"
1160 "OldLace"
1161 "old lace"
1162 "FloralWhite"
1163 "floral white"
1164 "gainsboro"
1165 "WhiteSmoke"
1166 "white smoke"
1167 "GhostWhite"
1168 "ghost white"
1169 "snow")
1170 "The list of X colors from the `rgb.txt' file.
1171 XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
1173 (defun xw-defined-colors (&optional frame)
1174 "Internal function called by `defined-colors', which see."
1175 (or frame (setq frame (selected-frame)))
1176 (let ((all-colors x-colors)
1177 (this-color nil)
1178 (defined-colors nil))
1179 (while all-colors
1180 (setq this-color (car all-colors)
1181 all-colors (cdr all-colors))
1182 (and (color-supported-p this-color frame t)
1183 (setq defined-colors (cons this-color defined-colors))))
1184 defined-colors))
1186 ;;;; Function keys
1188 (defvar x-alternatives-map
1189 (let ((map (make-sparse-keymap)))
1190 ;; Map certain keypad keys into ASCII characters that people usually expect.
1191 (define-key map [backspace] [127])
1192 (define-key map [delete] [127])
1193 (define-key map [tab] [?\t])
1194 (define-key map [linefeed] [?\n])
1195 (define-key map [clear] [?\C-l])
1196 (define-key map [return] [?\C-m])
1197 (define-key map [escape] [?\e])
1198 (define-key map [M-backspace] [?\M-\d])
1199 (define-key map [M-delete] [?\M-\d])
1200 (define-key map [M-tab] [?\M-\t])
1201 (define-key map [M-linefeed] [?\M-\n])
1202 (define-key map [M-clear] [?\M-\C-l])
1203 (define-key map [M-return] [?\M-\C-m])
1204 (define-key map [M-escape] [?\M-\e])
1205 (define-key map [iso-lefttab] [backtab])
1206 (define-key map [S-iso-lefttab] [backtab])
1207 map)
1208 "Keymap of possible alternative meanings for some keys.")
1210 (defun x-setup-function-keys (frame)
1211 "Set up `function-key-map' on FRAME for the X window system."
1212 ;; Don't do this twice on the same display, or it would break
1213 ;; normal-erase-is-backspace-mode.
1214 (unless (terminal-parameter frame 'x-setup-function-keys)
1215 ;; Map certain keypad keys into ASCII characters that people usually expect.
1216 (with-selected-frame frame
1217 (let ((map (copy-keymap x-alternatives-map)))
1218 (set-keymap-parent map (keymap-parent local-function-key-map))
1219 (set-keymap-parent local-function-key-map map)))
1220 (set-terminal-parameter frame 'x-setup-function-keys t)))
1222 ;; These tell read-char how to convert
1223 ;; these special chars to ASCII.
1224 (put 'backspace 'ascii-character 127)
1225 (put 'delete 'ascii-character 127)
1226 (put 'tab 'ascii-character ?\t)
1227 (put 'linefeed 'ascii-character ?\n)
1228 (put 'clear 'ascii-character 12)
1229 (put 'return 'ascii-character 13)
1230 (put 'escape 'ascii-character ?\e)
1233 ;;;; Keysyms
1235 (defun vendor-specific-keysyms (vendor)
1236 "Return the appropriate value of `system-key-alist' for VENDOR.
1237 VENDOR is a string containing the name of the X Server's vendor,
1238 as returned by `x-server-vendor'."
1239 (cond ((or (string-equal vendor "Hewlett-Packard Incorporated")
1240 (string-equal vendor "Hewlett-Packard Company"))
1241 '(( 168 . mute-acute)
1242 ( 169 . mute-grave)
1243 ( 170 . mute-asciicircum)
1244 ( 171 . mute-diaeresis)
1245 ( 172 . mute-asciitilde)
1246 ( 175 . lira)
1247 ( 190 . guilder)
1248 ( 252 . block)
1249 ( 256 . longminus)
1250 (65388 . reset)
1251 (65389 . system)
1252 (65390 . user)
1253 (65391 . clearline)
1254 (65392 . insertline)
1255 (65393 . deleteline)
1256 (65394 . insertchar)
1257 (65395 . deletechar)
1258 (65396 . backtab)
1259 (65397 . kp-backtab)))
1260 ;; Fixme: What about non-X11/NeWS sun server?
1261 ((or (string-equal vendor "X11/NeWS - Sun Microsystems Inc.")
1262 (string-equal vendor "X Consortium"))
1263 '((392976 . f36)
1264 (392977 . f37)
1265 (393056 . req)
1266 ;; These are for Sun under X11R6
1267 (393072 . props)
1268 (393073 . front)
1269 (393074 . copy)
1270 (393075 . open)
1271 (393076 . paste)
1272 (393077 . cut)))
1274 ;; This is used by DEC's X server.
1275 '((65280 . remove)))))
1277 ;; Latin-1
1278 (let ((i 160))
1279 (while (< i 256)
1280 (puthash i i x-keysym-table)
1281 (setq i (1+ i))))
1283 ;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
1284 ;; appendix to the X protocol definition.
1285 (dolist
1286 (pair
1288 ;; Latin-2
1289 (#x1a1 . ?\e,B!\e(B)
1290 (#x1a2 . ?\e,B"\e(B)
1291 (#x1a3 . ?\e,B#\e(B)
1292 (#x1a5 . ?\e,B%\e(B)
1293 (#x1a6 . ?\e,B&\e(B)
1294 (#x1a9 . ?\e,B)\e(B)
1295 (#x1aa . ?\e,B*\e(B)
1296 (#x1ab . ?\e,B+\e(B)
1297 (#x1ac . ?\e,B,\e(B)
1298 (#x1ae . ?\e,B.\e(B)
1299 (#x1af . ?\e,B/\e(B)
1300 (#x1b1 . ?\e,B1\e(B)
1301 (#x1b2 . ?\e,B2\e(B)
1302 (#x1b3 . ?\e,B3\e(B)
1303 (#x1b5 . ?\e,B5\e(B)
1304 (#x1b6 . ?\e,B6\e(B)
1305 (#x1b7 . ?\e,B7\e(B)
1306 (#x1b9 . ?\e,B9\e(B)
1307 (#x1ba . ?\e,B:\e(B)
1308 (#x1bb . ?\e,B;\e(B)
1309 (#x1bc . ?\e,B<\e(B)
1310 (#x1bd . ?\e,B=\e(B)
1311 (#x1be . ?\e,B>\e(B)
1312 (#x1bf . ?\e,B?\e(B)
1313 (#x1c0 . ?\e,B@\e(B)
1314 (#x1c3 . ?\e,BC\e(B)
1315 (#x1c5 . ?\e,BE\e(B)
1316 (#x1c6 . ?\e,BF\e(B)
1317 (#x1c8 . ?\e,BH\e(B)
1318 (#x1ca . ?\e,BJ\e(B)
1319 (#x1cc . ?\e,BL\e(B)
1320 (#x1cf . ?\e,BO\e(B)
1321 (#x1d0 . ?\e,BP\e(B)
1322 (#x1d1 . ?\e,BQ\e(B)
1323 (#x1d2 . ?\e,BR\e(B)
1324 (#x1d5 . ?\e,BU\e(B)
1325 (#x1d8 . ?\e,BX\e(B)
1326 (#x1d9 . ?\e,BY\e(B)
1327 (#x1db . ?\e,B[\e(B)
1328 (#x1de . ?\e,B^\e(B)
1329 (#x1e0 . ?\e,B`\e(B)
1330 (#x1e3 . ?\e,Bc\e(B)
1331 (#x1e5 . ?\e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ab . ?\e,D+\e(B)
1376 (#x3ac . ?\e,D,\e(B)
1377 (#x3b3 . ?\e,D3\e(B)
1378 (#x3b5 . ?\e,D5\e(B)
1379 (#x3b6 . ?\e,D6\e(B)
1380 (#x3ba . ?\e,D:\e(B)
1381 (#x3bb . ?\e,D;\e(B)
1382 (#x3bc . ?\e,D<\e(B)
1383 (#x3bd . ?\e,D=\e(B)
1384 (#x3bf . ?\e,D?\e(B)
1385 (#x3c0 . ?\e,D@\e(B)
1386 (#x3c7 . ?\e,DG\e(B)
1387 (#x3cc . ?\e,DL\e(B)
1388 (#x3cf . ?\e,DO\e(B)
1389 (#x3d1 . ?\e,DQ\e(B)
1390 (#x3d2 . ?\e,DR\e(B)
1391 (#x3d3 . ?\e,DS\e(B)
1392 (#x3d9 . ?\e,DY\e(B)
1393 (#x3dd . ?\e,D]\e(B)
1394 (#x3de . ?\e,D^\e(B)
1395 (#x3e0 . ?\e,D`\e(B)
1396 (#x3e7 . ?\e,Dg\e(B)
1397 (#x3ec . ?\e,Dl\e(B)
1398 (#x3ef . ?\e,Do\e(B)
1399 (#x3f1 . ?\e,Dq\e(B)
1400 (#x3f2 . ?\e,Dr\e(B)
1401 (#x3f3 . ?\e,Ds\e(B)
1402 (#x3f9 . ?\e,Dy\e(B)
1403 (#x3fd . ?\e,D}\e(B)
1404 (#x3fe . ?\e,D~\e(B)
1405 ;; Kana: Fixme: needs conversion to Japanese charset -- seems
1406 ;; to require jisx0213, for which the Unicode translation
1407 ;; isn't clear.
1408 (#x47e . ?\e(J~\e(B)
1409 (#x4a1 . ?\e$A!#\e(B)
1410 (#x4a2 . ?\\e$A!8\e(B)
1411 (#x4a3 . ?\\e$A!9\e(B)
1412 (#x4a4 . ?\e$A!"\e(B)
1413 (#x4a5 . ?\e$A!$\e(B)
1414 (#x4a6 . ?\e$A%r\e(B)
1415 (#x4a7 . ?\e$A%!\e(B)
1416 (#x4a8 . ?\e$A%#\e(B)
1417 (#x4a9 . ?\e$A%%\e(B)
1418 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B)
1460 (#x4d4 . ?\e$A%d\e(B)
1461 (#x4d5 . ?\e$A%f\e(B)
1462 (#x4d6 . ?\e$A%h\e(B)
1463 (#x4d7 . ?\e$A%i\e(B)
1464 (#x4d8 . ?\e$A%j\e(B)
1465 (#x4d9 . ?\e$A%k\e(B)
1466 (#x4da . ?\e$A%l\e(B)
1467 (#x4db . ?\e$A%m\e(B)
1468 (#x4dc . ?\e$A%o\e(B)
1469 (#x4dd . ?\e$A%s\e(B)
1470 (#x4de . ?\e$B!+\e(B)
1471 (#x4df . ?\e$B!,\e(B)
1472 ;; Arabic
1473 (#x5ac . ?\e,G,\e(B)
1474 (#x5bb . ?\e,G;\e(B)
1475 (#x5bf . ?\e,G?\e(B)
1476 (#x5c1 . ?\e,GA\e(B)
1477 (#x5c2 . ?\e,GB\e(B)
1478 (#x5c3 . ?\e,GC\e(B)
1479 (#x5c4 . ?\e,GD\e(B)
1480 (#x5c5 . ?\e,GE\e(B)
1481 (#x5c6 . ?\e,GF\e(B)
1482 (#x5c7 . ?\e,GG\e(B)
1483 (#x5c8 . ?\e,GH\e(B)
1484 (#x5c9 . ?\e,GI\e(B)
1485 (#x5ca . ?\e,GJ\e(B)
1486 (#x5cb . ?\e,GK\e(B)
1487 (#x5cc . ?\e,GL\e(B)
1488 (#x5cd . ?\e,GM\e(B)
1489 (#x5ce . ?\e,GN\e(B)
1490 (#x5cf . ?\e,GO\e(B)
1491 (#x5d0 . ?\e,GP\e(B)
1492 (#x5d1 . ?\e,GQ\e(B)
1493 (#x5d2 . ?\e,GR\e(B)
1494 (#x5d3 . ?\e,GS\e(B)
1495 (#x5d4 . ?\e,GT\e(B)
1496 (#x5d5 . ?\e,GU\e(B)
1497 (#x5d6 . ?\e,GV\e(B)
1498 (#x5d7 . ?\e,GW\e(B)
1499 (#x5d8 . ?\e,GX\e(B)
1500 (#x5d9 . ?\e,GY\e(B)
1501 (#x5da . ?\e,GZ\e(B)
1502 (#x5e0 . ?\e,G`\e(B)
1503 (#x5e1 . ?\e,Ga\e(B)
1504 (#x5e2 . ?\e,Gb\e(B)
1505 (#x5e3 . ?\e,Gc\e(B)
1506 (#x5e4 . ?\e,Gd\e(B)
1507 (#x5e5 . ?\e,Ge\e(B)
1508 (#x5e6 . ?\e,Gf\e(B)
1509 (#x5e7 . ?\e,Gg\e(B)
1510 (#x5e8 . ?\e,Gh\e(B)
1511 (#x5e9 . ?\e,Gi\e(B)
1512 (#x5ea . ?\e,Gj\e(B)
1513 (#x5eb . ?\e,Gk\e(B)
1514 (#x5ec . ?\e,Gl\e(B)
1515 (#x5ed . ?\e,Gm\e(B)
1516 (#x5ee . ?\e,Gn\e(B)
1517 (#x5ef . ?\e,Go\e(B)
1518 (#x5f0 . ?\e,Gp\e(B)
1519 (#x5f1 . ?\e,Gq\e(B)
1520 (#x5f2 . ?\e,Gr\e(B)
1521 ;; Cyrillic
1522 (#x680 . ?\e$,1)R\e(B)
1523 (#x681 . ?\e$,1)V\e(B)
1524 (#x682 . ?\e$,1)Z\e(B)
1525 (#x683 . ?\e$,1)\\e(B)
1526 (#x684 . ?\e$,1)b\e(B)
1527 (#x685 . ?\e$,1)n\e(B)
1528 (#x686 . ?\e$,1)p\e(B)
1529 (#x687 . ?\e$,1)r\e(B)
1530 (#x688 . ?\e$,1)v\e(B)
1531 (#x689 . ?\e$,1)x\e(B)
1532 (#x68a . ?\e$,1)z\e(B)
1533 (#x68c . ?\e$,1*8\e(B)
1534 (#x68d . ?\e$,1*B\e(B)
1535 (#x68e . ?\e$,1*H\e(B)
1536 (#x68f . ?\e$,1*N\e(B)
1537 (#x690 . ?\e$,1)S\e(B)
1538 (#x691 . ?\e$,1)W\e(B)
1539 (#x692 . ?\e$,1)[\e(B)
1540 (#x693 . ?\e$,1)]\e(B)
1541 (#x694 . ?\e$,1)c\e(B)
1542 (#x695 . ?\e$,1)o\e(B)
1543 (#x696 . ?\e$,1)q\e(B)
1544 (#x697 . ?\e$,1)s\e(B)
1545 (#x698 . ?\e$,1)w\e(B)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technical
1718 (#x8a1 . ?\e$,1|W\e(B)
1719 (#x8a2 . ?\e$A)0\e(B)
1720 (#x8a3 . ?\e$A)$\e(B)
1721 (#x8a4 . ?\e$,1{ \e(B)
1722 (#x8a5 . ?\e$,1{!\e(B)
1723 (#x8a6 . ?\e$A)&\e(B)
1724 (#x8a7 . ?\e$,1|A\e(B)
1725 (#x8a8 . ?\e$,1|C\e(B)
1726 (#x8a9 . ?\e$,1|D\e(B)
1727 (#x8aa . ?\e$,1|F\e(B)
1728 (#x8ab . ?\e$,1|;\e(B)
1729 (#x8ac . ?\e$,1|=\e(B)
1730 (#x8ad . ?\e$,1|>\e(B)
1731 (#x8ae . ?\e$,1|@\e(B)
1732 (#x8af . ?\e$,1|H\e(B)
1733 (#x8b0 . ?\e$,1|L\e(B)
1734 (#x8bc . ?\e$A!\\e(B)
1735 (#x8bd . ?\e$A!Y\e(B)
1736 (#x8be . ?\e$A!]\e(B)
1737 (#x8bf . ?\e$A!R\e(B)
1738 (#x8c0 . ?\e$A!`\e(B)
1739 (#x8c1 . ?\e$A!X\e(B)
1740 (#x8c2 . ?\e$A!^\e(B)
1741 (#x8c5 . ?\e$B"`\e(B)
1742 (#x8c8 . ?\e$(G"D\e(B)
1743 (#x8c9 . ?\e$(O"l\e(B)
1744 (#x8cd . ?\e$B"N\e(B)
1745 (#x8ce . ?\e$B"M\e(B)
1746 (#x8cf . ?\e$A!T\e(B)
1747 (#x8d6 . ?\e$A!L\e(B)
1748 (#x8da . ?\e$B">\e(B)
1749 (#x8db . ?\e$B"?\e(B)
1750 (#x8dc . ?\e$A!I\e(B)
1751 (#x8dd . ?\e$A!H\e(B)
1752 (#x8de . ?\e$A!D\e(B)
1753 (#x8df . ?\e$A!E\e(B)
1754 (#x8ef . ?\e$B"_\e(B)
1755 (#x8f6 . ?\e$,1!R\e(B)
1756 (#x8fb . ?\e$A!{\e(B)
1757 (#x8fc . ?\e$A!|\e(B)
1758 (#x8fd . ?\e$A!z\e(B)
1759 (#x8fe . ?\e$A!}\e(B)
1760 ;; Special
1761 (#x9e0 . ?\e$A!t\e(B)
1762 (#x9e1 . ?\e$(C"F\e(B)
1763 (#x9e2 . ?\e$(GB*\e(B)
1764 (#x9e3 . ?\e$(GB-\e(B)
1765 (#x9e4 . ?\e$(GB.\e(B)
1766 (#x9e5 . ?\e$(GB+\e(B)
1767 (#x9e8 . ?\e$,1}d\e(B)
1768 (#x9e9 . ?\e$(GB,\e(B)
1769 (#x9ea . ?\e$A)<\e(B)
1770 (#x9eb . ?\e$A)4\e(B)
1771 (#x9ec . ?\e$A)0\e(B)
1772 (#x9ed . ?\e$A)8\e(B)
1773 (#x9ee . ?\e$A)`\e(B)
1774 (#x9ef . ?\e$,1|Z\e(B)
1775 (#x9f0 . ?\e$,1|[\e(B)
1776 (#x9f1 . ?\e$A)$\e(B)
1777 (#x9f2 . ?\e$,1|\\e(B)
1778 (#x9f3 . ?\e$,1|]\e(B)
1779 (#x9f4 . ?\e$A)@\e(B)
1780 (#x9f5 . ?\e$A)H\e(B)
1781 (#x9f6 . ?\e$A)X\e(B)
1782 (#x9f7 . ?\e$A)P\e(B)
1783 (#x9f8 . ?\e$A)&\e(B)
1784 ;; Publishing
1785 (#xaa1 . ?\e$,1rc\e(B)
1786 (#xaa2 . ?\e$,1rb\e(B)
1787 (#xaa3 . ?\e$,1rd\e(B)
1788 (#xaa4 . ?\e$,1re\e(B)
1789 (#xaa5 . ?\e$,1rg\e(B)
1790 (#xaa6 . ?\e$,1rh\e(B)
1791 (#xaa7 . ?\e$,1ri\e(B)
1792 (#xaa8 . ?\e$,1rj\e(B)
1793 (#xaa9 . ?\e$(G!7\e(B)
1794 (#xaaa . ?\e$(G!9\e(B)
1795 (#xaae . ?\e$A!-\e(B)
1796 (#xaaf . ?\e$(G!-\e(B)
1797 (#xab0 . ?\e$(O'x\e(B)
1798 (#xab1 . ?\e$(O'y\e(B)
1799 (#xab2 . ?\e$(O'z\e(B)
1800 (#xab3 . ?\e$,1v6\e(B)
1801 (#xab4 . ?\e$,1v7\e(B)
1802 (#xab5 . ?\e$,1v8\e(B)
1803 (#xab6 . ?\e$,1v9\e(B)
1804 (#xab7 . ?\e$,1v:\e(B)
1805 (#xab8 . ?\e$(G""\e(B)
1806 (#xabb . ?\e$,1rr\e(B)
1807 (#xabc . ?\e$,1{)\e(B)
1808 (#xabe . ?\e$,1{*\e(B)
1809 (#xac3 . ?\e$(C({\e(B)
1810 (#xac4 . ?\e$(C(|\e(B)
1811 (#xac5 . ?\e$(C(}\e(B)
1812 (#xac6 . ?\e$(C(~\e(B)
1813 (#xac9 . ?\e$(D"o\e(B)
1814 (#xaca . ?\e$,2"s\e(B)
1815 (#xacc . ?\e$(O##\e(B)
1816 (#xacd . ?\e$(O#!\e(B)
1817 (#xace . ?\e$A!p\e(B)
1818 (#xacf . ?\e$,2!o\e(B)
1819 (#xad0 . ?\e,F!\e(B)
1820 (#xad1 . ?\e,F"\e(B)
1821 (#xad2 . ?\e,Y4\e(B)
1822 (#xad3 . ?\e,Y!\e(B)
1823 (#xad4 . ?\e$,1u^\e(B)
1824 (#xad6 . ?\e$A!d\e(B)
1825 (#xad7 . ?\e$A!e\e(B)
1826 (#xad9 . ?\e$,2%]\e(B)
1827 (#xadb . ?\e$,2!l\e(B)
1828 (#xadc . ?\e$(O#$\e(B)
1829 (#xadd . ?\e$(O#"\e(B)
1830 (#xade . ?\e$A!q\e(B)
1831 (#xadf . ?\e$,2!n\e(B)
1832 (#xae0 . ?\e$(O#?\e(B)
1833 (#xae1 . ?\e$,2!k\e(B)
1834 (#xae2 . ?\e$,2!m\e(B)
1835 (#xae3 . ?\e$A!w\e(B)
1836 (#xae4 . ?\e$(G!}\e(B)
1837 (#xae5 . ?\e$A!n\e(B)
1838 (#xae6 . ?\e$(O#@\e(B)
1839 (#xae7 . ?\e$,2!j\e(B)
1840 (#xae8 . ?\e$A!x\e(B)
1841 (#xae9 . ?\e$(G!~\e(B)
1842 (#xaea . ?\e$(C"P\e(B)
1843 (#xaeb . ?\e$(O-~\e(B)
1844 (#xaec . ?\e$(O&@\e(B)
1845 (#xaed . ?\e$(O&<\e(B)
1846 (#xaee . ?\e$(O&>\e(B)
1847 (#xaf0 . ?\e$,2%`\e(B)
1848 (#xaf1 . ?\e$B"w\e(B)
1849 (#xaf2 . ?\e$B"x\e(B)
1850 (#xaf3 . ?\e$(O'{\e(B)
1851 (#xaf4 . ?\e$,2%W\e(B)
1852 (#xaf5 . ?\e$B"t\e(B)
1853 (#xaf6 . ?\e$B"u\e(B)
1854 (#xaf7 . ?\e$A!a\e(B)
1855 (#xaf8 . ?\e$A!b\e(B)
1856 (#xaf9 . ?\e$(O&g\e(B)
1857 (#xafa . ?\e$,1zu\e(B)
1858 (#xafb . ?\e$,1uW\e(B)
1859 (#xafc . ?\e$,1s8\e(B)
1860 (#xafd . ?\e$,1rz\e(B)
1861 (#xafe . ?\e,Y%\e(B)
1862 ;; APL
1863 (#xba3 . ?<)
1864 (#xba6 . ?>)
1865 (#xba8 . ?\e$A!E\e(B)
1866 (#xba9 . ?\e$A!D\e(B)
1867 (#xbc0 . ?\e,A/\e(B)
1868 (#xbc2 . ?\e$A!M\e(B)
1869 (#xbc3 . ?\e$A!I\e(B)
1870 (#xbc4 . ?\e$,1zj\e(B)
1871 (#xbc6 . ?_)
1872 (#xbca . ?\e$,1x8\e(B)
1873 (#xbcc . ?\e$,1|5\e(B)
1874 (#xbce . ?\e$,1yd\e(B)
1875 (#xbcf . ?\e$A!p\e(B)
1876 (#xbd3 . ?\e$,1zh\e(B)
1877 (#xbd6 . ?\e$A!H\e(B)
1878 (#xbd8 . ?\e$B"?\e(B)
1879 (#xbda . ?\e$B">\e(B)
1880 (#xbdc . ?\e$,1yb\e(B)
1881 (#xbfc . ?\e$,1yc\e(B)
1882 ;; Hebrew
1883 (#xcdf . ?\e,H_\e(B)
1884 (#xce0 . ?\e,H`\e(B)
1885 (#xce1 . ?\e,Ha\e(B)
1886 (#xce2 . ?\e,Hb\e(B)
1887 (#xce3 . ?\e,Hc\e(B)
1888 (#xce4 . ?\e,Hd\e(B)
1889 (#xce5 . ?\e,He\e(B)
1890 (#xce6 . ?\e,Hf\e(B)
1891 (#xce7 . ?\e,Hg\e(B)
1892 (#xce8 . ?\e,Hh\e(B)
1893 (#xce9 . ?\e,Hi\e(B)
1894 (#xcea . ?\e,Hj\e(B)
1895 (#xceb . ?\e,Hk\e(B)
1896 (#xcec . ?\e,Hl\e(B)
1897 (#xced . ?\e,Hm\e(B)
1898 (#xcee . ?\e,Hn\e(B)
1899 (#xcef . ?\e,Ho\e(B)
1900 (#xcf0 . ?\e,Hp\e(B)
1901 (#xcf1 . ?\e,Hq\e(B)
1902 (#xcf2 . ?\e,Hr\e(B)
1903 (#xcf3 . ?\e,Hs\e(B)
1904 (#xcf4 . ?\e,Ht\e(B)
1905 (#xcf5 . ?\e,Hu\e(B)
1906 (#xcf6 . ?\e,Hv\e(B)
1907 (#xcf7 . ?\e,Hw\e(B)
1908 (#xcf8 . ?\e,Hx\e(B)
1909 (#xcf9 . ?\e,Hy\e(B)
1910 (#xcfa . ?\e,Hz\e(B)
1911 ;; Thai
1912 (#xda1 . ?\e,T!\e(B)
1913 (#xda2 . ?\e,T"\e(B)
1914 (#xda3 . ?\e,T#\e(B)
1915 (#xda4 . ?\e,T$\e(B)
1916 (#xda5 . ?\e,T%\e(B)
1917 (#xda6 . ?\e,T&\e(B)
1918 (#xda7 . ?\e,T'\e(B)
1919 (#xda8 . ?\e,T(\e(B)
1920 (#xda9 . ?\e,T)\e(B)
1921 (#xdaa . ?\e,T*\e(B)
1922 (#xdab . ?\e,T+\e(B)
1923 (#xdac . ?\e,T,\e(B)
1924 (#xdad . ?\e,T-\e(B)
1925 (#xdae . ?\e,T.\e(B)
1926 (#xdaf . ?\e,T/\e(B)
1927 (#xdb0 . ?\e,T0\e(B)
1928 (#xdb1 . ?\e,T1\e(B)
1929 (#xdb2 . ?\e,T2\e(B)
1930 (#xdb3 . ?\e,T3\e(B)
1931 (#xdb4 . ?\e,T4\e(B)
1932 (#xdb5 . ?\e,T5\e(B)
1933 (#xdb6 . ?\e,T6\e(B)
1934 (#xdb7 . ?\e,T7\e(B)
1935 (#xdb8 . ?\e,T8\e(B)
1936 (#xdb9 . ?\e,T9\e(B)
1937 (#xdba . ?\e,T:\e(B)
1938 (#xdbb . ?\e,T;\e(B)
1939 (#xdbc . ?\e,T<\e(B)
1940 (#xdbd . ?\e,T=\e(B)
1941 (#xdbe . ?\e,T>\e(B)
1942 (#xdbf . ?\e,T?\e(B)
1943 (#xdc0 . ?\e,T@\e(B)
1944 (#xdc1 . ?\e,TA\e(B)
1945 (#xdc2 . ?\e,TB\e(B)
1946 (#xdc3 . ?\e,TC\e(B)
1947 (#xdc4 . ?\e,TD\e(B)
1948 (#xdc5 . ?\e,TE\e(B)
1949 (#xdc6 . ?\e,TF\e(B)
1950 (#xdc7 . ?\e,TG\e(B)
1951 (#xdc8 . ?\e,TH\e(B)
1952 (#xdc9 . ?\e,TI\e(B)
1953 (#xdca . ?\e,TJ\e(B)
1954 (#xdcb . ?\e,TK\e(B)
1955 (#xdcc . ?\e,TL\e(B)
1956 (#xdcd . ?\e,TM\e(B)
1957 (#xdce . ?\e,TN\e(B)
1958 (#xdcf . ?\e,TO\e(B)
1959 (#xdd0 . ?\e,TP\e(B)
1960 (#xdd1 . ?\e,TQ\e(B)
1961 (#xdd2 . ?\e,TR\e(B)
1962 (#xdd3 . ?\e,TS\e(B)
1963 (#xdd4 . ?\e,TT\e(B)
1964 (#xdd5 . ?\e,TU\e(B)
1965 (#xdd6 . ?\e,TV\e(B)
1966 (#xdd7 . ?\e,TW\e(B)
1967 (#xdd8 . ?\e,TX\e(B)
1968 (#xdd9 . ?\e,TY\e(B)
1969 (#xdda . ?\e,TZ\e(B)
1970 (#xddf . ?\e,T_\e(B)
1971 (#xde0 . ?\e,T`\e(B)
1972 (#xde1 . ?\e,Ta\e(B)
1973 (#xde2 . ?\e,Tb\e(B)
1974 (#xde3 . ?\e,Tc\e(B)
1975 (#xde4 . ?\e,Td\e(B)
1976 (#xde5 . ?\e,Te\e(B)
1977 (#xde6 . ?\e,Tf\e(B)
1978 (#xde7 . ?\e,Tg\e(B)
1979 (#xde8 . ?\e,Th\e(B)
1980 (#xde9 . ?\e,Ti\e(B)
1981 (#xdea . ?\e,Tj\e(B)
1982 (#xdeb . ?\e,Tk\e(B)
1983 (#xdec . ?\e,Tl\e(B)
1984 (#xded . ?\e,Tm\e(B)
1985 (#xdf0 . ?\e,Tp\e(B)
1986 (#xdf1 . ?\e,Tq\e(B)
1987 (#xdf2 . ?\e,Tr\e(B)
1988 (#xdf3 . ?\e,Ts\e(B)
1989 (#xdf4 . ?\e,Tt\e(B)
1990 (#xdf5 . ?\e,Tu\e(B)
1991 (#xdf6 . ?\e,Tv\e(B)
1992 (#xdf7 . ?\e,Tw\e(B)
1993 (#xdf8 . ?\e,Tx\e(B)
1994 (#xdf9 . ?\e,Ty\e(B)
1995 ;; Korean
1996 (#xea1 . ?\e$(C$!\e(B)
1997 (#xea2 . ?\e$(C$"\e(B)
1998 (#xea3 . ?\e$(C$#\e(B)
1999 (#xea4 . ?\e$(C$$\e(B)
2000 (#xea5 . ?\e$(C$%\e(B)
2001 (#xea6 . ?\e$(C$&\e(B)
2002 (#xea7 . ?\e$(C$'\e(B)
2003 (#xea8 . ?\e$(C$(\e(B)
2004 (#xea9 . ?\e$(C$)\e(B)
2005 (#xeaa . ?\e$(C$*\e(B)
2006 (#xeab . ?\e$(C$+\e(B)
2007 (#xeac . ?\e$(C$,\e(B)
2008 (#xead . ?\e$(C$-\e(B)
2009 (#xeae . ?\e$(C$.\e(B)
2010 (#xeaf . ?\e$(C$/\e(B)
2011 (#xeb0 . ?\e$(C$0\e(B)
2012 (#xeb1 . ?\e$(C$1\e(B)
2013 (#xeb2 . ?\e$(C$2\e(B)
2014 (#xeb3 . ?\e$(C$3\e(B)
2015 (#xeb4 . ?\e$(C$4\e(B)
2016 (#xeb5 . ?\e$(C$5\e(B)
2017 (#xeb6 . ?\e$(C$6\e(B)
2018 (#xeb7 . ?\e$(C$7\e(B)
2019 (#xeb8 . ?\e$(C$8\e(B)
2020 (#xeb9 . ?\e$(C$9\e(B)
2021 (#xeba . ?\e$(C$:\e(B)
2022 (#xebb . ?\e$(C$;\e(B)
2023 (#xebc . ?\e$(C$<\e(B)
2024 (#xebd . ?\e$(C$=\e(B)
2025 (#xebe . ?\e$(C$>\e(B)
2026 (#xebf . ?\e$(C$?\e(B)
2027 (#xec0 . ?\e$(C$@\e(B)
2028 (#xec1 . ?\e$(C$A\e(B)
2029 (#xec2 . ?\e$(C$B\e(B)
2030 (#xec3 . ?\e$(C$C\e(B)
2031 (#xec4 . ?\e$(C$D\e(B)
2032 (#xec5 . ?\e$(C$E\e(B)
2033 (#xec6 . ?\e$(C$F\e(B)
2034 (#xec7 . ?\e$(C$G\e(B)
2035 (#xec8 . ?\e$(C$H\e(B)
2036 (#xec9 . ?\e$(C$I\e(B)
2037 (#xeca . ?\e$(C$J\e(B)
2038 (#xecb . ?\e$(C$K\e(B)
2039 (#xecc . ?\e$(C$L\e(B)
2040 (#xecd . ?\e$(C$M\e(B)
2041 (#xece . ?\e$(C$N\e(B)
2042 (#xecf . ?\e$(C$O\e(B)
2043 (#xed0 . ?\e$(C$P\e(B)
2044 (#xed1 . ?\e$(C$Q\e(B)
2045 (#xed2 . ?\e$(C$R\e(B)
2046 (#xed3 . ?\e$(C$S\e(B)
2047 (#xed4 . ?\e$,1LH\e(B)
2048 (#xed5 . ?\e$,1LI\e(B)
2049 (#xed6 . ?\e$,1LJ\e(B)
2050 (#xed7 . ?\e$,1LK\e(B)
2051 (#xed8 . ?\e$,1LL\e(B)
2052 (#xed9 . ?\e$,1LM\e(B)
2053 (#xeda . ?\e$,1LN\e(B)
2054 (#xedb . ?\e$,1LO\e(B)
2055 (#xedc . ?\e$,1LP\e(B)
2056 (#xedd . ?\e$,1LQ\e(B)
2057 (#xede . ?\e$,1LR\e(B)
2058 (#xedf . ?\e$,1LS\e(B)
2059 (#xee0 . ?\e$,1LT\e(B)
2060 (#xee1 . ?\e$,1LU\e(B)
2061 (#xee2 . ?\e$,1LV\e(B)
2062 (#xee3 . ?\e$,1LW\e(B)
2063 (#xee4 . ?\e$,1LX\e(B)
2064 (#xee5 . ?\e$,1LY\e(B)
2065 (#xee6 . ?\e$,1LZ\e(B)
2066 (#xee7 . ?\e$,1L[\e(B)
2067 (#xee8 . ?\e$,1L\\e(B)
2068 (#xee9 . ?\e$,1L]\e(B)
2069 (#xeea . ?\e$,1L^\e(B)
2070 (#xeeb . ?\e$,1L_\e(B)
2071 (#xeec . ?\e$,1L`\e(B)
2072 (#xeed . ?\e$,1La\e(B)
2073 (#xeee . ?\e$,1Lb\e(B)
2074 (#xeef . ?\e$(C$]\e(B)
2075 (#xef0 . ?\e$(C$a\e(B)
2076 (#xef1 . ?\e$(C$h\e(B)
2077 (#xef2 . ?\e$(C$o\e(B)
2078 (#xef3 . ?\e$(C$q\e(B)
2079 (#xef4 . ?\e$(C$t\e(B)
2080 (#xef5 . ?\e$(C$v\e(B)
2081 (#xef6 . ?\e$(C$}\e(B)
2082 (#xef7 . ?\e$(C$~\e(B)
2083 (#xef8 . ?\e$,1M+\e(B)
2084 (#xef9 . ?\e$,1M0\e(B)
2085 (#xefa . ?\e$,1M9\e(B)
2086 (#xeff . ?\e$,1tI\e(B)
2087 ;; Latin-5
2088 ;; Latin-6
2089 ;; Latin-7
2090 ;; Latin-8
2091 ;; Latin-9
2092 (#x13bc . ?\e,b<\e(B)
2093 (#x13bd . ?\e,b=\e(B)
2094 (#x13be . ?\e,_/\e(B)
2095 ;; Currency
2096 (#x20a0 . ?\e$,1t@\e(B)
2097 (#x20a1 . ?\e$,1tA\e(B)
2098 (#x20a2 . ?\e$,1tB\e(B)
2099 (#x20a3 . ?\e$,1tC\e(B)
2100 (#x20a4 . ?\e$,1tD\e(B)
2101 (#x20a5 . ?\e$,1tE\e(B)
2102 (#x20a6 . ?\e$,1tF\e(B)
2103 (#x20a7 . ?\e$,1tG\e(B)
2104 (#x20a8 . ?\e$,1tH\e(B)
2105 (#x20aa . ?\e$,1tJ\e(B)
2106 (#x20ab . ?\e$,1tK\e(B)
2107 (#x20ac . ?\e,b$\e(B)))
2108 (puthash (car pair) (cdr pair) x-keysym-table))
2110 ;; The following keysym codes for graphics are listed in the document
2111 ;; as not having unicodes available:
2113 ;; #x08b1 TOP LEFT SUMMATION Technical
2114 ;; #x08b2 BOTTOM LEFT SUMMATION Technical
2115 ;; #x08b3 TOP VERTICAL SUMMATION CONNECTOR Technical
2116 ;; #x08b4 BOTTOM VERTICAL SUMMATION CONNECTOR Technical
2117 ;; #x08b5 TOP RIGHT SUMMATION Technical
2118 ;; #x08b6 BOTTOM RIGHT SUMMATION Technical
2119 ;; #x08b7 RIGHT MIDDLE SUMMATION Technical
2120 ;; #x0aac SIGNIFICANT BLANK SYMBOL Publish
2121 ;; #x0abd DECIMAL POINT Publish
2122 ;; #x0abf MARKER Publish
2123 ;; #x0acb TRADEMARK SIGN IN CIRCLE Publish
2124 ;; #x0ada HEXAGRAM Publish
2125 ;; #x0aff CURSOR Publish
2126 ;; #x0dde THAI MAIHANAKAT Thai
2129 ;;;; Selections and cut buffers
2131 ;; We keep track of the last text selected here, so we can check the
2132 ;; current selection against it, and avoid passing back our own text
2133 ;; from x-cut-buffer-or-selection-value. We track all three
2134 ;; seperately in case another X application only sets one of them
2135 ;; (say the cut buffer) we aren't fooled by the PRIMARY or
2136 ;; CLIPBOARD selection staying the same.
2137 (defvar x-last-selected-text-clipboard nil
2138 "The value of the CLIPBOARD X selection last time we selected or
2139 pasted text.")
2140 (defvar x-last-selected-text-primary nil
2141 "The value of the PRIMARY X selection last time we selected or
2142 pasted text.")
2143 (defvar x-last-selected-text-cut nil
2144 "The value of the X cut buffer last time we selected or pasted text.
2145 The actual text stored in the X cut buffer is what encoded from this value.")
2146 (defvar x-last-selected-text-cut-encoded nil
2147 "The value of the X cut buffer last time we selected or pasted text.
2148 This is the actual text stored in the X cut buffer.")
2149 (defvar x-last-cut-buffer-coding 'iso-latin-1
2150 "The coding we last used to encode/decode the text from the X cut buffer")
2152 (defvar x-cut-buffer-max 20000 ; Note this value is overridden below.
2153 "Max number of characters to put in the cut buffer.
2154 It is said that overlarge strings are slow to put into the cut buffer.")
2156 (defcustom x-select-enable-clipboard nil
2157 "Non-nil means cutting and pasting uses the clipboard.
2158 This is in addition to, but in preference to, the primary selection."
2159 :type 'boolean
2160 :group 'killing)
2162 (defcustom x-select-enable-primary t
2163 "Non-nil means cutting and pasting uses the primary selection."
2164 :type 'boolean
2165 :group 'killing)
2167 (defun x-select-text (text &optional push)
2168 "Make TEXT, a string, the primary X selection.
2169 Also, set the value of X cut buffer 0, for backward compatibility
2170 with older X applications.
2171 gildea@stop.mail-abuse.org says it's not desirable to put kills
2172 in the clipboard."
2173 ;; With multi-tty, this function may be called from a tty frame.
2174 (when (eq (framep (selected-frame)) 'x)
2175 ;; Don't send the cut buffer too much text.
2176 ;; It becomes slow, and if really big it causes errors.
2177 (cond ((>= (length text) x-cut-buffer-max)
2178 (x-set-cut-buffer "" push)
2179 (setq x-last-selected-text-cut ""
2180 x-last-selected-text-cut-encoded ""))
2182 (setq x-last-selected-text-cut text
2183 x-last-cut-buffer-coding 'iso-latin-1
2184 x-last-selected-text-cut-encoded
2185 ;; ICCCM says cut buffer always contain ISO-Latin-1
2186 (encode-coding-string text 'iso-latin-1))
2187 (x-set-cut-buffer x-last-selected-text-cut-encoded push)))
2188 (when x-select-enable-primary
2189 (x-set-selection 'PRIMARY text)
2190 (setq x-last-selected-text-primary text))
2191 (when x-select-enable-clipboard
2192 (x-set-selection 'CLIPBOARD text)
2193 (setq x-last-selected-text-clipboard text))))
2195 (defvar x-select-request-type nil
2196 "*Data type request for X selection.
2197 The value is one of the following data types, a list of them, or nil:
2198 `COMPOUND_TEXT', `UTF8_STRING', `STRING', `TEXT'
2200 If the value is one of the above symbols, try only the specified
2201 type.
2203 If the value is a list of them, try each of them in the specified
2204 order until succeed.
2206 The value nil is the same as this list:
2207 \(UTF8_STRING COMPOUND_TEXT STRING)
2210 ;; Get a selection value of type TYPE by calling x-get-selection with
2211 ;; an appropiate DATA-TYPE argument decided by `x-select-request-type'.
2212 ;; The return value is already decoded. If x-get-selection causes an
2213 ;; error, this function return nil.
2215 (defun x-selection-value (type)
2216 (let ((request-type (or x-select-request-type
2217 '(UTF8_STRING COMPOUND_TEXT STRING)))
2218 text)
2219 (if (consp request-type)
2220 (while (and request-type (not text))
2221 (condition-case nil
2222 (setq text (x-get-selection type (car request-type)))
2223 (error nil))
2224 (setq request-type (cdr request-type)))
2225 (condition-case nil
2226 (setq text (x-get-selection type request-type))
2227 (error nil)))
2228 (if text
2229 (remove-text-properties 0 (length text) '(foreign-selection nil) text))
2230 text))
2232 ;; Return the value of the current X selection.
2233 ;; Consult the selection, and the cut buffer. Treat empty strings
2234 ;; as if they were unset.
2235 ;; If this function is called twice and finds the same text,
2236 ;; it returns nil the second time. This is so that a single
2237 ;; selection won't be added to the kill ring over and over.
2238 (defun x-cut-buffer-or-selection-value ()
2239 ;; With multi-tty, this function may be called from a tty frame.
2240 (when (eq (framep (selected-frame)) 'x)
2241 (let (clip-text primary-text cut-text)
2242 (when x-select-enable-clipboard
2243 (setq clip-text (x-selection-value 'CLIPBOARD))
2244 (if (string= clip-text "") (setq clip-text nil))
2246 ;; Check the CLIPBOARD selection for 'newness', is it different
2247 ;; from what we remebered them to be last time we did a
2248 ;; cut/paste operation.
2249 (setq clip-text
2250 (cond ;; check clipboard
2251 ((or (not clip-text) (string= clip-text ""))
2252 (setq x-last-selected-text-clipboard nil))
2253 ((eq clip-text x-last-selected-text-clipboard) nil)
2254 ((string= clip-text x-last-selected-text-clipboard)
2255 ;; Record the newer string,
2256 ;; so subsequent calls can use the `eq' test.
2257 (setq x-last-selected-text-clipboard clip-text)
2258 nil)
2259 (t (setq x-last-selected-text-clipboard clip-text)))))
2261 (when x-select-enable-primary
2262 (setq primary-text (x-selection-value 'PRIMARY))
2263 ;; Check the PRIMARY selection for 'newness', is it different
2264 ;; from what we remebered them to be last time we did a
2265 ;; cut/paste operation.
2266 (setq primary-text
2267 (cond ;; check primary selection
2268 ((or (not primary-text) (string= primary-text ""))
2269 (setq x-last-selected-text-primary nil))
2270 ((eq primary-text x-last-selected-text-primary) nil)
2271 ((string= primary-text x-last-selected-text-primary)
2272 ;; Record the newer string,
2273 ;; so subsequent calls can use the `eq' test.
2274 (setq x-last-selected-text-primary primary-text)
2275 nil)
2277 (setq x-last-selected-text-primary primary-text)))))
2279 (setq cut-text (x-get-cut-buffer 0))
2281 ;; Check the x cut buffer for 'newness', is it different
2282 ;; from what we remebered them to be last time we did a
2283 ;; cut/paste operation.
2284 (setq cut-text
2285 (let ((next-coding (or next-selection-coding-system 'iso-latin-1)))
2286 (cond ;; check cut buffer
2287 ((or (not cut-text) (string= cut-text ""))
2288 (setq x-last-selected-text-cut nil))
2289 ;; This short cut doesn't work because x-get-cut-buffer
2290 ;; always returns a newly created string.
2291 ;; ((eq cut-text x-last-selected-text-cut) nil)
2292 ((and (string= cut-text x-last-selected-text-cut-encoded)
2293 (eq x-last-cut-buffer-coding next-coding))
2294 ;; See the comment above. No need of this recording.
2295 ;; Record the newer string,
2296 ;; so subsequent calls can use the `eq' test.
2297 ;; (setq x-last-selected-text-cut cut-text)
2298 nil)
2300 (setq x-last-selected-text-cut-encoded cut-text
2301 x-last-cut-buffer-coding next-coding
2302 x-last-selected-text-cut
2303 ;; ICCCM says cut buffer always contain ISO-Latin-1, but
2304 ;; use next-selection-coding-system if not nil.
2305 (decode-coding-string
2306 cut-text next-coding))))))
2308 ;; As we have done one selection, clear this now.
2309 (setq next-selection-coding-system nil)
2311 ;; At this point we have recorded the current values for the
2312 ;; selection from clipboard (if we are supposed to) primary,
2313 ;; and cut buffer. So return the first one that has changed
2314 ;; (which is the first non-null one).
2316 ;; NOTE: There will be cases where more than one of these has
2317 ;; changed and the new values differ. This indicates that
2318 ;; something like the following has happened since the last time
2319 ;; we looked at the selections: Application X set all the
2320 ;; selections, then Application Y set only one or two of them (say
2321 ;; just the cut-buffer). In this case since we don't have
2322 ;; timestamps there is no way to know what the 'correct' value to
2323 ;; return is. The nice thing to do would be to tell the user we
2324 ;; saw multiple possible selections and ask the user which was the
2325 ;; one they wanted.
2326 ;; This code is still a big improvement because now the user can
2327 ;; futz with the current selection and get emacs to pay attention
2328 ;; to the cut buffer again (previously as soon as clipboard or
2329 ;; primary had been set the cut buffer would essentially never be
2330 ;; checked again).
2331 (or clip-text primary-text cut-text)
2334 ;; Arrange for the kill and yank functions to set and check the clipboard.
2335 (setq interprogram-cut-function 'x-select-text)
2336 (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
2338 (defun x-clipboard-yank ()
2339 "Insert the clipboard contents, or the last stretch of killed text."
2340 (interactive "*")
2341 (let ((clipboard-text (x-selection-value 'CLIPBOARD))
2342 (x-select-enable-clipboard t))
2343 (if (and clipboard-text (> (length clipboard-text) 0))
2344 (kill-new clipboard-text))
2345 (yank)))
2347 (defun x-menu-bar-open (&optional frame)
2348 "Open the menu bar if `menu-bar-mode' is on. otherwise call `tmm-menubar'."
2349 (interactive "i")
2350 (if menu-bar-mode (accelerate-menu frame)
2351 (tmm-menubar)))
2354 ;;; Window system initialization.
2356 (defun x-win-suspend-error ()
2357 (error "Suspending an Emacs running under X makes no sense"))
2359 (defvar x-initialized nil
2360 "Non-nil if the X window system has been initialized.")
2362 (defun x-initialize-window-system ()
2363 "Initialize Emacs for X frames and open the first connection to an X server."
2364 ;; Make sure we have a valid resource name.
2365 (or (stringp x-resource-name)
2366 (let (i)
2367 (setq x-resource-name (invocation-name))
2369 ;; Change any . or * characters in x-resource-name to hyphens,
2370 ;; so as not to choke when we use it in X resource queries.
2371 (while (setq i (string-match "[.*]" x-resource-name))
2372 (aset x-resource-name i ?-))))
2374 (x-open-connection (or x-display-name
2375 (setq x-display-name (or (getenv "DISPLAY" (selected-frame))
2376 (getenv "DISPLAY"))))
2377 x-command-line-resources
2378 ;; Exit Emacs with fatal error if this fails and we
2379 ;; are the initial display.
2380 (eq initial-window-system 'x))
2382 (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
2383 x-cut-buffer-max))
2385 ;; Setup the default fontset.
2386 (setup-default-fontset)
2388 ;; Create the standard fontset.
2389 (create-fontset-from-fontset-spec standard-fontset-spec t)
2391 ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
2392 (create-fontset-from-x-resource)
2394 ;; Set scroll bar mode to right if set by X resources. Default is left.
2395 (if (equal (x-get-resource "verticalScrollBars" "ScrollBars") "right")
2396 (customize-set-variable 'scroll-bar-mode 'right))
2398 ;; Apply a geometry resource to the initial frame. Put it at the end
2399 ;; of the alist, so that anything specified on the command line takes
2400 ;; precedence.
2401 (let* ((res-geometry (x-get-resource "geometry" "Geometry"))
2402 parsed)
2403 (if res-geometry
2404 (progn
2405 (setq parsed (x-parse-geometry res-geometry))
2406 ;; If the resource specifies a position,
2407 ;; call the position and size "user-specified".
2408 (if (or (assq 'top parsed) (assq 'left parsed))
2409 (setq parsed (cons '(user-position . t)
2410 (cons '(user-size . t) parsed))))
2411 ;; All geometry parms apply to the initial frame.
2412 (setq initial-frame-alist (append initial-frame-alist parsed))
2413 ;; The size parms apply to all frames. Don't set it if there are
2414 ;; sizes there already (from command line).
2415 (if (and (assq 'height parsed)
2416 (not (assq 'height default-frame-alist)))
2417 (setq default-frame-alist
2418 (cons (cons 'height (cdr (assq 'height parsed)))
2419 default-frame-alist)))
2420 (if (and (assq 'width parsed)
2421 (not (assq 'width default-frame-alist)))
2422 (setq default-frame-alist
2423 (cons (cons 'width (cdr (assq 'width parsed)))
2424 default-frame-alist))))))
2426 ;; Check the reverseVideo resource.
2427 (let ((case-fold-search t))
2428 (let ((rv (x-get-resource "reverseVideo" "ReverseVideo")))
2429 (if (and rv
2430 (string-match "^\\(true\\|yes\\|on\\)$" rv))
2431 (setq default-frame-alist
2432 (cons '(reverse . t) default-frame-alist)))))
2434 ;; Set x-selection-timeout, measured in milliseconds.
2435 (let ((res-selection-timeout
2436 (x-get-resource "selectionTimeout" "SelectionTimeout")))
2437 (setq x-selection-timeout 20000)
2438 (if res-selection-timeout
2439 (setq x-selection-timeout (string-to-number res-selection-timeout))))
2441 ;; Don't let Emacs suspend under X.
2442 (add-hook 'suspend-hook 'x-win-suspend-error)
2444 ;; Turn off window-splitting optimization; X is usually fast enough
2445 ;; that this is only annoying.
2446 (setq split-window-keep-point t)
2448 ;; Motif direct handling of f10 wasn't working right,
2449 ;; So temporarily we've turned it off in lwlib-Xm.c
2450 ;; and turned the Emacs f10 back on.
2451 ;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
2452 ;; (if (featurep 'motif)
2453 ;; (global-set-key [f10] 'ignore))
2455 ;; Turn on support for mouse wheels.
2456 (mouse-wheel-mode 1)
2458 ;; Enable CLIPBOARD copy/paste through menu bar commands.
2459 (menu-bar-enable-clipboard)
2461 ;; Override Paste so it looks at CLIPBOARD first.
2462 (define-key menu-bar-edit-menu [paste]
2463 (append '(menu-item "Paste" x-clipboard-yank
2464 :enable (not buffer-read-only)
2465 :help "Paste (yank) text most recently cut/copied")
2466 nil))
2468 (setq x-initialized t))
2470 (add-to-list 'handle-args-function-alist '(x . x-handle-args))
2471 (add-to-list 'frame-creation-function-alist '(x . x-create-frame-with-faces))
2472 (add-to-list 'window-system-initialization-alist '(x . x-initialize-window-system))
2474 ;; Initiate drag and drop
2475 (add-hook 'after-make-frame-functions 'x-dnd-init-frame)
2476 (define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event)
2478 (defcustom x-gtk-stock-map
2480 ("etc/images/new" . "gtk-new")
2481 ("etc/images/open" . "gtk-open")
2482 ("etc/images/diropen" . "n:system-file-manager")
2483 ("etc/images/close" . "gtk-close")
2484 ("etc/images/save" . "gtk-save")
2485 ("etc/images/saveas" . "gtk-save-as")
2486 ("etc/images/undo" . "gtk-undo")
2487 ("etc/images/cut" . "gtk-cut")
2488 ("etc/images/copy" . "gtk-copy")
2489 ("etc/images/paste" . "gtk-paste")
2490 ("etc/images/search" . "gtk-find")
2491 ("etc/images/print" . "gtk-print")
2492 ("etc/images/preferences" . "gtk-preferences")
2493 ("etc/images/help" . "gtk-help")
2494 ("etc/images/left-arrow" . "gtk-go-back")
2495 ("etc/images/right-arrow" . "gtk-go-forward")
2496 ("etc/images/home" . "gtk-home")
2497 ("etc/images/jump-to" . "gtk-jump-to")
2498 ("etc/images/index" . "gtk-index")
2499 ("etc/images/search" . "gtk-find")
2500 ("etc/images/exit" . "gtk-quit")
2501 ("etc/images/cancel" . "gtk-cancel")
2502 ("etc/images/info" . "gtk-info")
2503 ("etc/images/bookmark_add" . "n:bookmark_add")
2504 ;; Used in Gnus and/or MH-E:
2505 ("etc/images/attach" . "gtk-attach")
2506 ("etc/images/connect" . "gtk-connect")
2507 ("etc/images/contact" . "gtk-contact")
2508 ("etc/images/delete" . "gtk-delete")
2509 ("etc/images/describe" . "gtk-properties")
2510 ("etc/images/disconnect" . "gtk-disconnect")
2511 ;; ("etc/images/exit" . "gtk-exit")
2512 ("etc/images/lock-broken" . "gtk-lock_broken")
2513 ("etc/images/lock-ok" . "gtk-lock_ok")
2514 ("etc/images/lock" . "gtk-lock")
2515 ("etc/images/next-page" . "gtk-next-page")
2516 ("etc/images/refresh" . "gtk-refresh")
2517 ("etc/images/sort-ascending" . "gtk-sort-ascending")
2518 ("etc/images/sort-column-ascending" . "gtk-sort-column-ascending")
2519 ("etc/images/sort-criteria" . "gtk-sort-criteria")
2520 ("etc/images/sort-descending" . "gtk-sort-descending")
2521 ("etc/images/sort-row-ascending" . "gtk-sort-row-ascending")
2522 ("images/gnus/toggle-subscription" . "gtk-task-recurring")
2523 ("images/mail/compose" . "gtk-mail-compose")
2524 ("images/mail/copy" . "gtk-mail-copy")
2525 ("images/mail/forward" . "gtk-mail-forward")
2526 ("images/mail/inbox" . "gtk-inbox")
2527 ("images/mail/move" . "gtk-mail-move")
2528 ("images/mail/not-spam" . "gtk-not-spam")
2529 ("images/mail/outbox" . "gtk-outbox")
2530 ("images/mail/reply-all" . "gtk-mail-reply-to-all")
2531 ("images/mail/reply" . "gtk-mail-reply")
2532 ("images/mail/save-draft" . "gtk-mail-handling")
2533 ("images/mail/send" . "gtk-mail-send")
2534 ("images/mail/spam" . "gtk-spam")
2535 ;; No themed versions available:
2536 ;; mail/preview (combining stock_mail and stock_zoom)
2537 ;; mail/save (combining stock_mail, stock_save and stock_convert)
2539 "How icons for tool bars are mapped to Gtk+ stock items.
2540 Emacs must be compiled with the Gtk+ toolkit for this to have any effect.
2541 A value that begins with n: denotes a named icon instead of a stock icon."
2542 :version "22.2"
2543 :type '(choice (repeat (choice symbol
2544 (cons (string :tag "Emacs icon")
2545 (string :tag "Stock/named")))))
2546 :group 'x)
2548 (defcustom icon-map-list '(x-gtk-stock-map)
2549 "A list of alists that maps icon file names to stock/named icons.
2550 The alists are searched in the order they appear. The first match is used.
2551 The keys in the alists are file names without extension and with two directory
2552 components. For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm
2553 to stock item gtk-open, use:
2555 (\"etc/images/open\" . \"gtk-open\")
2557 Themes also have named icons. To map to one of those, use n: before the name:
2559 (\"etc/images/diropen\" . \"n:system-file-manager\")
2561 The list elements are either the symbol name for the alist or the
2562 alist itself.
2564 If you don't want stock icons, set the variable to nil."
2565 :version "22.2"
2566 :type '(choice (const :tag "Don't use stock icons" nil)
2567 (repeat (choice symbol
2568 (cons (string :tag "Emacs icon")
2569 (string :tag "Stock/named")))))
2570 :group 'x)
2572 (defun x-gtk-map-stock (file)
2573 "Map icon with file name FILE to a Gtk+ stock name, using `x-gtk-stock-map'."
2574 (if (stringp file)
2575 (let* ((file-sans (file-name-sans-extension file))
2576 (key (and (string-match "/\\([^/]+/[^/]+/[^/]+$\\)" file-sans)
2577 (match-string 1 file-sans)))
2578 (value))
2579 (mapc (lambda (elem)
2580 (let ((assoc (if (symbolp elem) (symbol-value elem) elem)))
2581 (or value (setq value (assoc-string (or key file-sans)
2582 assoc)))))
2583 icon-map-list)
2584 (and value (cdr value)))
2585 nil))
2587 (provide 'x-win)
2589 ;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
2590 ;;; x-win.el ends here