(terminal-init-linux): Load t-mouse.
[bpt/emacs.git] / lisp / term / x-win.el
CommitLineData
cf07d2bd 1;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit;-*-
2fe590dc 2
aa360da1
GM
3;; Copyright (C) 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
4;; 2008 Free Software Foundation, Inc.
5cdb3f1e
ER
5
6;; Author: FSF
cf07d2bd 7;; Keywords: terminals, i18n
5cdb3f1e 8
2fe590dc
EN
9;; This file is part of GNU Emacs.
10
1fecc8fe 11;; GNU Emacs is free software: you can redistribute it and/or modify
2fe590dc 12;; it under the terms of the GNU General Public License as published by
1fecc8fe
GM
13;; the Free Software Foundation, either version 3 of the License, or
14;; (at your option) any later version.
2fe590dc
EN
15
16;; GNU Emacs is distributed in the hope that it will be useful,
17;; but WITHOUT ANY WARRANTY; without even the implied warranty of
18;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19;; GNU General Public License for more details.
20
21;; You should have received a copy of the GNU General Public License
1fecc8fe 22;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
63f77899 23
5cdb3f1e 24;;; Commentary:
63f77899 25
e9cda827
KL
26;; X-win.el: this file defines functions to initialize the X window
27;; system and process X-specific command line parameters before
28;; creating the first X frame.
29
30;; Note that contrary to previous Emacs versions, the act of loading
31;; this file should not have the side effect of initializing the
32;; window system or processing command line arguments (this file is
33;; now loaded in loadup.el). See the variables
34;; `handle-args-function-alist' and
35;; `window-system-initialization-alist' for more details.
63f77899
JB
36
37;; startup.el will then examine startup files, and eventually call the hooks
cf07d2bd 38;; which create the first window(s).
5cdb3f1e
ER
39
40;;; Code:
63f77899
JB
41\f
42;; These are the standard X switches from the Xt Initialize.c file of
43;; Release 4.
44
45;; Command line Resource Manager string
46
47;; +rv *reverseVideo
48;; +synchronous *synchronous
49;; -background *background
50;; -bd *borderColor
51;; -bg *background
52;; -bordercolor *borderColor
53;; -borderwidth .borderWidth
54;; -bw .borderWidth
55;; -display .display
56;; -fg *foreground
57;; -fn *font
58;; -font *font
59;; -foreground *foreground
60;; -geometry .geometry
61;; -iconic .iconic
62;; -name .name
63;; -reverse *reverseVideo
64;; -rv *reverseVideo
65;; -selectionTimeout .selectionTimeout
66;; -synchronous *synchronous
63f77899
JB
67;; -xrm
68
63f77899
JB
69;; An alist of X options and the function which handles them. See
70;; ../startup.el.
71
2246281f 72(if (not (fboundp 'x-create-frame))
800642d2 73 (error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
db95369b 74
0cc89026 75(require 'frame)
3eb43f71 76(require 'mouse)
b16795eb 77(require 'scroll-bar)
ffe1dd7a
JB
78(require 'faces)
79(require 'select)
290cb602 80(require 'menu-bar)
6acdd93e 81(require 'fontset)
6b61353c 82(require 'x-dnd)
63c86e17 83
19b08de9 84(defvar x-invocation-args)
cc5e32c5
JB
85(defvar x-keysym-table)
86(defvar x-selection-timeout)
87(defvar x-session-id)
88(defvar x-session-previous-id)
19b08de9 89
f6f6d98c
RS
90(defvar x-command-line-resources nil)
91
63f77899
JB
92;; Handler for switches of the form "-switch value" or "-switch".
93(defun x-handle-switch (switch)
80128ceb 94 (let ((aelt (assoc switch command-line-x-option-alist)))
63f77899 95 (if aelt
80128ceb
RS
96 (let ((param (nth 3 aelt))
97 (value (nth 4 aelt)))
98 (if value
99 (setq default-frame-alist
100 (cons (cons param value)
101 default-frame-alist))
0cc89026 102 (setq default-frame-alist
80128ceb
RS
103 (cons (cons param
104 (car x-invocation-args))
105 default-frame-alist)
106 x-invocation-args (cdr x-invocation-args)))))))
107
108;; Handler for switches of the form "-switch n"
109(defun x-handle-numeric-switch (switch)
110 (let ((aelt (assoc switch command-line-x-option-alist)))
111 (if aelt
112 (let ((param (nth 3 aelt)))
0cc89026 113 (setq default-frame-alist
80128ceb 114 (cons (cons param
027a4b6b 115 (string-to-number (car x-invocation-args)))
0cc89026 116 default-frame-alist)
80128ceb
RS
117 x-invocation-args
118 (cdr x-invocation-args))))))
63f77899 119
2f9b363a
EZ
120;; Handle options that apply to initial frame only
121(defun x-handle-initial-switch (switch)
122 (let ((aelt (assoc switch command-line-x-option-alist)))
123 (if aelt
124 (let ((param (nth 3 aelt))
125 (value (nth 4 aelt)))
126 (if value
127 (setq initial-frame-alist
128 (cons (cons param value)
129 initial-frame-alist))
130 (setq initial-frame-alist
131 (cons (cons param
132 (car x-invocation-args))
133 initial-frame-alist)
134 x-invocation-args (cdr x-invocation-args)))))))
135
0389072b
JD
136(defun x-handle-no-bitmap-icon (switch)
137 (setq default-frame-alist (cons '(icon-type) default-frame-alist)))
138
ef599142
RS
139;; Make -iconic apply only to the initial frame!
140(defun x-handle-iconic (switch)
141 (setq initial-frame-alist
142 (cons '(visibility . icon) initial-frame-alist)))
143
800642d2
JB
144;; Handle the -xrm option.
145(defun x-handle-xrm-switch (switch)
2025ddca
GM
146 (unless (consp x-invocation-args)
147 (error "%s: missing argument to `%s' option" (invocation-name) switch))
148 (setq x-command-line-resources
149 (if (null x-command-line-resources)
150 (car x-invocation-args)
151 (concat x-command-line-resources "\n" (car x-invocation-args))))
f6f6d98c
RS
152 (setq x-invocation-args (cdr x-invocation-args)))
153
aa360da1
GM
154(declare-function x-parse-geometry "frame.c" (string))
155
63f77899
JB
156;; Handle the geometry option
157(defun x-handle-geometry (switch)
ea8d3061
RS
158 (let* ((geo (x-parse-geometry (car x-invocation-args)))
159 (left (assq 'left geo))
160 (top (assq 'top geo))
161 (height (assq 'height geo))
162 (width (assq 'width geo)))
163 (if (or height width)
164 (setq default-frame-alist
165 (append default-frame-alist
bfabe882
RS
166 '((user-size . t))
167 (if height (list height))
168 (if width (list width)))
169 initial-frame-alist
170 (append initial-frame-alist
ea8d3061
RS
171 '((user-size . t))
172 (if height (list height))
173 (if width (list width)))))
174 (if (or left top)
175 (setq initial-frame-alist
176 (append initial-frame-alist
177 '((user-position . t))
178 (if left (list left))
179 (if top (list top)))))
180 (setq x-invocation-args (cdr x-invocation-args))))
63f77899 181
aa360da1
GM
182(defvar x-resource-name)
183
66f229be
RS
184;; Handle the -name option. Set the variable x-resource-name
185;; to the option's operand; set the name of
800642d2 186;; the initial frame, too.
66f229be 187(defun x-handle-name-switch (switch)
800642d2
JB
188 (or (consp x-invocation-args)
189 (error "%s: missing argument to `%s' option" (invocation-name) switch))
190 (setq x-resource-name (car x-invocation-args)
191 x-invocation-args (cdr x-invocation-args))
66f229be
RS
192 (setq initial-frame-alist (cons (cons 'name x-resource-name)
193 initial-frame-alist)))
800642d2 194
350c1745
JD
195;; Handle the --parent-id option.
196(defun x-handle-parent-id (switch)
197 (or (consp x-invocation-args)
198 (error "%s: missing argument to `%s' option" (invocation-name) switch))
f9c7b08c
GM
199 (setq initial-frame-alist (cons
200 (cons 'parent-id
201 (string-to-number (car x-invocation-args)))
202 initial-frame-alist)
203 x-invocation-args (cdr x-invocation-args)))
350c1745 204
63f77899 205(defvar x-display-name nil
6f6c5fb3
CY
206 "The name of the X display on which Emacs was started.
207
366f1741 208For the X display name of individual frames, see the `display'
6f6c5fb3 209frame parameter.")
63f77899
JB
210
211(defun x-handle-display (switch)
e50f1c1a 212 "Handle -display DISPLAY option."
63f77899 213 (setq x-display-name (car x-invocation-args)
d98f0b87
RS
214 x-invocation-args (cdr x-invocation-args))
215 ;; Make subshell programs see the same DISPLAY value Emacs really uses.
216 ;; Note that this isn't completely correct, since Emacs can use
217 ;; multiple displays. However, there is no way to tell an already
218 ;; running subshell which display the user is currently typing on.
219 (setenv "DISPLAY" x-display-name))
63f77899 220
8769d648 221(defun x-handle-args (args)
dc20df95
RS
222 "Process the X-related command line options in ARGS.
223This is done before the user's startup file is loaded. They are copied to
80128ceb 224`x-invocation-args', from which the X-related things are extracted, first
8769d648 225the switch (e.g., \"-fg\") in the following code, and possible values
a4e104bf 226\(e.g., \"black\") in the option handler code (e.g., x-handle-switch).
80128ceb
RS
227This function returns ARGS minus the arguments that have been processed."
228 ;; We use ARGS to accumulate the args that we don't handle here, to return.
63c86e17
JB
229 (setq x-invocation-args args
230 args nil)
0dd96d4c
RS
231 (while (and x-invocation-args
232 (not (equal (car x-invocation-args) "--")))
63c86e17 233 (let* ((this-switch (car x-invocation-args))
e491912f 234 (orig-this-switch this-switch)
80128ceb 235 completion argval aelt handler)
63c86e17 236 (setq x-invocation-args (cdr x-invocation-args))
e491912f
RS
237 ;; Check for long options with attached arguments
238 ;; and separate out the attached option argument into argval.
239 (if (string-match "^--[^=]*=" this-switch)
240 (setq argval (substring this-switch (match-end 0))
241 this-switch (substring this-switch 0 (1- (match-end 0)))))
80128ceb
RS
242 ;; Complete names of long options.
243 (if (string-match "^--" this-switch)
244 (progn
245 (setq completion (try-completion this-switch command-line-x-option-alist))
246 (if (eq completion t)
247 ;; Exact match for long option.
248 nil
249 (if (stringp completion)
250 (let ((elt (assoc completion command-line-x-option-alist)))
251 ;; Check for abbreviated long option.
252 (or elt
253 (error "Option `%s' is ambiguous" this-switch))
254 (setq this-switch completion))))))
255 (setq aelt (assoc this-switch command-line-x-option-alist))
256 (if aelt (setq handler (nth 2 aelt)))
257 (if handler
e491912f
RS
258 (if argval
259 (let ((x-invocation-args
260 (cons argval x-invocation-args)))
80128ceb
RS
261 (funcall handler this-switch))
262 (funcall handler this-switch))
263 (setq args (cons orig-this-switch args)))))
0dd96d4c 264 (nconc (nreverse args) x-invocation-args))
941a391a
JD
265
266;; Handle the --smid switch. This is used by the session manager
267;; to give us back our session id we had on the previous run.
268(defun x-handle-smid (switch)
269 (or (consp x-invocation-args)
270 (error "%s: missing argument to `%s' option" (invocation-name) switch))
271 (setq x-session-previous-id (car x-invocation-args)
272 x-invocation-args (cdr x-invocation-args)))
273
274(defvar emacs-save-session-functions nil
c3ef5084
SM
275 "Special hook run when a save-session event occurs.
276The functions do not get any argument.
941a391a
JD
277Functions can return non-nil to inform the session manager that the
278window system shutdown should be aborted.
279
280See also `emacs-session-save'.")
281
282(defun emacs-session-filename (session-id)
283 "Construct a filename to save the session in based on SESSION-ID.
284If the directory ~/.emacs.d exists, we make a filename in there, otherwise
285a file in the home directory."
286 (let ((basename (concat "session." session-id))
c093939c 287 (emacs-dir user-emacs-directory))
941a391a
JD
288 (expand-file-name (if (file-directory-p emacs-dir)
289 (concat emacs-dir basename)
290 (concat "~/.emacs-" basename)))))
db95369b 291
941a391a
JD
292(defun emacs-session-save ()
293 "This function is called when the window system is shutting down.
294If this function returns non-nil, the window system shutdown is cancelled.
295
296When a session manager tells Emacs that the window system is shutting
297down, this function is called. It calls the functions in the hook
298`emacs-save-session-functions'. Functions are called with the current
299buffer set to a temporary buffer. Functions should use `insert' to insert
300lisp code to save the session state. The buffer is saved
301in a file in the home directory of the user running Emacs. The file
302is evaluated when Emacs is restarted by the session manager.
303
304If any of the functions returns non-nil, no more functions are called
305and this function returns non-nil. This will inform the session manager
306that it should abort the window system shutdown."
307 (let ((filename (emacs-session-filename x-session-id))
308 (buf (get-buffer-create (concat " *SES " x-session-id))))
309 (when (file-exists-p filename)
310 (delete-file filename))
311 (with-current-buffer buf
312 (let ((cancel-shutdown (condition-case nil
3842fde1 313 ;; A return of t means cancel the shutdown.
db95369b 314 (run-hook-with-args-until-success
941a391a
JD
315 'emacs-save-session-functions)
316 (error t))))
317 (unless cancel-shutdown
318 (write-file filename))
319 (kill-buffer buf)
320 cancel-shutdown))))
321
1e4f6cec 322(defun emacs-session-restore (previous-session-id)
941a391a
JD
323 "Restore the Emacs session if started by a session manager.
324The file saved by `emacs-session-save' is evaluated and deleted if it
325exists."
1e4f6cec 326 (let ((filename (emacs-session-filename previous-session-id)))
941a391a
JD
327 (when (file-exists-p filename)
328 (load-file filename)
329 (delete-file filename)
330 (message "Restored session data"))))
331
db95369b
JB
332
333
63f77899
JB
334\f
335;;
336;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.
337;;
338
339(defconst x-pointer-X-cursor 0)
340(defconst x-pointer-arrow 2)
341(defconst x-pointer-based-arrow-down 4)
342(defconst x-pointer-based-arrow-up 6)
343(defconst x-pointer-boat 8)
344(defconst x-pointer-bogosity 10)
345(defconst x-pointer-bottom-left-corner 12)
346(defconst x-pointer-bottom-right-corner 14)
347(defconst x-pointer-bottom-side 16)
348(defconst x-pointer-bottom-tee 18)
349(defconst x-pointer-box-spiral 20)
350(defconst x-pointer-center-ptr 22)
351(defconst x-pointer-circle 24)
352(defconst x-pointer-clock 26)
353(defconst x-pointer-coffee-mug 28)
354(defconst x-pointer-cross 30)
355(defconst x-pointer-cross-reverse 32)
356(defconst x-pointer-crosshair 34)
357(defconst x-pointer-diamond-cross 36)
358(defconst x-pointer-dot 38)
359(defconst x-pointer-dotbox 40)
360(defconst x-pointer-double-arrow 42)
361(defconst x-pointer-draft-large 44)
362(defconst x-pointer-draft-small 46)
363(defconst x-pointer-draped-box 48)
364(defconst x-pointer-exchange 50)
365(defconst x-pointer-fleur 52)
366(defconst x-pointer-gobbler 54)
367(defconst x-pointer-gumby 56)
368(defconst x-pointer-hand1 58)
369(defconst x-pointer-hand2 60)
370(defconst x-pointer-heart 62)
371(defconst x-pointer-icon 64)
372(defconst x-pointer-iron-cross 66)
373(defconst x-pointer-left-ptr 68)
374(defconst x-pointer-left-side 70)
375(defconst x-pointer-left-tee 72)
376(defconst x-pointer-leftbutton 74)
377(defconst x-pointer-ll-angle 76)
378(defconst x-pointer-lr-angle 78)
379(defconst x-pointer-man 80)
380(defconst x-pointer-middlebutton 82)
381(defconst x-pointer-mouse 84)
382(defconst x-pointer-pencil 86)
383(defconst x-pointer-pirate 88)
384(defconst x-pointer-plus 90)
385(defconst x-pointer-question-arrow 92)
386(defconst x-pointer-right-ptr 94)
387(defconst x-pointer-right-side 96)
388(defconst x-pointer-right-tee 98)
389(defconst x-pointer-rightbutton 100)
390(defconst x-pointer-rtl-logo 102)
391(defconst x-pointer-sailboat 104)
392(defconst x-pointer-sb-down-arrow 106)
393(defconst x-pointer-sb-h-double-arrow 108)
394(defconst x-pointer-sb-left-arrow 110)
395(defconst x-pointer-sb-right-arrow 112)
396(defconst x-pointer-sb-up-arrow 114)
397(defconst x-pointer-sb-v-double-arrow 116)
398(defconst x-pointer-shuttle 118)
399(defconst x-pointer-sizing 120)
400(defconst x-pointer-spider 122)
401(defconst x-pointer-spraycan 124)
402(defconst x-pointer-star 126)
403(defconst x-pointer-target 128)
404(defconst x-pointer-tcross 130)
405(defconst x-pointer-top-left-arrow 132)
406(defconst x-pointer-top-left-corner 134)
407(defconst x-pointer-top-right-corner 136)
408(defconst x-pointer-top-side 138)
409(defconst x-pointer-top-tee 140)
410(defconst x-pointer-trek 142)
411(defconst x-pointer-ul-angle 144)
412(defconst x-pointer-umbrella 146)
413(defconst x-pointer-ur-angle 148)
414(defconst x-pointer-watch 150)
415(defconst x-pointer-xterm 152)
5cb94d12 416(defconst x-pointer-invisible 255)
63f77899
JB
417\f
418;;
419;; Available colors
420;;
3f2f222a
CY
421;; The ordering of the colors is chosen for the user's convenience in
422;; `list-colors-display', which displays the reverse of this list.
423;; Roughly speaking, `list-colors-display' orders by (i) named shades
424;; of grey with hue 0.0, sorted by value (ii) named colors with
425;; saturation 1.0, sorted by hue, (iii) named non-white colors with
426;; saturation less than 1.0, sorted by hue, (iv) other named shades of
427;; white, (v) numbered colors sorted by hue, and (vi) numbered shades
428;; of grey.
429
430(defvar x-colors
431 '("gray100" "gray99" "gray98" "gray97" "gray96" "gray95" "gray94" "gray93" "gray92"
432 "gray91" "gray90" "gray89" "gray88" "gray87" "gray86" "gray85" "gray84" "gray83"
433 "gray82" "gray81" "gray80" "gray79" "gray78" "gray77" "gray76" "gray75" "gray74"
434 "gray73" "gray72" "gray71" "gray70" "gray69" "gray68" "gray67" "gray66" "gray65"
435 "gray64" "gray63" "gray62" "gray61" "gray60" "gray59" "gray58" "gray57" "gray56"
436 "gray55" "gray54" "gray53" "gray52" "gray51" "gray50" "gray49" "gray48" "gray47"
437 "gray46" "gray45" "gray44" "gray43" "gray42" "gray41" "gray40" "gray39" "gray38"
438 "gray37" "gray36" "gray35" "gray34" "gray33" "gray32" "gray31" "gray30" "gray29"
439 "gray28" "gray27" "gray26" "gray25" "gray24" "gray23" "gray22" "gray21" "gray20"
440 "gray19" "gray18" "gray17" "gray16" "gray15" "gray14" "gray13" "gray12" "gray11"
441 "gray10" "gray9" "gray8" "gray7" "gray6" "gray5" "gray4" "gray3" "gray2" "gray1"
442 "gray0" "LightPink1" "LightPink2" "LightPink3" "LightPink4" "pink1" "pink2" "pink3"
443 "pink4" "PaleVioletRed1" "PaleVioletRed2" "PaleVioletRed3" "PaleVioletRed4"
444 "LavenderBlush1" "LavenderBlush2" "LavenderBlush3" "LavenderBlush4" "VioletRed1"
445 "VioletRed2" "VioletRed3" "VioletRed4" "HotPink1" "HotPink2" "HotPink3" "HotPink4"
446 "DeepPink1" "DeepPink2" "DeepPink3" "DeepPink4" "maroon1" "maroon2" "maroon3"
447 "maroon4" "orchid1" "orchid2" "orchid3" "orchid4" "plum1" "plum2" "plum3" "plum4"
448 "thistle1" "thistle2" "thistle3" "thistle4" "MediumOrchid1" "MediumOrchid2"
449 "MediumOrchid3" "MediumOrchid4" "DarkOrchid1" "DarkOrchid2" "DarkOrchid3"
450 "DarkOrchid4" "purple1" "purple2" "purple3" "purple4" "MediumPurple1"
451 "MediumPurple2" "MediumPurple3" "MediumPurple4" "SlateBlue1" "SlateBlue2"
452 "SlateBlue3" "SlateBlue4" "RoyalBlue1" "RoyalBlue2" "RoyalBlue3" "RoyalBlue4"
453 "LightSteelBlue1" "LightSteelBlue2" "LightSteelBlue3" "LightSteelBlue4" "SlateGray1"
454 "SlateGray2" "SlateGray3" "SlateGray4" "DodgerBlue1" "DodgerBlue2" "DodgerBlue3"
455 "DodgerBlue4" "SteelBlue1" "SteelBlue2" "SteelBlue3" "SteelBlue4" "SkyBlue1"
456 "SkyBlue2" "SkyBlue3" "SkyBlue4" "LightSkyBlue1" "LightSkyBlue2" "LightSkyBlue3"
457 "LightSkyBlue4" "LightBlue1" "LightBlue2" "LightBlue3" "LightBlue4" "CadetBlue1"
458 "CadetBlue2" "CadetBlue3" "CadetBlue4" "azure1" "azure2" "azure3" "azure4"
459 "LightCyan1" "LightCyan2" "LightCyan3" "LightCyan4" "PaleTurquoise1"
460 "PaleTurquoise2" "PaleTurquoise3" "PaleTurquoise4" "DarkSlateGray1" "DarkSlateGray2"
461 "DarkSlateGray3" "DarkSlateGray4" "aquamarine1" "aquamarine2" "aquamarine3"
462 "aquamarine4" "SeaGreen1" "SeaGreen2" "SeaGreen3" "SeaGreen4" "honeydew1"
463 "honeydew2" "honeydew3" "honeydew4" "DarkSeaGreen1" "DarkSeaGreen2" "DarkSeaGreen3"
464 "DarkSeaGreen4" "PaleGreen1" "PaleGreen2" "PaleGreen3" "PaleGreen4"
465 "DarkOliveGreen1" "DarkOliveGreen2" "DarkOliveGreen3" "DarkOliveGreen4" "OliveDrab1"
466 "OliveDrab2" "OliveDrab3" "OliveDrab4" "ivory1" "ivory2" "ivory3" "ivory4"
467 "LightYellow1" "LightYellow2" "LightYellow3" "LightYellow4" "khaki1" "khaki2"
468 "khaki3" "khaki4" "LemonChiffon1" "LemonChiffon2" "LemonChiffon3" "LemonChiffon4"
469 "LightGoldenrod1" "LightGoldenrod2" "LightGoldenrod3" "LightGoldenrod4" "cornsilk1"
470 "cornsilk2" "cornsilk3" "cornsilk4" "goldenrod1" "goldenrod2" "goldenrod3"
471 "goldenrod4" "DarkGoldenrod1" "DarkGoldenrod2" "DarkGoldenrod3" "DarkGoldenrod4"
472 "wheat1" "wheat2" "wheat3" "wheat4" "NavajoWhite1" "NavajoWhite2" "NavajoWhite3"
473 "NavajoWhite4" "burlywood1" "burlywood2" "burlywood3" "burlywood4" "AntiqueWhite1"
474 "AntiqueWhite2" "AntiqueWhite3" "AntiqueWhite4" "bisque1" "bisque2" "bisque3"
475 "bisque4" "tan1" "tan2" "tan3" "tan4" "PeachPuff1" "PeachPuff2" "PeachPuff3"
476 "PeachPuff4" "seashell1" "seashell2" "seashell3" "seashell4" "chocolate1"
477 "chocolate2" "chocolate3" "chocolate4" "sienna1" "sienna2" "sienna3" "sienna4"
478 "LightSalmon1" "LightSalmon2" "LightSalmon3" "LightSalmon4" "salmon1" "salmon2"
479 "salmon3" "salmon4" "coral1" "coral2" "coral3" "coral4" "tomato1" "tomato2"
480 "tomato3" "tomato4" "MistyRose1" "MistyRose2" "MistyRose3" "MistyRose4" "snow1"
481 "snow2" "snow3" "snow4" "RosyBrown1" "RosyBrown2" "RosyBrown3" "RosyBrown4"
482 "IndianRed1" "IndianRed2" "IndianRed3" "IndianRed4" "firebrick1" "firebrick2"
483 "firebrick3" "firebrick4" "brown1" "brown2" "brown3" "brown4" "magenta1" "magenta2"
484 "magenta3" "magenta4" "blue1" "blue2" "blue3" "blue4" "DeepSkyBlue1" "DeepSkyBlue2"
485 "DeepSkyBlue3" "DeepSkyBlue4" "turquoise1" "turquoise2" "turquoise3" "turquoise4"
486 "cyan1" "cyan2" "cyan3" "cyan4" "SpringGreen1" "SpringGreen2" "SpringGreen3"
487 "SpringGreen4" "green1" "green2" "green3" "green4" "chartreuse1" "chartreuse2"
488 "chartreuse3" "chartreuse4" "yellow1" "yellow2" "yellow3" "yellow4" "gold1" "gold2"
489 "gold3" "gold4" "orange1" "orange2" "orange3" "orange4" "DarkOrange1" "DarkOrange2"
490 "DarkOrange3" "DarkOrange4" "OrangeRed1" "OrangeRed2" "OrangeRed3" "OrangeRed4"
491 "red1" "red2" "red3" "red4" "lavender blush" "ghost white" "lavender" "alice blue"
492 "azure" "light cyan" "mint cream" "honeydew" "ivory" "light goldenrod yellow"
493 "light yellow" "beige" "floral white" "old lace" "blanched almond" "moccasin"
494 "papaya whip" "bisque" "antique white" "linen" "peach puff" "seashell" "misty rose"
495 "snow" "light pink" "pink" "hot pink" "deep pink" "maroon" "pale violet red"
496 "violet red" "medium violet red" "violet" "plum" "thistle" "orchid" "medium orchid"
497 "dark orchid" "purple" "blue violet" "medium purple" "light slate blue"
498 "medium slate blue" "slate blue" "dark slate blue" "midnight blue" "navy"
499 "dark blue" "light steel blue" "cornflower blue" "dodger blue" "royal blue"
500 "light slate gray" "slate gray" "dark slate gray" "steel blue" "cadet blue"
2f8c51b5 501 "light sky blue" "sky blue" "light blue" "powder blue" "pale turquoise" "turquoise"
3f2f222a
CY
502 "medium turquoise" "dark cyan" "aquamarine" "medium aquamarine" "light sea green"
503 "medium sea green" "sea green" "dark sea green" "pale green" "lime green"
504 "forest green" "light green" "green yellow" "yellow green" "olive drab"
505 "dark olive green" "lemon chiffon" "khaki" "dark khaki" "cornsilk"
506 "pale goldenrod" "light goldenrod" "goldenrod" "dark goldenrod" "wheat"
507 "navajo white" "tan" "burlywood" "sandy brown" "peru" "chocolate" "saddle brown"
508 "sienna" "rosy brown" "dark salmon" "coral" "tomato" "light salmon" "salmon"
509 "light coral" "indian red" "firebrick" "brown" "dark red" "magenta"
2f8c51b5 510 "dark magenta" "dark violet" "medium blue" "blue" "deep sky blue"
3f2f222a
CY
511 "cyan" "medium spring green" "spring green" "green" "lawn green" "chartreuse"
512 "yellow" "gold" "orange" "dark orange" "orange red" "red" "white" "white smoke"
513 "gainsboro" "light grey" "gray" "dark grey" "dim gray" "black" )
38fb1ad4
GM
514 "The list of X colors from the `rgb.txt' file.
515XConsortium: rgb.txt,v 10.41 94/02/20 18:39:36 rws Exp")
63f77899 516
f795f633
EZ
517(defun xw-defined-colors (&optional frame)
518 "Internal function called by `defined-colors', which see."
891eb3fe 519 (or frame (setq frame (selected-frame)))
63f77899
JB
520 (let ((all-colors x-colors)
521 (this-color nil)
522 (defined-colors nil))
523 (while all-colors
524 (setq this-color (car all-colors)
525 all-colors (cdr all-colors))
79b24da3 526 (and (color-supported-p this-color frame t)
63f77899
JB
527 (setq defined-colors (cons this-color defined-colors))))
528 defined-colors))
63f77899 529\f
98bf0c8d
JB
530;;;; Function keys
531
bbd2296c
SM
532(defvar x-alternatives-map
533 (let ((map (make-sparse-keymap)))
534 ;; Map certain keypad keys into ASCII characters that people usually expect.
535 (define-key map [backspace] [127])
536 (define-key map [delete] [127])
537 (define-key map [tab] [?\t])
538 (define-key map [linefeed] [?\n])
539 (define-key map [clear] [?\C-l])
540 (define-key map [return] [?\C-m])
541 (define-key map [escape] [?\e])
542 (define-key map [M-backspace] [?\M-\d])
543 (define-key map [M-delete] [?\M-\d])
544 (define-key map [M-tab] [?\M-\t])
545 (define-key map [M-linefeed] [?\M-\n])
546 (define-key map [M-clear] [?\M-\C-l])
547 (define-key map [M-return] [?\M-\C-m])
548 (define-key map [M-escape] [?\M-\e])
549 (define-key map [iso-lefttab] [backtab])
f6959eb4 550 (define-key map [S-iso-lefttab] [backtab])
bbd2296c
SM
551 map)
552 "Keymap of possible alternative meanings for some keys.")
553
2bb819d5
KL
554(defun x-setup-function-keys (frame)
555 "Set up `function-key-map' on FRAME for the X window system."
b97a79c4
KL
556 ;; Don't do this twice on the same display, or it would break
557 ;; normal-erase-is-backspace-mode.
558 (unless (terminal-parameter frame 'x-setup-function-keys)
559 ;; Map certain keypad keys into ASCII characters that people usually expect.
560 (with-selected-frame frame
bbd2296c
SM
561 (let ((map (copy-keymap x-alternatives-map)))
562 (set-keymap-parent map (keymap-parent local-function-key-map))
563 (set-keymap-parent local-function-key-map map)))
b97a79c4 564 (set-terminal-parameter frame 'x-setup-function-keys t)))
3d80ef3f
RS
565
566;; These tell read-char how to convert
567;; these special chars to ASCII.
568(put 'backspace 'ascii-character 127)
569(put 'delete 'ascii-character 127)
570(put 'tab 'ascii-character ?\t)
571(put 'linefeed 'ascii-character ?\n)
572(put 'clear 'ascii-character 12)
573(put 'return 'ascii-character 13)
574(put 'escape 'ascii-character ?\e)
afa43349 575
cf07d2bd
DL
576\f
577;;;; Keysyms
578
9b4234ae 579(defun vendor-specific-keysyms (vendor)
089bc712 580 "Return the appropriate value of `system-key-alist' for VENDOR.
9b4234ae 581VENDOR is a string containing the name of the X Server's vendor,
089bc712 582as returned by `x-server-vendor'."
f3041af1 583 (cond ((or (string-equal vendor "Hewlett-Packard Incorporated")
3f18a142 584 (string-equal vendor "Hewlett-Packard Company"))
9b4234ae
RS
585 '(( 168 . mute-acute)
586 ( 169 . mute-grave)
587 ( 170 . mute-asciicircum)
588 ( 171 . mute-diaeresis)
589 ( 172 . mute-asciitilde)
590 ( 175 . lira)
591 ( 190 . guilder)
592 ( 252 . block)
593 ( 256 . longminus)
594 (65388 . reset)
595 (65389 . system)
596 (65390 . user)
597 (65391 . clearline)
598 (65392 . insertline)
599 (65393 . deleteline)
600 (65394 . insertchar)
601 (65395 . deletechar)
602 (65396 . backtab)
603 (65397 . kp-backtab)))
cf07d2bd 604 ;; Fixme: What about non-X11/NeWS sun server?
04486a2d
KH
605 ((or (string-equal vendor "X11/NeWS - Sun Microsystems Inc.")
606 (string-equal vendor "X Consortium"))
51a8e1cc
KH
607 '((392976 . f36)
608 (392977 . f37)
9b4234ae
RS
609 (393056 . req)
610 ;; These are for Sun under X11R6
611 (393072 . props)
612 (393073 . front)
613 (393074 . copy)
614 (393075 . open)
615 (393076 . paste)
616 (393077 . cut)))
617 (t
618 ;; This is used by DEC's X server.
619 '((65280 . remove)))))
620
58fa26d4 621;; Latin-1
cf07d2bd
DL
622(let ((i 160))
623 (while (< i 256)
1d912b36 624 (puthash i i x-keysym-table)
cf07d2bd
DL
625 (setq i (1+ i))))
626
627;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
628;; appendix to the X protocol definition.
629(dolist
630 (pair
631 '(
632 ;; Latin-2
633 (#x1a1 . ?\e,B!\e(B)
634 (#x1a2 . ?\e,B"\e(B)
635 (#x1a3 . ?\e,B#\e(B)
636 (#x1a5 . ?\e,B%\e(B)
637 (#x1a6 . ?\e,B&\e(B)
638 (#x1a9 . ?\e,B)\e(B)
639 (#x1aa . ?\e,B*\e(B)
640 (#x1ab . ?\e,B+\e(B)
641 (#x1ac . ?\e,B,\e(B)
642 (#x1ae . ?\e,B.\e(B)
643 (#x1af . ?\e,B/\e(B)
644 (#x1b1 . ?\e,B1\e(B)
645 (#x1b2 . ?\e,B2\e(B)
646 (#x1b3 . ?\e,B3\e(B)
647 (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?\e,C&\e(B)
693 (#x2a9 . ?\e,C)\e(B)
694 (#x2ab . ?\e,C+\e(B)
695 (#x2ac . ?\e,C,\e(B)
696 (#x2b1 . ?\e,C1\e(B)
697 (#x2b6 . ?\e,C6\e(B)
698 (#x2b9 . ?\e,C9\e(B)
699 (#x2bb . ?\e,C;\e(B)
700 (#x2bc . ?\e,C<\e(B)
701 (#x2c5 . ?\e,CE\e(B)
702 (#x2c6 . ?\e,CF\e(B)
703 (#x2d5 . ?\e,CU\e(B)
704 (#x2d8 . ?\e,CX\e(B)
705 (#x2dd . ?\e,C]\e(B)
706 (#x2de . ?\e,C^\e(B)
707 (#x2e5 . ?\e,Ce\e(B)
708 (#x2e6 . ?\e,Cf\e(B)
709 (#x2f5 . ?\e,Cu\e(B)
710 (#x2f8 . ?\e,Cx\e(B)
711 (#x2fd . ?\e,C}\e(B)
712 (#x2fe . ?\e,C~\e(B)
713 ;; Latin-4
714 (#x3a2 . ?\e,D"\e(B)
715 (#x3a3 . ?\e,D#\e(B)
716 (#x3a5 . ?\e,D%\e(B)
717 (#x3a6 . ?\e,D&\e(B)
718 (#x3aa . ?\e,D*\e(B)
719 (#x3ab . ?\e,D+\e(B)
720 (#x3ac . ?\e,D,\e(B)
721 (#x3b3 . ?\e,D3\e(B)
722 (#x3b5 . ?\e,D5\e(B)
723 (#x3b6 . ?\e,D6\e(B)
724 (#x3ba . ?\e,D:\e(B)
725 (#x3bb . ?\e,D;\e(B)
726 (#x3bc . ?\e,D<\e(B)
727 (#x3bd . ?\e,D=\e(B)
728 (#x3bf . ?\e,D?\e(B)
729 (#x3c0 . ?\e,D@\e(B)
730 (#x3c7 . ?\e,DG\e(B)
731 (#x3cc . ?\e,DL\e(B)
732 (#x3cf . ?\e,DO\e(B)
733 (#x3d1 . ?\e,DQ\e(B)
734 (#x3d2 . ?\e,DR\e(B)
735 (#x3d3 . ?\e,DS\e(B)
736 (#x3d9 . ?\e,DY\e(B)
737 (#x3dd . ?\e,D]\e(B)
738 (#x3de . ?\e,D^\e(B)
739 (#x3e0 . ?\e,D`\e(B)
740 (#x3e7 . ?\e,Dg\e(B)
741 (#x3ec . ?\e,Dl\e(B)
742 (#x3ef . ?\e,Do\e(B)
743 (#x3f1 . ?\e,Dq\e(B)
744 (#x3f2 . ?\e,Dr\e(B)
745 (#x3f3 . ?\e,Ds\e(B)
746 (#x3f9 . ?\e,Dy\e(B)
747 (#x3fd . ?\e,D}\e(B)
748 (#x3fe . ?\e,D~\e(B)
749 ;; Kana: Fixme: needs conversion to Japanese charset -- seems
750 ;; to require jisx0213, for which the Unicode translation
751 ;; isn't clear.
6b61353c
KH
752 (#x47e . ?\e(J~\e(B)
753 (#x4a1 . ?\e$A!#\e(B)
754 (#x4a2 . ?\\e$A!8\e(B)
755 (#x4a3 . ?\\e$A!9\e(B)
756 (#x4a4 . ?\e$A!"\e(B)
757 (#x4a5 . ?\e$A!$\e(B)
758 (#x4a6 . ?\e$A%r\e(B)
759 (#x4a7 . ?\e$A%!\e(B)
760 (#x4a8 . ?\e$A%#\e(B)
761 (#x4a9 . ?\e$A%%\e(B)
762 (#x4aa . ?\e$A%'\e(B)
763 (#x4ab . ?\e$A%)\e(B)
764 (#x4ac . ?\e$A%c\e(B)
765 (#x4ad . ?\e$A%e\e(B)
766 (#x4ae . ?\e$A%g\e(B)
767 (#x4af . ?\e$A%C\e(B)
768 (#x4b0 . ?\e$B!<\e(B)
769 (#x4b1 . ?\e$A%"\e(B)
770 (#x4b2 . ?\e$A%$\e(B)
771 (#x4b3 . ?\e$A%&\e(B)
772 (#x4b4 . ?\e$A%(\e(B)
773 (#x4b5 . ?\e$A%*\e(B)
774 (#x4b6 . ?\e$A%+\e(B)
775 (#x4b7 . ?\e$A%-\e(B)
776 (#x4b8 . ?\e$A%/\e(B)
777 (#x4b9 . ?\e$A%1\e(B)
778 (#x4ba . ?\e$A%3\e(B)
779 (#x4bb . ?\e$A%5\e(B)
780 (#x4bc . ?\e$A%7\e(B)
781 (#x4bd . ?\e$A%9\e(B)
782 (#x4be . ?\e$A%;\e(B)
783 (#x4bf . ?\e$A%=\e(B)
784 (#x4c0 . ?\e$A%?\e(B)
785 (#x4c1 . ?\e$A%A\e(B)
786 (#x4c2 . ?\e$A%D\e(B)
787 (#x4c3 . ?\e$A%F\e(B)
788 (#x4c4 . ?\e$A%H\e(B)
789 (#x4c5 . ?\e$A%J\e(B)
790 (#x4c6 . ?\e$A%K\e(B)
791 (#x4c7 . ?\e$A%L\e(B)
792 (#x4c8 . ?\e$A%M\e(B)
793 (#x4c9 . ?\e$A%N\e(B)
794 (#x4ca . ?\e$A%O\e(B)
795 (#x4cb . ?\e$A%R\e(B)
796 (#x4cc . ?\e$A%U\e(B)
797 (#x4cd . ?\e$A%X\e(B)
798 (#x4ce . ?\e$A%[\e(B)
799 (#x4cf . ?\e$A%^\e(B)
800 (#x4d0 . ?\e$A%_\e(B)
801 (#x4d1 . ?\e$A%`\e(B)
802 (#x4d2 . ?\e$A%a\e(B)
803 (#x4d3 . ?\e$A%b\e(B)
804 (#x4d4 . ?\e$A%d\e(B)
805 (#x4d5 . ?\e$A%f\e(B)
806 (#x4d6 . ?\e$A%h\e(B)
807 (#x4d7 . ?\e$A%i\e(B)
808 (#x4d8 . ?\e$A%j\e(B)
809 (#x4d9 . ?\e$A%k\e(B)
810 (#x4da . ?\e$A%l\e(B)
811 (#x4db . ?\e$A%m\e(B)
812 (#x4dc . ?\e$A%o\e(B)
813 (#x4dd . ?\e$A%s\e(B)
814 (#x4de . ?\e$B!+\e(B)
815 (#x4df . ?\e$B!,\e(B)
cf07d2bd
DL
816 ;; Arabic
817 (#x5ac . ?\e,G,\e(B)
818 (#x5bb . ?\e,G;\e(B)
819 (#x5bf . ?\e,G?\e(B)
820 (#x5c1 . ?\e,GA\e(B)
821 (#x5c2 . ?\e,GB\e(B)
822 (#x5c3 . ?\e,GC\e(B)
823 (#x5c4 . ?\e,GD\e(B)
824 (#x5c5 . ?\e,GE\e(B)
825 (#x5c6 . ?\e,GF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)
870 (#x684 . ?\e$,1)b\e(B)
871 (#x685 . ?\e$,1)n\e(B)
872 (#x686 . ?\e$,1)p\e(B)
873 (#x687 . ?\e$,1)r\e(B)
874 (#x688 . ?\e$,1)v\e(B)
875 (#x689 . ?\e$,1)x\e(B)
876 (#x68a . ?\e$,1)z\e(B)
877 (#x68c . ?\e$,1*8\e(B)
878 (#x68d . ?\e$,1*B\e(B)
879 (#x68e . ?\e$,1*H\e(B)
880 (#x68f . ?\e$,1*N\e(B)
881 (#x690 . ?\e$,1)S\e(B)
882 (#x691 . ?\e$,1)W\e(B)
883 (#x692 . ?\e$,1)[\e(B)
884 (#x693 . ?\e$,1)]\e(B)
885 (#x694 . ?\e$,1)c\e(B)
886 (#x695 . ?\e$,1)o\e(B)
887 (#x696 . ?\e$,1)q\e(B)
888 (#x697 . ?\e$,1)s\e(B)
889 (#x698 . ?\e$,1)w\e(B)
890 (#x699 . ?\e$,1)y\e(B)
891 (#x69a . ?\e$,1){\e(B)
892 (#x69c . ?\e$,1*9\e(B)
893 (#x69d . ?\e$,1*C\e(B)
894 (#x69e . ?\e$,1*I\e(B)
895 (#x69f . ?\e$,1*O\e(B)
cf07d2bd
DL
896 (#x6a1 . ?\e,Lr\e(B)
897 (#x6a2 . ?\e,Ls\e(B)
898 (#x6a3 . ?\e,Lq\e(B)
899 (#x6a4 . ?\e,Lt\e(B)
900 (#x6a5 . ?\e,Lu\e(B)
901 (#x6a6 . ?\e,Lv\e(B)
902 (#x6a7 . ?\e,Lw\e(B)
903 (#x6a8 . ?\e,Lx\e(B)
904 (#x6a9 . ?\e,Ly\e(B)
905 (#x6aa . ?\e,Lz\e(B)
906 (#x6ab . ?\e,L{\e(B)
907 (#x6ac . ?\e,L|\e(B)
908 (#x6ae . ?\e,L~\e(B)
909 (#x6af . ?\e,L\7f\e(B)
910 (#x6b0 . ?\e,Lp\e(B)
911 (#x6b1 . ?\e,L"\e(B)
912 (#x6b2 . ?\e,L#\e(B)
913 (#x6b3 . ?\e,L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,L0\e(B)
959 (#x6e2 . ?\e,L1\e(B)
960 (#x6e3 . ?\e,LF\e(B)
961 (#x6e4 . ?\e,L4\e(B)
962 (#x6e5 . ?\e,L5\e(B)
963 (#x6e6 . ?\e,LD\e(B)
964 (#x6e7 . ?\e,L3\e(B)
965 (#x6e8 . ?\e,LE\e(B)
966 (#x6e9 . ?\e,L8\e(B)
967 (#x6ea . ?\e,L9\e(B)
968 (#x6eb . ?\e,L:\e(B)
969 (#x6ec . ?\e,L;\e(B)
970 (#x6ed . ?\e,L<\e(B)
971 (#x6ee . ?\e,L=\e(B)
972 (#x6ef . ?\e,L>\e(B)
973 (#x6f0 . ?\e,L?\e(B)
974 (#x6f1 . ?\e,LO\e(B)
975 (#x6f2 . ?\e,L@\e(B)
976 (#x6f3 . ?\e,LA\e(B)
977 (#x6f4 . ?\e,LB\e(B)
978 (#x6f5 . ?\e,LC\e(B)
979 (#x6f6 . ?\e,L6\e(B)
980 (#x6f7 . ?\e,L2\e(B)
981 (#x6f8 . ?\e,LL\e(B)
982 (#x6f9 . ?\e,LK\e(B)
983 (#x6fa . ?\e,L7\e(B)
984 (#x6fb . ?\e,LH\e(B)
985 (#x6fc . ?\e,LM\e(B)
986 (#x6fd . ?\e,LI\e(B)
987 (#x6fe . ?\e,LG\e(B)
988 (#x6ff . ?\e,LJ\e(B)
989 ;; Greek
990 (#x7a1 . ?\e,F6\e(B)
991 (#x7a2 . ?\e,F8\e(B)
992 (#x7a3 . ?\e,F9\e(B)
993 (#x7a4 . ?\e,F:\e(B)
994 (#x7a5 . ?\e,FZ\e(B)
995 (#x7a7 . ?\e,F<\e(B)
996 (#x7a8 . ?\e,F>\e(B)
997 (#x7a9 . ?\e,F[\e(B)
998 (#x7ab . ?\e,F?\e(B)
999 (#x7ae . ?\e,F5\e(B)
1000 (#x7af . ?\e,F/\e(B)
1001 (#x7b1 . ?\e,F\\e(B)
1002 (#x7b2 . ?\e,F]\e(B)
1003 (#x7b3 . ?\e,F^\e(B)
1004 (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?\e$(G"D\e(B)
1087 (#x8c9 . ?\e$(O"l\e(B)
1088 (#x8cd . ?\e$B"N\e(B)
1089 (#x8ce . ?\e$B"M\e(B)
1090 (#x8cf . ?\e$A!T\e(B)
1091 (#x8d6 . ?\e$A!L\e(B)
1092 (#x8da . ?\e$B">\e(B)
1093 (#x8db . ?\e$B"?\e(B)
1094 (#x8dc . ?\e$A!I\e(B)
1095 (#x8dd . ?\e$A!H\e(B)
1096 (#x8de . ?\e$A!D\e(B)
1097 (#x8df . ?\e$A!E\e(B)
1098 (#x8ef . ?\e$B"_\e(B)
cf07d2bd 1099 (#x8f6 . ?\e$,1!R\e(B)
6b61353c
KH
1100 (#x8fb . ?\e$A!{\e(B)
1101 (#x8fc . ?\e$A!|\e(B)
1102 (#x8fd . ?\e$A!z\e(B)
1103 (#x8fe . ?\e$A!}\e(B)
cf07d2bd 1104 ;; Special
6b61353c
KH
1105 (#x9e0 . ?\e$A!t\e(B)
1106 (#x9e1 . ?\e$(C"F\e(B)
1107 (#x9e2 . ?\e$(GB*\e(B)
1108 (#x9e3 . ?\e$(GB-\e(B)
1109 (#x9e4 . ?\e$(GB.\e(B)
1110 (#x9e5 . ?\e$(GB+\e(B)
cf07d2bd 1111 (#x9e8 . ?\e$,1}d\e(B)
6b61353c
KH
1112 (#x9e9 . ?\e$(GB,\e(B)
1113 (#x9ea . ?\e$A)<\e(B)
1114 (#x9eb . ?\e$A)4\e(B)
1115 (#x9ec . ?\e$A)0\e(B)
1116 (#x9ed . ?\e$A)8\e(B)
1117 (#x9ee . ?\e$A)`\e(B)
cf07d2bd
DL
1118 (#x9ef . ?\e$,1|Z\e(B)
1119 (#x9f0 . ?\e$,1|[\e(B)
6b61353c 1120 (#x9f1 . ?\e$A)$\e(B)
cf07d2bd
DL
1121 (#x9f2 . ?\e$,1|\\e(B)
1122 (#x9f3 . ?\e$,1|]\e(B)
6b61353c
KH
1123 (#x9f4 . ?\e$A)@\e(B)
1124 (#x9f5 . ?\e$A)H\e(B)
1125 (#x9f6 . ?\e$A)X\e(B)
1126 (#x9f7 . ?\e$A)P\e(B)
1127 (#x9f8 . ?\e$A)&\e(B)
cf07d2bd
DL
1128 ;; Publishing
1129 (#xaa1 . ?\e$,1rc\e(B)
1130 (#xaa2 . ?\e$,1rb\e(B)
1131 (#xaa3 . ?\e$,1rd\e(B)
1132 (#xaa4 . ?\e$,1re\e(B)
1133 (#xaa5 . ?\e$,1rg\e(B)
1134 (#xaa6 . ?\e$,1rh\e(B)
1135 (#xaa7 . ?\e$,1ri\e(B)
1136 (#xaa8 . ?\e$,1rj\e(B)
6b61353c
KH
1137 (#xaa9 . ?\e$(G!7\e(B)
1138 (#xaaa . ?\e$(G!9\e(B)
1139 (#xaae . ?\e$A!-\e(B)
1140 (#xaaf . ?\e$(G!-\e(B)
1141 (#xab0 . ?\e$(O'x\e(B)
1142 (#xab1 . ?\e$(O'y\e(B)
1143 (#xab2 . ?\e$(O'z\e(B)
cf07d2bd
DL
1144 (#xab3 . ?\e$,1v6\e(B)
1145 (#xab4 . ?\e$,1v7\e(B)
1146 (#xab5 . ?\e$,1v8\e(B)
1147 (#xab6 . ?\e$,1v9\e(B)
1148 (#xab7 . ?\e$,1v:\e(B)
6b61353c 1149 (#xab8 . ?\e$(G""\e(B)
cf07d2bd
DL
1150 (#xabb . ?\e$,1rr\e(B)
1151 (#xabc . ?\e$,1{)\e(B)
1152 (#xabe . ?\e$,1{*\e(B)
6b61353c
KH
1153 (#xac3 . ?\e$(C({\e(B)
1154 (#xac4 . ?\e$(C(|\e(B)
1155 (#xac5 . ?\e$(C(}\e(B)
1156 (#xac6 . ?\e$(C(~\e(B)
1157 (#xac9 . ?\e$(D"o\e(B)
cf07d2bd 1158 (#xaca . ?\e$,2"s\e(B)
6b61353c
KH
1159 (#xacc . ?\e$(O##\e(B)
1160 (#xacd . ?\e$(O#!\e(B)
1161 (#xace . ?\e$A!p\e(B)
cf07d2bd 1162 (#xacf . ?\e$,2!o\e(B)
6b61353c
KH
1163 (#xad0 . ?\e,F!\e(B)
1164 (#xad1 . ?\e,F"\e(B)
1165 (#xad2 . ?\e,Y4\e(B)
1166 (#xad3 . ?\e,Y!\e(B)
cf07d2bd 1167 (#xad4 . ?\e$,1u^\e(B)
6b61353c
KH
1168 (#xad6 . ?\e$A!d\e(B)
1169 (#xad7 . ?\e$A!e\e(B)
cf07d2bd
DL
1170 (#xad9 . ?\e$,2%]\e(B)
1171 (#xadb . ?\e$,2!l\e(B)
6b61353c
KH
1172 (#xadc . ?\e$(O#$\e(B)
1173 (#xadd . ?\e$(O#"\e(B)
1174 (#xade . ?\e$A!q\e(B)
cf07d2bd 1175 (#xadf . ?\e$,2!n\e(B)
6b61353c 1176 (#xae0 . ?\e$(O#?\e(B)
cf07d2bd
DL
1177 (#xae1 . ?\e$,2!k\e(B)
1178 (#xae2 . ?\e$,2!m\e(B)
6b61353c
KH
1179 (#xae3 . ?\e$A!w\e(B)
1180 (#xae4 . ?\e$(G!}\e(B)
1181 (#xae5 . ?\e$A!n\e(B)
1182 (#xae6 . ?\e$(O#@\e(B)
cf07d2bd 1183 (#xae7 . ?\e$,2!j\e(B)
6b61353c
KH
1184 (#xae8 . ?\e$A!x\e(B)
1185 (#xae9 . ?\e$(G!~\e(B)
1186 (#xaea . ?\e$(C"P\e(B)
1187 (#xaeb . ?\e$(O-~\e(B)
1188 (#xaec . ?\e$(O&@\e(B)
1189 (#xaed . ?\e$(O&<\e(B)
1190 (#xaee . ?\e$(O&>\e(B)
cf07d2bd 1191 (#xaf0 . ?\e$,2%`\e(B)
6b61353c
KH
1192 (#xaf1 . ?\e$B"w\e(B)
1193 (#xaf2 . ?\e$B"x\e(B)
1194 (#xaf3 . ?\e$(O'{\e(B)
cf07d2bd 1195 (#xaf4 . ?\e$,2%W\e(B)
6b61353c
KH
1196 (#xaf5 . ?\e$B"t\e(B)
1197 (#xaf6 . ?\e$B"u\e(B)
1198 (#xaf7 . ?\e$A!a\e(B)
1199 (#xaf8 . ?\e$A!b\e(B)
1200 (#xaf9 . ?\e$(O&g\e(B)
cf07d2bd
DL
1201 (#xafa . ?\e$,1zu\e(B)
1202 (#xafb . ?\e$,1uW\e(B)
1203 (#xafc . ?\e$,1s8\e(B)
1204 (#xafd . ?\e$,1rz\e(B)
6b61353c 1205 (#xafe . ?\e,Y%\e(B)
cf07d2bd
DL
1206 ;; APL
1207 (#xba3 . ?<)
1208 (#xba6 . ?>)
6b61353c
KH
1209 (#xba8 . ?\e$A!E\e(B)
1210 (#xba9 . ?\e$A!D\e(B)
cf07d2bd 1211 (#xbc0 . ?\e,A/\e(B)
6b61353c
KH
1212 (#xbc2 . ?\e$A!M\e(B)
1213 (#xbc3 . ?\e$A!I\e(B)
cf07d2bd
DL
1214 (#xbc4 . ?\e$,1zj\e(B)
1215 (#xbc6 . ?_)
1216 (#xbca . ?\e$,1x8\e(B)
1217 (#xbcc . ?\e$,1|5\e(B)
1218 (#xbce . ?\e$,1yd\e(B)
6b61353c 1219 (#xbcf . ?\e$A!p\e(B)
cf07d2bd 1220 (#xbd3 . ?\e$,1zh\e(B)
6b61353c
KH
1221 (#xbd6 . ?\e$A!H\e(B)
1222 (#xbd8 . ?\e$B"?\e(B)
1223 (#xbda . ?\e$B">\e(B)
cf07d2bd
DL
1224 (#xbdc . ?\e$,1yb\e(B)
1225 (#xbfc . ?\e$,1yc\e(B)
1226 ;; Hebrew
1227 (#xcdf . ?\e,H_\e(B)
1228 (#xce0 . ?\e,H`\e(B)
1229 (#xce1 . ?\e,Ha\e(B)
1230 (#xce2 . ?\e,Hb\e(B)
1231 (#xce3 . ?\e,Hc\e(B)
1232 (#xce4 . ?\e,Hd\e(B)
1233 (#xce5 . ?\e,He\e(B)
1234 (#xce6 . ?\e,Hf\e(B)
1235 (#xce7 . ?\e,Hg\e(B)
1236 (#xce8 . ?\e,Hh\e(B)
1237 (#xce9 . ?\e,Hi\e(B)
1238 (#xcea . ?\e,Hj\e(B)
1239 (#xceb . ?\e,Hk\e(B)
1240 (#xcec . ?\e,Hl\e(B)
1241 (#xced . ?\e,Hm\e(B)
1242 (#xcee . ?\e,Hn\e(B)
1243 (#xcef . ?\e,Ho\e(B)
1244 (#xcf0 . ?\e,Hp\e(B)
1245 (#xcf1 . ?\e,Hq\e(B)
1246 (#xcf2 . ?\e,Hr\e(B)
1247 (#xcf3 . ?\e,Hs\e(B)
1248 (#xcf4 . ?\e,Ht\e(B)
1249 (#xcf5 . ?\e,Hu\e(B)
1250 (#xcf6 . ?\e,Hv\e(B)
1251 (#xcf7 . ?\e,Hw\e(B)
1252 (#xcf8 . ?\e,Hx\e(B)
1253 (#xcf9 . ?\e,Hy\e(B)
1254 (#xcfa . ?\e,Hz\e(B)
1255 ;; Thai
1256 (#xda1 . ?\e,T!\e(B)
1257 (#xda2 . ?\e,T"\e(B)
1258 (#xda3 . ?\e,T#\e(B)
1259 (#xda4 . ?\e,T$\e(B)
1260 (#xda5 . ?\e,T%\e(B)
1261 (#xda6 . ?\e,T&\e(B)
1262 (#xda7 . ?\e,T'\e(B)
1263 (#xda8 . ?\e,T(\e(B)
1264 (#xda9 . ?\e,T)\e(B)
1265 (#xdaa . ?\e,T*\e(B)
1266 (#xdab . ?\e,T+\e(B)
1267 (#xdac . ?\e,T,\e(B)
1268 (#xdad . ?\e,T-\e(B)
1269 (#xdae . ?\e,T.\e(B)
1270 (#xdaf . ?\e,T/\e(B)
1271 (#xdb0 . ?\e,T0\e(B)
1272 (#xdb1 . ?\e,T1\e(B)
1273 (#xdb2 . ?\e,T2\e(B)
1274 (#xdb3 . ?\e,T3\e(B)
1275 (#xdb4 . ?\e,T4\e(B)
1276 (#xdb5 . ?\e,T5\e(B)
1277 (#xdb6 . ?\e,T6\e(B)
1278 (#xdb7 . ?\e,T7\e(B)
1279 (#xdb8 . ?\e,T8\e(B)
1280 (#xdb9 . ?\e,T9\e(B)
1281 (#xdba . ?\e,T:\e(B)
1282 (#xdbb . ?\e,T;\e(B)
1283 (#xdbc . ?\e,T<\e(B)
1284 (#xdbd . ?\e,T=\e(B)
1285 (#xdbe . ?\e,T>\e(B)
1286 (#xdbf . ?\e,T?\e(B)
1287 (#xdc0 . ?\e,T@\e(B)
1288 (#xdc1 . ?\e,TA\e(B)
1289 (#xdc2 . ?\e,TB\e(B)
1290 (#xdc3 . ?\e,TC\e(B)
1291 (#xdc4 . ?\e,TD\e(B)
1292 (#xdc5 . ?\e,TE\e(B)
1293 (#xdc6 . ?\e,TF\e(B)
1294 (#xdc7 . ?\e,TG\e(B)
1295 (#xdc8 . ?\e,TH\e(B)
1296 (#xdc9 . ?\e,TI\e(B)
1297 (#xdca . ?\e,TJ\e(B)
1298 (#xdcb . ?\e,TK\e(B)
1299 (#xdcc . ?\e,TL\e(B)
1300 (#xdcd . ?\e,TM\e(B)
1301 (#xdce . ?\e,TN\e(B)
1302 (#xdcf . ?\e,TO\e(B)
1303 (#xdd0 . ?\e,TP\e(B)
1304 (#xdd1 . ?\e,TQ\e(B)
1305 (#xdd2 . ?\e,TR\e(B)
1306 (#xdd3 . ?\e,TS\e(B)
1307 (#xdd4 . ?\e,TT\e(B)
1308 (#xdd5 . ?\e,TU\e(B)
1309 (#xdd6 . ?\e,TV\e(B)
1310 (#xdd7 . ?\e,TW\e(B)
1311 (#xdd8 . ?\e,TX\e(B)
1312 (#xdd9 . ?\e,TY\e(B)
1313 (#xdda . ?\e,TZ\e(B)
1314 (#xddf . ?\e,T_\e(B)
1315 (#xde0 . ?\e,T`\e(B)
1316 (#xde1 . ?\e,Ta\e(B)
1317 (#xde2 . ?\e,Tb\e(B)
1318 (#xde3 . ?\e,Tc\e(B)
1319 (#xde4 . ?\e,Td\e(B)
1320 (#xde5 . ?\e,Te\e(B)
1321 (#xde6 . ?\e,Tf\e(B)
1322 (#xde7 . ?\e,Tg\e(B)
1323 (#xde8 . ?\e,Th\e(B)
1324 (#xde9 . ?\e,Ti\e(B)
1325 (#xdea . ?\e,Tj\e(B)
1326 (#xdeb . ?\e,Tk\e(B)
1327 (#xdec . ?\e,Tl\e(B)
1328 (#xded . ?\e,Tm\e(B)
1329 (#xdf0 . ?\e,Tp\e(B)
1330 (#xdf1 . ?\e,Tq\e(B)
1331 (#xdf2 . ?\e,Tr\e(B)
1332 (#xdf3 . ?\e,Ts\e(B)
1333 (#xdf4 . ?\e,Tt\e(B)
1334 (#xdf5 . ?\e,Tu\e(B)
1335 (#xdf6 . ?\e,Tv\e(B)
1336 (#xdf7 . ?\e,Tw\e(B)
1337 (#xdf8 . ?\e,Tx\e(B)
1338 (#xdf9 . ?\e,Ty\e(B)
1339 ;; Korean
1340 (#xea1 . ?\e$(C$!\e(B)
1341 (#xea2 . ?\e$(C$"\e(B)
1342 (#xea3 . ?\e$(C$#\e(B)
1343 (#xea4 . ?\e$(C$$\e(B)
1344 (#xea5 . ?\e$(C$%\e(B)
1345 (#xea6 . ?\e$(C$&\e(B)
1346 (#xea7 . ?\e$(C$'\e(B)
1347 (#xea8 . ?\e$(C$(\e(B)
1348 (#xea9 . ?\e$(C$)\e(B)
1349 (#xeaa . ?\e$(C$*\e(B)
1350 (#xeab . ?\e$(C$+\e(B)
1351 (#xeac . ?\e$(C$,\e(B)
1352 (#xead . ?\e$(C$-\e(B)
1353 (#xeae . ?\e$(C$.\e(B)
1354 (#xeaf . ?\e$(C$/\e(B)
1355 (#xeb0 . ?\e$(C$0\e(B)
1356 (#xeb1 . ?\e$(C$1\e(B)
1357 (#xeb2 . ?\e$(C$2\e(B)
1358 (#xeb3 . ?\e$(C$3\e(B)
1359 (#xeb4 . ?\e$(C$4\e(B)
1360 (#xeb5 . ?\e$(C$5\e(B)
1361 (#xeb6 . ?\e$(C$6\e(B)
1362 (#xeb7 . ?\e$(C$7\e(B)
1363 (#xeb8 . ?\e$(C$8\e(B)
1364 (#xeb9 . ?\e$(C$9\e(B)
1365 (#xeba . ?\e$(C$:\e(B)
1366 (#xebb . ?\e$(C$;\e(B)
1367 (#xebc . ?\e$(C$<\e(B)
1368 (#xebd . ?\e$(C$=\e(B)
1369 (#xebe . ?\e$(C$>\e(B)
1370 (#xebf . ?\e$(C$?\e(B)
1371 (#xec0 . ?\e$(C$@\e(B)
1372 (#xec1 . ?\e$(C$A\e(B)
1373 (#xec2 . ?\e$(C$B\e(B)
1374 (#xec3 . ?\e$(C$C\e(B)
1375 (#xec4 . ?\e$(C$D\e(B)
1376 (#xec5 . ?\e$(C$E\e(B)
1377 (#xec6 . ?\e$(C$F\e(B)
1378 (#xec7 . ?\e$(C$G\e(B)
1379 (#xec8 . ?\e$(C$H\e(B)
1380 (#xec9 . ?\e$(C$I\e(B)
1381 (#xeca . ?\e$(C$J\e(B)
1382 (#xecb . ?\e$(C$K\e(B)
1383 (#xecc . ?\e$(C$L\e(B)
1384 (#xecd . ?\e$(C$M\e(B)
1385 (#xece . ?\e$(C$N\e(B)
1386 (#xecf . ?\e$(C$O\e(B)
1387 (#xed0 . ?\e$(C$P\e(B)
1388 (#xed1 . ?\e$(C$Q\e(B)
1389 (#xed2 . ?\e$(C$R\e(B)
1390 (#xed3 . ?\e$(C$S\e(B)
1391 (#xed4 . ?\e$,1LH\e(B)
1392 (#xed5 . ?\e$,1LI\e(B)
1393 (#xed6 . ?\e$,1LJ\e(B)
1394 (#xed7 . ?\e$,1LK\e(B)
1395 (#xed8 . ?\e$,1LL\e(B)
1396 (#xed9 . ?\e$,1LM\e(B)
1397 (#xeda . ?\e$,1LN\e(B)
1398 (#xedb . ?\e$,1LO\e(B)
1399 (#xedc . ?\e$,1LP\e(B)
1400 (#xedd . ?\e$,1LQ\e(B)
1401 (#xede . ?\e$,1LR\e(B)
1402 (#xedf . ?\e$,1LS\e(B)
1403 (#xee0 . ?\e$,1LT\e(B)
1404 (#xee1 . ?\e$,1LU\e(B)
1405 (#xee2 . ?\e$,1LV\e(B)
1406 (#xee3 . ?\e$,1LW\e(B)
1407 (#xee4 . ?\e$,1LX\e(B)
1408 (#xee5 . ?\e$,1LY\e(B)
1409 (#xee6 . ?\e$,1LZ\e(B)
1410 (#xee7 . ?\e$,1L[\e(B)
1411 (#xee8 . ?\e$,1L\\e(B)
1412 (#xee9 . ?\e$,1L]\e(B)
1413 (#xeea . ?\e$,1L^\e(B)
1414 (#xeeb . ?\e$,1L_\e(B)
1415 (#xeec . ?\e$,1L`\e(B)
1416 (#xeed . ?\e$,1La\e(B)
1417 (#xeee . ?\e$,1Lb\e(B)
1418 (#xeef . ?\e$(C$]\e(B)
1419 (#xef0 . ?\e$(C$a\e(B)
1420 (#xef1 . ?\e$(C$h\e(B)
1421 (#xef2 . ?\e$(C$o\e(B)
1422 (#xef3 . ?\e$(C$q\e(B)
1423 (#xef4 . ?\e$(C$t\e(B)
1424 (#xef5 . ?\e$(C$v\e(B)
1425 (#xef6 . ?\e$(C$}\e(B)
1426 (#xef7 . ?\e$(C$~\e(B)
1427 (#xef8 . ?\e$,1M+\e(B)
1428 (#xef9 . ?\e$,1M0\e(B)
1429 (#xefa . ?\e$,1M9\e(B)
1430 (#xeff . ?\e$,1tI\e(B)
1431 ;; Latin-5
1432 ;; Latin-6
1433 ;; Latin-7
1434 ;; Latin-8
1435 ;; Latin-9
1436 (#x13bc . ?\e,b<\e(B)
1437 (#x13bd . ?\e,b=\e(B)
6b61353c 1438 (#x13be . ?\e,_/\e(B)
cf07d2bd
DL
1439 ;; Currency
1440 (#x20a0 . ?\e$,1t@\e(B)
1441 (#x20a1 . ?\e$,1tA\e(B)
1442 (#x20a2 . ?\e$,1tB\e(B)
1443 (#x20a3 . ?\e$,1tC\e(B)
1444 (#x20a4 . ?\e$,1tD\e(B)
1445 (#x20a5 . ?\e$,1tE\e(B)
1446 (#x20a6 . ?\e$,1tF\e(B)
1447 (#x20a7 . ?\e$,1tG\e(B)
1448 (#x20a8 . ?\e$,1tH\e(B)
1449 (#x20aa . ?\e$,1tJ\e(B)
1450 (#x20ab . ?\e$,1tK\e(B)
1451 (#x20ac . ?\e,b$\e(B)))
1452 (puthash (car pair) (cdr pair) x-keysym-table))
1453
1454;; The following keysym codes for graphics are listed in the document
1455;; as not having unicodes available:
1456
1457;; #x08b1 TOP LEFT SUMMATION Technical
1458;; #x08b2 BOTTOM LEFT SUMMATION Technical
1459;; #x08b3 TOP VERTICAL SUMMATION CONNECTOR Technical
1460;; #x08b4 BOTTOM VERTICAL SUMMATION CONNECTOR Technical
1461;; #x08b5 TOP RIGHT SUMMATION Technical
1462;; #x08b6 BOTTOM RIGHT SUMMATION Technical
1463;; #x08b7 RIGHT MIDDLE SUMMATION Technical
1464;; #x0aac SIGNIFICANT BLANK SYMBOL Publish
1465;; #x0abd DECIMAL POINT Publish
1466;; #x0abf MARKER Publish
1467;; #x0acb TRADEMARK SIGN IN CIRCLE Publish
1468;; #x0ada HEXAGRAM Publish
1469;; #x0aff CURSOR Publish
1470;; #x0dde THAI MAIHANAKAT Thai
1471
2fb263f6
JB
1472\f
1473;;;; Selections and cut buffers
67c86cfc 1474
1c7c774b
SM
1475;; We keep track of the last text selected here, so we can check the
1476;; current selection against it, and avoid passing back our own text
1477;; from x-cut-buffer-or-selection-value. We track all three
1478;; seperately in case another X application only sets one of them
1479;; (say the cut buffer) we aren't fooled by the PRIMARY or
1480;; CLIPBOARD selection staying the same.
ae10d597
PJ
1481(defvar x-last-selected-text-clipboard nil
1482 "The value of the CLIPBOARD X selection last time we selected or
1483pasted text.")
089bc712 1484(defvar x-last-selected-text-primary nil
ae10d597
PJ
1485 "The value of the PRIMARY X selection last time we selected or
1486pasted text.")
089bc712 1487(defvar x-last-selected-text-cut nil
eb5ad242
KH
1488 "The value of the X cut buffer last time we selected or pasted text.
1489The actual text stored in the X cut buffer is what encoded from this value.")
1490(defvar x-last-selected-text-cut-encoded nil
1491 "The value of the X cut buffer last time we selected or pasted text.
1492This is the actual text stored in the X cut buffer.")
8eee8101
JD
1493(defvar x-last-cut-buffer-coding 'iso-latin-1
1494 "The coding we last used to encode/decode the text from the X cut buffer")
daa37602 1495
1c7c774b
SM
1496(defvar x-cut-buffer-max 20000 ; Note this value is overridden below.
1497 "Max number of characters to put in the cut buffer.
1498It is said that overlarge strings are slow to put into the cut buffer.")
2666a6a5 1499
d14518d8 1500(defcustom x-select-enable-clipboard nil
dc20df95 1501 "Non-nil means cutting and pasting uses the clipboard.
d14518d8
DL
1502This is in addition to, but in preference to, the primary selection."
1503 :type 'boolean
1504 :group 'killing)
dc20df95 1505
73fe9da0
RS
1506(defcustom x-select-enable-primary t
1507 "Non-nil means cutting and pasting uses the primary selection."
1508 :type 'boolean
1509 :group 'killing)
1510
0e2f4e59 1511(defun x-select-text (text &optional push)
1c7c774b
SM
1512 "Make TEXT, a string, the primary X selection.
1513Also, set the value of X cut buffer 0, for backward compatibility
1514with older X applications.
1515gildea@stop.mail-abuse.org says it's not desirable to put kills
1516in the clipboard."
c7e36bd9
SM
1517 ;; With multi-tty, this function may be called from a tty frame.
1518 (when (eq (framep (selected-frame)) 'x)
1519 ;; Don't send the cut buffer too much text.
1520 ;; It becomes slow, and if really big it causes errors.
1521 (cond ((>= (length text) x-cut-buffer-max)
1522 (x-set-cut-buffer "" push)
1523 (setq x-last-selected-text-cut ""
1524 x-last-selected-text-cut-encoded ""))
1525 (t
1526 (setq x-last-selected-text-cut text
1527 x-last-cut-buffer-coding 'iso-latin-1
1528 x-last-selected-text-cut-encoded
1529 ;; ICCCM says cut buffer always contain ISO-Latin-1
1530 (encode-coding-string text 'iso-latin-1))
1531 (x-set-cut-buffer x-last-selected-text-cut-encoded push)))
73fe9da0
RS
1532 (when x-select-enable-primary
1533 (x-set-selection 'PRIMARY text)
1534 (setq x-last-selected-text-primary text))
c7e36bd9
SM
1535 (when x-select-enable-clipboard
1536 (x-set-selection 'CLIPBOARD text)
1537 (setq x-last-selected-text-clipboard text))))
492878e4 1538
c7d9df18
KH
1539(defvar x-select-request-type nil
1540 "*Data type request for X selection.
0c861f59 1541The value is one of the following data types, a list of them, or nil:
c7d9df18
KH
1542 `COMPOUND_TEXT', `UTF8_STRING', `STRING', `TEXT'
1543
c7d9df18
KH
1544If the value is one of the above symbols, try only the specified
1545type.
1546
1547If the value is a list of them, try each of them in the specified
0c861f59 1548order until succeed.
c7d9df18 1549
0c861f59
KH
1550The value nil is the same as this list:
1551 \(UTF8_STRING COMPOUND_TEXT STRING)
1552")
c7d9df18 1553
d8338794 1554;; Get a selection value of type TYPE by calling x-get-selection with
a03c851c 1555;; an appropiate DATA-TYPE argument decided by `x-select-request-type'.
d8338794
KH
1556;; The return value is already decoded. If x-get-selection causes an
1557;; error, this function return nil.
1558
c7d9df18 1559(defun x-selection-value (type)
0c861f59
KH
1560 (let ((request-type (or x-select-request-type
1561 '(UTF8_STRING COMPOUND_TEXT STRING)))
a03c851c
KH
1562 text)
1563 (if (consp request-type)
1564 (while (and request-type (not text))
1565 (condition-case nil
1566 (setq text (x-get-selection type (car request-type)))
1567 (error nil))
1568 (setq request-type (cdr request-type)))
1569 (condition-case nil
1570 (setq text (x-get-selection type request-type))
1571 (error nil)))
c7d9df18
KH
1572 (if text
1573 (remove-text-properties 0 (length text) '(foreign-selection nil) text))
1574 text))
5fd6d89f 1575
1c7c774b
SM
1576;; Return the value of the current X selection.
1577;; Consult the selection, and the cut buffer. Treat empty strings
1578;; as if they were unset.
1579;; If this function is called twice and finds the same text,
1580;; it returns nil the second time. This is so that a single
1581;; selection won't be added to the kill ring over and over.
492878e4 1582(defun x-cut-buffer-or-selection-value ()
c7e36bd9
SM
1583 ;; With multi-tty, this function may be called from a tty frame.
1584 (when (eq (framep (selected-frame)) 'x)
1585 (let (clip-text primary-text cut-text)
1586 (when x-select-enable-clipboard
1587 (setq clip-text (x-selection-value 'CLIPBOARD))
1588 (if (string= clip-text "") (setq clip-text nil))
1589
1590 ;; Check the CLIPBOARD selection for 'newness', is it different
1591 ;; from what we remebered them to be last time we did a
1592 ;; cut/paste operation.
1593 (setq clip-text
1594 (cond ;; check clipboard
1595 ((or (not clip-text) (string= clip-text ""))
1596 (setq x-last-selected-text-clipboard nil))
1597 ((eq clip-text x-last-selected-text-clipboard) nil)
1598 ((string= clip-text x-last-selected-text-clipboard)
1599 ;; Record the newer string,
1600 ;; so subsequent calls can use the `eq' test.
1601 (setq x-last-selected-text-clipboard clip-text)
1602 nil)
1603 (t (setq x-last-selected-text-clipboard clip-text)))))
1604
73fe9da0
RS
1605 (when x-select-enable-primary
1606 (setq primary-text (x-selection-value 'PRIMARY))
1607 ;; Check the PRIMARY selection for 'newness', is it different
1608 ;; from what we remebered them to be last time we did a
1609 ;; cut/paste operation.
1610 (setq primary-text
1611 (cond ;; check primary selection
1612 ((or (not primary-text) (string= primary-text ""))
1613 (setq x-last-selected-text-primary nil))
1614 ((eq primary-text x-last-selected-text-primary) nil)
1615 ((string= primary-text x-last-selected-text-primary)
1616 ;; Record the newer string,
1617 ;; so subsequent calls can use the `eq' test.
1618 (setq x-last-selected-text-primary primary-text)
1619 nil)
1620 (t
1621 (setq x-last-selected-text-primary primary-text)))))
c7e36bd9
SM
1622
1623 (setq cut-text (x-get-cut-buffer 0))
1624
1625 ;; Check the x cut buffer for 'newness', is it different
ae10d597
PJ
1626 ;; from what we remebered them to be last time we did a
1627 ;; cut/paste operation.
c7e36bd9
SM
1628 (setq cut-text
1629 (let ((next-coding (or next-selection-coding-system 'iso-latin-1)))
1630 (cond ;; check cut buffer
1631 ((or (not cut-text) (string= cut-text ""))
1632 (setq x-last-selected-text-cut nil))
1633 ;; This short cut doesn't work because x-get-cut-buffer
1634 ;; always returns a newly created string.
1635 ;; ((eq cut-text x-last-selected-text-cut) nil)
1636 ((and (string= cut-text x-last-selected-text-cut-encoded)
1637 (eq x-last-cut-buffer-coding next-coding))
1638 ;; See the comment above. No need of this recording.
1639 ;; Record the newer string,
1640 ;; so subsequent calls can use the `eq' test.
1641 ;; (setq x-last-selected-text-cut cut-text)
1642 nil)
1643 (t
1644 (setq x-last-selected-text-cut-encoded cut-text
1645 x-last-cut-buffer-coding next-coding
1646 x-last-selected-text-cut
1647 ;; ICCCM says cut buffer always contain ISO-Latin-1, but
1648 ;; use next-selection-coding-system if not nil.
1649 (decode-coding-string
1650 cut-text next-coding))))))
1651
1652 ;; As we have done one selection, clear this now.
1653 (setq next-selection-coding-system nil)
1654
1655 ;; At this point we have recorded the current values for the
1656 ;; selection from clipboard (if we are supposed to) primary,
1657 ;; and cut buffer. So return the first one that has changed
1658 ;; (which is the first non-null one).
1659 ;;
1660 ;; NOTE: There will be cases where more than one of these has
1661 ;; changed and the new values differ. This indicates that
1662 ;; something like the following has happened since the last time
1663 ;; we looked at the selections: Application X set all the
1664 ;; selections, then Application Y set only one or two of them (say
1665 ;; just the cut-buffer). In this case since we don't have
1666 ;; timestamps there is no way to know what the 'correct' value to
1667 ;; return is. The nice thing to do would be to tell the user we
1668 ;; saw multiple possible selections and ask the user which was the
1669 ;; one they wanted.
1670 ;; This code is still a big improvement because now the user can
1671 ;; futz with the current selection and get emacs to pay attention
1672 ;; to the cut buffer again (previously as soon as clipboard or
1673 ;; primary had been set the cut buffer would essentially never be
1674 ;; checked again).
1675 (or clip-text primary-text cut-text)
1676 )))
1677
1678;; Arrange for the kill and yank functions to set and check the clipboard.
1679(setq interprogram-cut-function 'x-select-text)
1680(setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
492878e4 1681
2a36494c
KL
1682(defun x-clipboard-yank ()
1683 "Insert the clipboard contents, or the last stretch of killed text."
3f87f67e 1684 (interactive "*")
ef85512e 1685 (let ((clipboard-text (x-selection-value 'CLIPBOARD))
2a36494c
KL
1686 (x-select-enable-clipboard t))
1687 (if (and clipboard-text (> (length clipboard-text) 0))
1688 (kill-new clipboard-text))
1689 (yank)))
88046be2 1690
aa360da1
GM
1691(declare-function accelerate-menu "xmenu.c" (&optional frame) t)
1692
12b6af5c
KL
1693(defun x-menu-bar-open (&optional frame)
1694 "Open the menu bar if `menu-bar-mode' is on. otherwise call `tmm-menubar'."
1695 (interactive "i")
5f06b608 1696 (if menu-bar-mode (accelerate-menu frame)
12b6af5c 1697 (tmm-menubar)))
553624bf 1698
2fb263f6 1699\f
e9cda827 1700;;; Window system initialization.
84f1b454 1701
3d80ef3f 1702(defun x-win-suspend-error ()
089bc712 1703 (error "Suspending an Emacs running under X makes no sense"))
c8c72d6b 1704
e9cda827
KL
1705(defvar x-initialized nil
1706 "Non-nil if the X window system has been initialized.")
1707
aa360da1
GM
1708(declare-function x-open-connection "xfns.c"
1709 (display &optional xrm-string must-succeed))
1710(declare-function x-server-max-request-size "xfns.c" (&optional terminal))
1711(declare-function x-get-resource "frame.c"
1712 (attribute class &optional component subclass))
1713
e9cda827
KL
1714(defun x-initialize-window-system ()
1715 "Initialize Emacs for X frames and open the first connection to an X server."
1716 ;; Make sure we have a valid resource name.
1717 (or (stringp x-resource-name)
1718 (let (i)
1719 (setq x-resource-name (invocation-name))
1720
1721 ;; Change any . or * characters in x-resource-name to hyphens,
1722 ;; so as not to choke when we use it in X resource queries.
1723 (while (setq i (string-match "[.*]" x-resource-name))
1724 (aset x-resource-name i ?-))))
1725
1726 (x-open-connection (or x-display-name
36ab8612 1727 (setq x-display-name (or (getenv "DISPLAY" (selected-frame))
f105f403 1728 (getenv "DISPLAY"))))
e9cda827
KL
1729 x-command-line-resources
1730 ;; Exit Emacs with fatal error if this fails and we
1731 ;; are the initial display.
1732 (eq initial-window-system 'x))
1733
1734 (setq x-cut-buffer-max (min (- (/ (x-server-max-request-size) 2) 100)
1735 x-cut-buffer-max))
1736
1737 ;; Setup the default fontset.
1738 (setup-default-fontset)
1739
1740 ;; Create the standard fontset.
1741 (create-fontset-from-fontset-spec standard-fontset-spec t)
1742
1743 ;; Create fontset specified in X resources "Fontset-N" (N is 0, 1, ...).
1744 (create-fontset-from-x-resource)
1745
65e86587
KL
1746 ;; Set scroll bar mode to right if set by X resources. Default is left.
1747 (if (equal (x-get-resource "verticalScrollBars" "ScrollBars") "right")
1748 (customize-set-variable 'scroll-bar-mode 'right))
1749
e9cda827
KL
1750 ;; Apply a geometry resource to the initial frame. Put it at the end
1751 ;; of the alist, so that anything specified on the command line takes
1752 ;; precedence.
1753 (let* ((res-geometry (x-get-resource "geometry" "Geometry"))
1754 parsed)
1755 (if res-geometry
1756 (progn
1757 (setq parsed (x-parse-geometry res-geometry))
1758 ;; If the resource specifies a position,
1759 ;; call the position and size "user-specified".
1760 (if (or (assq 'top parsed) (assq 'left parsed))
1761 (setq parsed (cons '(user-position . t)
1762 (cons '(user-size . t) parsed))))
1763 ;; All geometry parms apply to the initial frame.
1764 (setq initial-frame-alist (append initial-frame-alist parsed))
f6959eb4 1765 ;; The size parms apply to all frames. Don't set it if there are
14bcc1e0
KL
1766 ;; sizes there already (from command line).
1767 (if (and (assq 'height parsed)
1768 (not (assq 'height default-frame-alist)))
e9cda827
KL
1769 (setq default-frame-alist
1770 (cons (cons 'height (cdr (assq 'height parsed)))
1771 default-frame-alist)))
14bcc1e0
KL
1772 (if (and (assq 'width parsed)
1773 (not (assq 'width default-frame-alist)))
e9cda827
KL
1774 (setq default-frame-alist
1775 (cons (cons 'width (cdr (assq 'width parsed)))
1776 default-frame-alist))))))
1777
1778 ;; Check the reverseVideo resource.
1779 (let ((case-fold-search t))
1780 (let ((rv (x-get-resource "reverseVideo" "ReverseVideo")))
1781 (if (and rv
1782 (string-match "^\\(true\\|yes\\|on\\)$" rv))
1783 (setq default-frame-alist
1784 (cons '(reverse . t) default-frame-alist)))))
63c86e17 1785
e9cda827
KL
1786 ;; Set x-selection-timeout, measured in milliseconds.
1787 (let ((res-selection-timeout
1788 (x-get-resource "selectionTimeout" "SelectionTimeout")))
1789 (setq x-selection-timeout 20000)
1790 (if res-selection-timeout
1791 (setq x-selection-timeout (string-to-number res-selection-timeout))))
5cdb3f1e 1792
0b0d3e0b 1793 ;; Don't let Emacs suspend under X.
e9cda827 1794 (add-hook 'suspend-hook 'x-win-suspend-error)
53631723 1795
e9cda827
KL
1796 ;; Turn off window-splitting optimization; X is usually fast enough
1797 ;; that this is only annoying.
1798 (setq split-window-keep-point t)
c3ef5084 1799
e9cda827
KL
1800 ;; Motif direct handling of f10 wasn't working right,
1801 ;; So temporarily we've turned it off in lwlib-Xm.c
1802 ;; and turned the Emacs f10 back on.
1803 ;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
1804 ;; (if (featurep 'motif)
1805 ;; (global-set-key [f10] 'ignore))
9541a441 1806
e9cda827
KL
1807 ;; Turn on support for mouse wheels.
1808 (mouse-wheel-mode 1)
6b61353c 1809
2a36494c
KL
1810 ;; Enable CLIPBOARD copy/paste through menu bar commands.
1811 (menu-bar-enable-clipboard)
6b61353c 1812
2a36494c
KL
1813 ;; Override Paste so it looks at CLIPBOARD first.
1814 (define-key menu-bar-edit-menu [paste]
5665a02f
KL
1815 (append '(menu-item "Paste" x-clipboard-yank
1816 :enable (not buffer-read-only)
1817 :help "Paste (yank) text most recently cut/copied")
1818 nil))
6b61353c 1819
e9cda827 1820 (setq x-initialized t))
c3ef5084 1821
e9cda827
KL
1822(add-to-list 'handle-args-function-alist '(x . x-handle-args))
1823(add-to-list 'frame-creation-function-alist '(x . x-create-frame-with-faces))
1824(add-to-list 'window-system-initialization-alist '(x . x-initialize-window-system))
6b61353c
KH
1825
1826;; Initiate drag and drop
1827(add-hook 'after-make-frame-functions 'x-dnd-init-frame)
c0acb3ee 1828(define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event)
6b61353c 1829
dd314751
JD
1830(defcustom x-gtk-stock-map
1831 '(
5cb94d12
JD
1832 ("etc/images/new" . "gtk-new")
1833 ("etc/images/open" . "gtk-open")
5db55b9e 1834 ("etc/images/diropen" . "n:system-file-manager")
5cb94d12
JD
1835 ("etc/images/close" . "gtk-close")
1836 ("etc/images/save" . "gtk-save")
1837 ("etc/images/saveas" . "gtk-save-as")
1838 ("etc/images/undo" . "gtk-undo")
1839 ("etc/images/cut" . "gtk-cut")
1840 ("etc/images/copy" . "gtk-copy")
1841 ("etc/images/paste" . "gtk-paste")
1842 ("etc/images/search" . "gtk-find")
1843 ("etc/images/print" . "gtk-print")
1844 ("etc/images/preferences" . "gtk-preferences")
1845 ("etc/images/help" . "gtk-help")
1846 ("etc/images/left-arrow" . "gtk-go-back")
1847 ("etc/images/right-arrow" . "gtk-go-forward")
1848 ("etc/images/home" . "gtk-home")
1849 ("etc/images/jump-to" . "gtk-jump-to")
1850 ("etc/images/index" . "gtk-index")
1851 ("etc/images/search" . "gtk-find")
2e55c986 1852 ("etc/images/exit" . "gtk-quit")
c96a0d64 1853 ("etc/images/cancel" . "gtk-cancel")
418fddf5 1854 ("etc/images/info" . "gtk-info")
bdc398a9 1855 ("etc/images/bookmark_add" . "n:bookmark_add")
2e55c986 1856 ;; Used in Gnus and/or MH-E:
c96a0d64
JD
1857 ("etc/images/attach" . "gtk-attach")
1858 ("etc/images/connect" . "gtk-connect")
1859 ("etc/images/contact" . "gtk-contact")
1860 ("etc/images/delete" . "gtk-delete")
1861 ("etc/images/describe" . "gtk-properties")
1862 ("etc/images/disconnect" . "gtk-disconnect")
1863 ;; ("etc/images/exit" . "gtk-exit")
1864 ("etc/images/lock-broken" . "gtk-lock_broken")
1865 ("etc/images/lock-ok" . "gtk-lock_ok")
1866 ("etc/images/lock" . "gtk-lock")
1867 ("etc/images/next-page" . "gtk-next-page")
1868 ("etc/images/refresh" . "gtk-refresh")
1869 ("etc/images/sort-ascending" . "gtk-sort-ascending")
1870 ("etc/images/sort-column-ascending" . "gtk-sort-column-ascending")
1871 ("etc/images/sort-criteria" . "gtk-sort-criteria")
1872 ("etc/images/sort-descending" . "gtk-sort-descending")
1873 ("etc/images/sort-row-ascending" . "gtk-sort-row-ascending")
1874 ("images/gnus/toggle-subscription" . "gtk-task-recurring")
1875 ("images/mail/compose" . "gtk-mail-compose")
1876 ("images/mail/copy" . "gtk-mail-copy")
1877 ("images/mail/forward" . "gtk-mail-forward")
1878 ("images/mail/inbox" . "gtk-inbox")
1879 ("images/mail/move" . "gtk-mail-move")
1880 ("images/mail/not-spam" . "gtk-not-spam")
1881 ("images/mail/outbox" . "gtk-outbox")
1882 ("images/mail/reply-all" . "gtk-mail-reply-to-all")
1883 ("images/mail/reply" . "gtk-mail-reply")
1884 ("images/mail/save-draft" . "gtk-mail-handling")
1885 ("images/mail/send" . "gtk-mail-send")
1886 ("images/mail/spam" . "gtk-spam")
2e55c986 1887 ;; No themed versions available:
c96a0d64
JD
1888 ;; mail/preview (combining stock_mail and stock_zoom)
1889 ;; mail/save (combining stock_mail, stock_save and stock_convert)
2e55c986 1890 )
dd314751 1891 "How icons for tool bars are mapped to Gtk+ stock items.
5db55b9e
JD
1892Emacs must be compiled with the Gtk+ toolkit for this to have any effect.
1893A value that begins with n: denotes a named icon instead of a stock icon."
7fbe8079 1894 :version "22.2"
2e55c986
RS
1895 :type '(choice (repeat (choice symbol
1896 (cons (string :tag "Emacs icon")
1897 (string :tag "Stock/named")))))
dd314751
JD
1898 :group 'x)
1899
2e55c986
RS
1900(defcustom icon-map-list '(x-gtk-stock-map)
1901 "A list of alists that maps icon file names to stock/named icons.
5db55b9e
JD
1902The alists are searched in the order they appear. The first match is used.
1903The keys in the alists are file names without extension and with two directory
1904components. For example, to map /usr/share/emacs/22.1.1/etc/images/open.xpm
1905to stock item gtk-open, use:
1906
1907 (\"etc/images/open\" . \"gtk-open\")
1908
1909Themes also have named icons. To map to one of those, use n: before the name:
1910
1911 (\"etc/images/diropen\" . \"n:system-file-manager\")
1912
2e55c986
RS
1913The list elements are either the symbol name for the alist or the
1914alist itself.
1915
1916If you don't want stock icons, set the variable to nil."
1917 :version "22.2"
1918 :type '(choice (const :tag "Don't use stock icons" nil)
1919 (repeat (choice symbol
1920 (cons (string :tag "Emacs icon")
1921 (string :tag "Stock/named")))))
1922 :group 'x)
5db55b9e 1923
dd314751 1924(defun x-gtk-map-stock (file)
017de784 1925 "Map icon with file name FILE to a Gtk+ stock name, using `x-gtk-stock-map'."
d2ea6863
JD
1926 (if (stringp file)
1927 (let* ((file-sans (file-name-sans-extension file))
1928 (key (and (string-match "/\\([^/]+/[^/]+/[^/]+$\\)" file-sans)
1929 (match-string 1 file-sans)))
1930 (value))
1931 (mapc (lambda (elem)
1932 (let ((assoc (if (symbolp elem) (symbol-value elem) elem)))
1933 (or value (setq value (assoc-string (or key file-sans)
1934 assoc)))))
1935 icon-map-list)
1936 (and value (cdr value)))
1937 nil))
dd314751 1938
7c1bfecc 1939(provide 'x-win)
e380957e 1940
1c7c774b 1941;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78
5cdb3f1e 1942;;; x-win.el ends here