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