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