1 ;;; x-win.el --- parse relevant switches and set up for X -*-coding: iso-2022-7bit; lexical-binding:t -*-
3 ;; Copyright (C) 1993-1994, 2001-2015 Free Software Foundation, Inc.
6 ;; Keywords: terminals, i18n
8 ;; This file is part of GNU Emacs.
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 3 of the License, or
13 ;; (at your option) any later version.
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.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
25 ;; X-win.el: this file defines functions to initialize the X window
26 ;; system and process X-specific command line parameters before
27 ;; creating the first X frame.
29 ;; Beginning in Emacs 23, the act of loading this file should not have
30 ;; the side effect of initializing the window system or processing
31 ;; command line arguments (this file is now loaded in loadup.el). See
32 ;; the variables `handle-args-function-alist' and
33 ;; `window-system-initialization-alist' for more details.
35 ;; startup.el will then examine startup files, and eventually call the hooks
36 ;; which create the first window(s).
40 ;; These are the standard X switches from the Xt Initialize.c file of
43 ;; Command line Resource Manager string
46 ;; +synchronous *synchronous
47 ;; -background *background
50 ;; -bordercolor *borderColor
51 ;; -borderwidth .borderWidth
57 ;; -foreground *foreground
58 ;; -geometry .geometry
61 ;; -reverse *reverseVideo
63 ;; -selectionTimeout .selectionTimeout
64 ;; -synchronous *synchronous
67 ;; An alist of X options and the function which handles them. See
70 (eval-when-compile (require 'cl-lib
))
72 (if (not (fboundp 'x-create-frame
))
73 (error "%s: Loading x-win.el but not compiled for X" (invocation-name)))
75 (require 'term
/common-win
)
85 (defvar x-invocation-args
)
86 (defvar x-keysym-table
)
87 (defvar x-selection-timeout
)
89 (defvar x-session-previous-id
)
91 (defun x-handle-no-bitmap-icon (_switch)
92 (setq default-frame-alist
(cons '(icon-type) default-frame-alist
)))
94 ;; Handle the --parent-id option.
95 (defun x-handle-parent-id (switch)
96 (or (consp x-invocation-args
)
97 (error "%s: missing argument to `%s' option" (invocation-name) switch
))
98 (setq initial-frame-alist
(cons
100 (string-to-number (car x-invocation-args
)))
102 x-invocation-args
(cdr x-invocation-args
)))
104 ;; Handle the --smid switch. This is used by the session manager
105 ;; to give us back our session id we had on the previous run.
106 (defun x-handle-smid (switch)
107 (or (consp x-invocation-args
)
108 (error "%s: missing argument to `%s' option" (invocation-name) switch
))
109 (setq x-session-previous-id
(car x-invocation-args
)
110 x-invocation-args
(cdr x-invocation-args
)))
112 (defvar emacs-save-session-functions nil
113 "Special hook run when a save-session event occurs.
114 The functions do not get any argument.
115 Functions can return non-nil to inform the session manager that the
116 window system shutdown should be aborted.
118 See also `emacs-session-save'.")
120 (defun emacs-session-filename (session-id)
121 "Construct a filename to save the session in based on SESSION-ID.
122 Return a filename in `user-emacs-directory', unless the session file
123 already exists in the home directory."
124 (let ((basename (concat "session." session-id
)))
125 (locate-user-emacs-file basename
126 (concat ".emacs-" basename
))))
128 (defun emacs-session-save ()
129 "This function is called when the window system is shutting down.
130 If this function returns non-nil, the window system shutdown is canceled.
132 When a session manager tells Emacs that the window system is shutting
133 down, this function is called. It calls the functions in the hook
134 `emacs-save-session-functions'. Functions are called with the current
135 buffer set to a temporary buffer. Functions should use `insert' to insert
136 lisp code to save the session state. The buffer is saved in a file in the
137 home directory of the user running Emacs. The file is evaluated when
138 Emacs is restarted by the session manager.
140 If any of the functions returns non-nil, no more functions are called
141 and this function returns non-nil. This will inform the session manager
142 that it should abort the window system shutdown."
143 (let ((filename (emacs-session-filename x-session-id
))
144 (buf (get-buffer-create (concat " *SES " x-session-id
))))
145 (when (file-exists-p filename
)
146 (delete-file filename
))
147 (with-current-buffer buf
148 (let ((cancel-shutdown (condition-case nil
149 ;; A return of t means cancel the shutdown.
150 (run-hook-with-args-until-success
151 'emacs-save-session-functions
)
153 (unless cancel-shutdown
154 (write-file filename
))
158 (defun emacs-session-restore (previous-session-id)
159 "Restore the Emacs session if started by a session manager.
160 The file saved by `emacs-session-save' is evaluated and deleted if it
162 (let ((filename (emacs-session-filename previous-session-id
)))
163 (when (file-exists-p filename
)
165 (delete-file filename
)
166 (message "Restored session data"))))
172 ;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.
175 (defconst x-pointer-X-cursor
0)
176 (defconst x-pointer-arrow
2)
177 (defconst x-pointer-based-arrow-down
4)
178 (defconst x-pointer-based-arrow-up
6)
179 (defconst x-pointer-boat
8)
180 (defconst x-pointer-bogosity
10)
181 (defconst x-pointer-bottom-left-corner
12)
182 (defconst x-pointer-bottom-right-corner
14)
183 (defconst x-pointer-bottom-side
16)
184 (defconst x-pointer-bottom-tee
18)
185 (defconst x-pointer-box-spiral
20)
186 (defconst x-pointer-center-ptr
22)
187 (defconst x-pointer-circle
24)
188 (defconst x-pointer-clock
26)
189 (defconst x-pointer-coffee-mug
28)
190 (defconst x-pointer-cross
30)
191 (defconst x-pointer-cross-reverse
32)
192 (defconst x-pointer-crosshair
34)
193 (defconst x-pointer-diamond-cross
36)
194 (defconst x-pointer-dot
38)
195 (defconst x-pointer-dotbox
40)
196 (defconst x-pointer-double-arrow
42)
197 (defconst x-pointer-draft-large
44)
198 (defconst x-pointer-draft-small
46)
199 (defconst x-pointer-draped-box
48)
200 (defconst x-pointer-exchange
50)
201 (defconst x-pointer-fleur
52)
202 (defconst x-pointer-gobbler
54)
203 (defconst x-pointer-gumby
56)
204 (defconst x-pointer-hand1
58)
205 (defconst x-pointer-hand2
60)
206 (defconst x-pointer-heart
62)
207 (defconst x-pointer-icon
64)
208 (defconst x-pointer-iron-cross
66)
209 (defconst x-pointer-left-ptr
68)
210 (defconst x-pointer-left-side
70)
211 (defconst x-pointer-left-tee
72)
212 (defconst x-pointer-leftbutton
74)
213 (defconst x-pointer-ll-angle
76)
214 (defconst x-pointer-lr-angle
78)
215 (defconst x-pointer-man
80)
216 (defconst x-pointer-middlebutton
82)
217 (defconst x-pointer-mouse
84)
218 (defconst x-pointer-pencil
86)
219 (defconst x-pointer-pirate
88)
220 (defconst x-pointer-plus
90)
221 (defconst x-pointer-question-arrow
92)
222 (defconst x-pointer-right-ptr
94)
223 (defconst x-pointer-right-side
96)
224 (defconst x-pointer-right-tee
98)
225 (defconst x-pointer-rightbutton
100)
226 (defconst x-pointer-rtl-logo
102)
227 (defconst x-pointer-sailboat
104)
228 (defconst x-pointer-sb-down-arrow
106)
229 (defconst x-pointer-sb-h-double-arrow
108)
230 (defconst x-pointer-sb-left-arrow
110)
231 (defconst x-pointer-sb-right-arrow
112)
232 (defconst x-pointer-sb-up-arrow
114)
233 (defconst x-pointer-sb-v-double-arrow
116)
234 (defconst x-pointer-shuttle
118)
235 (defconst x-pointer-sizing
120)
236 (defconst x-pointer-spider
122)
237 (defconst x-pointer-spraycan
124)
238 (defconst x-pointer-star
126)
239 (defconst x-pointer-target
128)
240 (defconst x-pointer-tcross
130)
241 (defconst x-pointer-top-left-arrow
132)
242 (defconst x-pointer-top-left-corner
134)
243 (defconst x-pointer-top-right-corner
136)
244 (defconst x-pointer-top-side
138)
245 (defconst x-pointer-top-tee
140)
246 (defconst x-pointer-trek
142)
247 (defconst x-pointer-ul-angle
144)
248 (defconst x-pointer-umbrella
146)
249 (defconst x-pointer-ur-angle
148)
250 (defconst x-pointer-watch
150)
251 (defconst x-pointer-xterm
152)
252 (defconst x-pointer-invisible
255)
257 (defun vendor-specific-keysyms (vendor)
258 "Return the appropriate value of `system-key-alist' for VENDOR.
259 VENDOR is a string containing the name of the X Server's vendor,
260 as returned by `x-server-vendor'."
261 (cond ((or (string-equal vendor
"Hewlett-Packard Incorporated")
262 (string-equal vendor
"Hewlett-Packard Company"))
263 '(( 168 . mute-acute
)
265 ( 170 . mute-asciicircum
)
266 ( 171 . mute-diaeresis
)
267 ( 172 . mute-asciitilde
)
281 (65397 . kp-backtab
)))
282 ;; Fixme: What about non-X11/NeWS sun server?
283 ((or (string-equal vendor
"X11/NeWS - Sun Microsystems Inc.")
284 (string-equal vendor
"X Consortium"))
288 ;; These are for Sun under X11R6
296 ;; This is used by DEC's X server.
297 '((65280 . remove
)))))
302 (puthash i i x-keysym-table
)
305 ;; Table from Kuhn's proposed additions to the `KEYSYM Encoding'
306 ;; appendix to the X protocol definition.
367 (#x1ff . ?\e,B\x7f\e(B)
427 ;; Kana: Fixme: needs conversion to Japanese charset -- seems
428 ;; to require jisx0213, for which the Unicode translation
429 ;; isn't clear. Using Emacs to convert this to Unicode and back changes
430 ;; this from "\e(J~\e(B" (i.e., bytes "ESC ( J ~ ESC ( B") to "\e$(G"#\e(B" (i.e., bytes
431 ;; "ESC $ ( G " # ESC ( B").
433 (#x4a1 . ?
\e$A
!#\e(B)
434 (#x4a2 . ?\
\e$A
!8\e(B)
435 (#x4a3 . ?\
\e$A
!9\e(B)
436 (#x4a4 . ?
\e$A
!"\e(B)
437 (#x4a5 . ?\e$A!$\e(B)
438 (#x4a6 . ?\e$A%r\e(B)
439 (#x4a7 . ?\e$A%!\e(B)
440 (#x4a8 . ?\e$A%#\e(B)
441 (#x4a9 . ?\e$A%%\e(B)
442 (#x4aa . ?\e$A%'\e(B)
443 (#x4ab . ?\e$A%)\e(B)
444 (#x4ac . ?\e$A%c\e(B)
445 (#x4ad . ?\e$A%e\e(B)
446 (#x4ae . ?\e$A%g\e(B)
447 (#x4af . ?\e$A%C\e(B)
448 (#x4b0 . ?\e$B!<\e(B)
449 (#x4b1 . ?\e$A%"\e(B)
450 (#x4b2 . ?
\e$A%$
\e(B)
451 (#x4b3 . ?
\e$A%
&\e(B)
452 (#x4b4 . ?
\e$A%
(\e(B)
453 (#x4b5 . ?
\e$A%
*\e(B)
454 (#x4b6 . ?
\e$A%
+\e(B)
455 (#x4b7 . ?
\e$A%-
\e(B)
456 (#x4b8 . ?
\e$A%
/\e(B)
457 (#x4b9 . ?
\e$A%
1\e(B)
458 (#x4ba . ?
\e$A%
3\e(B)
459 (#x4bb . ?
\e$A%
5\e(B)
460 (#x4bc . ?
\e$A%
7\e(B)
461 (#x4bd . ?
\e$A%
9\e(B)
462 (#x4be . ?
\e$A%
;\e(B)
463 (#x4bf . ?
\e$A%
=\e(B)
464 (#x4c0 . ?
\e$A%?
\e(B)
465 (#x4c1 . ?
\e$A%A
\e(B)
466 (#x4c2 . ?
\e$A%D
\e(B)
467 (#x4c3 . ?
\e$A%F
\e(B)
468 (#x4c4 . ?
\e$A%H
\e(B)
469 (#x4c5 . ?
\e$A%J
\e(B)
470 (#x4c6 . ?
\e$A%K
\e(B)
471 (#x4c7 . ?
\e$A%L
\e(B)
472 (#x4c8 . ?
\e$A%M
\e(B)
473 (#x4c9 . ?
\e$A%N
\e(B)
474 (#x4ca . ?
\e$A%O
\e(B)
475 (#x4cb . ?
\e$A%R
\e(B)
476 (#x4cc . ?
\e$A%U
\e(B)
477 (#x4cd . ?
\e$A%X
\e(B)
478 (#x4ce . ?
\e$A%
[\e(B)
479 (#x4cf . ?
\e$A%^
\e(B)
480 (#x4d0 . ?
\e$A%_
\e(B)
481 (#x4d1 . ?
\e$A%
`\e(B)
482 (#x4d2 . ?
\e$A%a
\e(B)
483 (#x4d3 . ?
\e$A%b
\e(B)
484 (#x4d4 . ?
\e$A%d
\e(B)
485 (#x4d5 . ?
\e$A%f
\e(B)
486 (#x4d6 . ?
\e$A%h
\e(B)
487 (#x4d7 . ?
\e$A%i
\e(B)
488 (#x4d8 . ?
\e$A%j
\e(B)
489 (#x4d9 . ?
\e$A%k
\e(B)
490 (#x4da . ?
\e$A%l
\e(B)
491 (#x4db . ?
\e$A%m
\e(B)
492 (#x4dc . ?
\e$A%o
\e(B)
493 (#x4dd . ?
\e$A%s
\e(B)
494 (#x4de . ?
\e$B
!+\e(B)
495 (#x4df . ?
\e$B
!,\e(B)
546 (#x680 . ?
\e$
,1)R
\e(B)
547 (#x681 . ?
\e$
,1)V
\e(B)
548 (#x682 . ?
\e$
,1)Z
\e(B)
549 (#x683 . ?
\e$
,1)\
\e(B)
550 (#x684 . ?
\e$
,1)b
\e(B)
551 (#x685 . ?
\e$
,1)n
\e(B)
552 (#x686 . ?
\e$
,1)p
\e(B)
553 (#x687 . ?
\e$
,1)r
\e(B)
554 (#x688 . ?
\e$
,1)v
\e(B)
555 (#x689 . ?
\e$
,1)x
\e(B)
556 (#x68a . ?
\e$
,1)z
\e(B)
557 (#x68c . ?
\e$
,1*8\e(B)
558 (#x68d . ?
\e$
,1*B
\e(B)
559 (#x68e . ?
\e$
,1*H
\e(B)
560 (#x68f . ?
\e$
,1*N
\e(B)
561 (#x690 . ?
\e$
,1)S
\e(B)
562 (#x691 . ?
\e$
,1)W
\e(B)
563 (#x692 . ?
\e$
,1)[\e(B)
564 (#x693 . ?
\e$
,1)]\e(B)
565 (#x694 . ?
\e$
,1)c
\e(B)
566 (#x695 . ?
\e$
,1)o
\e(B)
567 (#x696 . ?
\e$
,1)q
\e(B)
568 (#x697 . ?
\e$
,1)s
\e(B)
569 (#x698 . ?
\e$
,1)w
\e(B)
570 (#x699 . ?
\e$
,1)y
\e(B)
571 (#x69a . ?
\e$
,1){\e(B)
572 (#x69c . ?
\e$
,1*9\e(B)
573 (#x69d . ?
\e$
,1*C
\e(B)
574 (#x69e . ?
\e$
,1*I
\e(B)
575 (#x69f . ?
\e$
,1*O
\e(B)
589 (#x6af . ?
\e,L
\x7f\e(B)
742 (#x8a1 . ?\e$,1|W\e(B)
743 (#x8a2 . ?\e$A)0\e(B)
744 (#x8a3 . ?\e$A)$\e(B)
745 (#x8a4 . ?\e$,1{ \e(B)
746 (#x8a5 . ?\e$,1{!\e(B)
747 (#x8a6 . ?\e$A)&\e(B)
748 (#x8a7 . ?\e$,1|A\e(B)
749 (#x8a8 . ?\e$,1|C\e(B)
750 (#x8a9 . ?\e$,1|D\e(B)
751 (#x8aa . ?\e$,1|F\e(B)
752 (#x8ab . ?\e$,1|;\e(B)
753 (#x8ac . ?\e$,1|=\e(B)
754 (#x8ad . ?\e$,1|>\e(B)
755 (#x8ae . ?\e$,1|@\e(B)
756 (#x8af . ?\e$,1|H\e(B)
757 (#x8b0 . ?\e$,1|L\e(B)
758 (#x8bc . ?\e$A!\\e(B)
759 (#x8bd . ?\e$A!Y\e(B)
760 (#x8be . ?\e$A!]\e(B)
761 (#x8bf . ?\e$A!R\e(B)
762 (#x8c0 . ?\e$A!`\e(B)
763 (#x8c1 . ?\e$A!X\e(B)
764 (#x8c2 . ?\e$A!^\e(B)
765 (#x8c5 . ?\e$B"`\e(B)
766 (#x8c8 . ?
\e$
(G"D\e(B)
767 (#x8c9 . ?\e$(O"l
\e(B)
768 (#x8cd . ?
\e$B
"N\e(B)
769 (#x8ce . ?\e$B"M
\e(B)
770 (#x8cf . ?
\e$A
!T
\e(B)
771 (#x8d6 . ?
\e$A
!L
\e(B)
772 (#x8da . ?
\e$B
">\e(B)
773 (#x8db . ?\e$B"?
\e(B)
774 (#x8dc . ?
\e$A
!I
\e(B)
775 (#x8dd . ?
\e$A
!H
\e(B)
776 (#x8de . ?
\e$A
!D
\e(B)
777 (#x8df . ?
\e$A
!E
\e(B)
778 (#x8ef . ?
\e$B
"_\e(B)
779 (#x8f6 . ?\e$,1!R\e(B)
780 (#x8fb . ?\e$A!{\e(B)
781 (#x8fc . ?\e$A!|\e(B)
782 (#x8fd . ?\e$A!z\e(B)
783 (#x8fe . ?\e$A!}\e(B)
785 (#x9e0 . ?\e$A!t\e(B)
786 (#x9e1 . ?\e$(C"F
\e(B)
787 (#x9e2 . ?
\e$
(GB*\e(B)
788 (#x9e3 . ?
\e$
(GB-\e(B)
789 (#x9e4 . ?
\e$
(GB.
\e(B)
790 (#x9e5 . ?
\e$
(GB+\e(B)
791 (#x9e8 . ?
\e$
,1}d
\e(B)
792 (#x9e9 . ?
\e$
(GB,\e(B)
793 (#x9ea . ?
\e$A
)<\e(B)
794 (#x9eb . ?
\e$A
)4\e(B)
795 (#x9ec . ?
\e$A
)0\e(B)
796 (#x9ed . ?
\e$A
)8\e(B)
797 (#x9ee . ?
\e$A
)`\e(B)
798 (#x9ef . ?
\e$
,1|Z
\e(B)
799 (#x9f0 . ?
\e$
,1|
[\e(B)
800 (#x9f1 . ?
\e$A
)$
\e(B)
801 (#x9f2 . ?
\e$
,1|\
\e(B)
802 (#x9f3 . ?
\e$
,1|
]\e(B)
803 (#x9f4 . ?
\e$A
)@\e(B)
804 (#x9f5 . ?
\e$A
)H
\e(B)
805 (#x9f6 . ?
\e$A
)X
\e(B)
806 (#x9f7 . ?
\e$A
)P
\e(B)
807 (#x9f8 . ?
\e$A
)&\e(B)
809 (#xaa1 . ?
\e$
,1rc
\e(B)
810 (#xaa2 . ?
\e$
,1rb
\e(B)
811 (#xaa3 . ?
\e$
,1rd
\e(B)
812 (#xaa4 . ?
\e$
,1re
\e(B)
813 (#xaa5 . ?
\e$
,1rg
\e(B)
814 (#xaa6 . ?
\e$
,1rh
\e(B)
815 (#xaa7 . ?
\e$
,1ri
\e(B)
816 (#xaa8 . ?
\e$
,1rj
\e(B)
817 (#xaa9 . ?
\e$
(G!7\e(B)
818 (#xaaa . ?
\e$
(G!9\e(B)
819 (#xaae . ?
\e$A
!-
\e(B)
820 (#xaaf . ?
\e$
(G!-
\e(B)
821 (#xab0 . ?
\e$
(O'x
\e(B)
822 (#xab1 . ?
\e$
(O'y
\e(B)
823 (#xab2 . ?
\e$
(O'z
\e(B)
824 (#xab3 . ?
\e$
,1v6
\e(B)
825 (#xab4 . ?
\e$
,1v7
\e(B)
826 (#xab5 . ?
\e$
,1v8
\e(B)
827 (#xab6 . ?
\e$
,1v9
\e(B)
828 (#xab7 . ?
\e$
,1v
:\e(B)
829 (#xab8 . ?
\e$
(G""\e(B)
830 (#xabb . ?
\e$
,1rr
\e(B)
831 (#xabc . ?
\e$
,1{)\e(B)
832 (#xabe . ?
\e$
,1{*\e(B)
833 (#xac3 . ?
\e$
(C({\e(B)
834 (#xac4 . ?
\e$
(C(|
\e(B)
835 (#xac5 . ?
\e$
(C(}\e(B)
836 (#xac6 . ?
\e$
(C(~
\e(B)
837 (#xac9 . ?
\e$
(D"o\e(B)
838 (#xaca . ?\e$,2"s
\e(B)
839 (#xacc . ?
\e$
(O##\e(B)
840 (#xacd . ?
\e$
(O#!\e(B)
841 (#xace . ?
\e$A
!p
\e(B)
842 (#xacf . ?
\e$
,2!o
\e(B)
847 (#xad4 . ?\e$,1u^\e(B)
848 (#xad6 . ?\e$A!d\e(B)
849 (#xad7 . ?\e$A!e\e(B)
850 (#xad9 . ?\e$,2%]\e(B)
851 (#xadb . ?\e$,2!l\e(B)
852 (#xadc . ?\e$(O#$\e(B)
853 (#xadd . ?\e$(O#"\e(B)
854 (#xade . ?
\e$A
!q
\e(B)
855 (#xadf . ?
\e$
,2!n
\e(B)
856 (#xae0 . ?
\e$
(O#?
\e(B)
857 (#xae1 . ?
\e$
,2!k
\e(B)
858 (#xae2 . ?
\e$
,2!m
\e(B)
859 (#xae3 . ?
\e$A
!w
\e(B)
860 (#xae4 . ?
\e$
(G!}\e(B)
861 (#xae5 . ?
\e$A
!n
\e(B)
862 (#xae6 . ?
\e$
(O#@\e(B)
863 (#xae7 . ?
\e$
,2!j
\e(B)
864 (#xae8 . ?
\e$A
!x
\e(B)
865 (#xae9 . ?
\e$
(G!~
\e(B)
866 (#xaea . ?
\e$
(C"P\e(B)
867 (#xaeb . ?\e$(O-~\e(B)
868 (#xaec . ?\e$(O&@\e(B)
869 (#xaed . ?\e$(O&<\e(B)
870 (#xaee . ?\e$(O&>\e(B)
871 (#xaf0 . ?\e$,2%`\e(B)
872 (#xaf1 . ?\e$B"w
\e(B)
873 (#xaf2 . ?
\e$B
"x\e(B)
874 (#xaf3 . ?\e$(O'{\e(B)
875 (#xaf4 . ?\e$,2%W\e(B)
876 (#xaf5 . ?\e$B"t
\e(B)
877 (#xaf6 . ?
\e$B
"u\e(B)
878 (#xaf7 . ?\e$A!a\e(B)
879 (#xaf8 . ?\e$A!b\e(B)
880 (#xaf9 . ?\e$(O&g\e(B)
881 (#xafa . ?\e$,1zu\e(B)
882 (#xafb . ?\e$,1uW\e(B)
883 (#xafc . ?\e$,1s8\e(B)
884 (#xafd . ?\e$,1rz\e(B)
889 (#xba8 . ?\e$A!E\e(B)
890 (#xba9 . ?\e$A!D\e(B)
892 (#xbc2 . ?\e$A!M\e(B)
893 (#xbc3 . ?\e$A!I\e(B)
894 (#xbc4 . ?\e$,1zj\e(B)
896 (#xbca . ?\e$,1x8\e(B)
897 (#xbcc . ?\e$,1|5\e(B)
898 (#xbce . ?\e$,1yd\e(B)
899 (#xbcf . ?\e$A!p\e(B)
900 (#xbd3 . ?\e$,1zh\e(B)
901 (#xbd6 . ?\e$A!H\e(B)
902 (#xbd8 . ?\e$B"?
\e(B)
903 (#xbda . ?
\e$B
">\e(B)
904 (#xbdc . ?\e$,1yb\e(B)
905 (#xbfc . ?\e$,1yc\e(B)
1000 (#xde5 . ?
\e,Te
\e(B)
1001 (#xde6 . ?
\e,Tf
\e(B)
1002 (#xde7 . ?
\e,Tg
\e(B)
1003 (#xde8 . ?
\e,Th
\e(B)
1004 (#xde9 . ?
\e,Ti
\e(B)
1005 (#xdea . ?
\e,Tj
\e(B)
1006 (#xdeb . ?
\e,Tk
\e(B)
1007 (#xdec . ?
\e,Tl
\e(B)
1008 (#xded . ?
\e,Tm
\e(B)
1009 (#xdf0 . ?
\e,Tp
\e(B)
1010 (#xdf1 . ?
\e,Tq
\e(B)
1011 (#xdf2 . ?
\e,Tr
\e(B)
1012 (#xdf3 . ?
\e,Ts
\e(B)
1013 (#xdf4 . ?
\e,Tt
\e(B)
1014 (#xdf5 . ?
\e,Tu
\e(B)
1015 (#xdf6 . ?
\e,Tv
\e(B)
1016 (#xdf7 . ?
\e,Tw
\e(B)
1017 (#xdf8 . ?
\e,Tx
\e(B)
1018 (#xdf9 . ?
\e,Ty
\e(B)
1020 (#xea1 . ?
\e$
(C$
!\e(B)
1021 (#xea2 . ?
\e$
(C$
"\e(B)
1022 (#xea3 . ?\e$(C$#\e(B)
1023 (#xea4 . ?\e$(C$$\e(B)
1024 (#xea5 . ?\e$(C$%\e(B)
1025 (#xea6 . ?\e$(C$&\e(B)
1026 (#xea7 . ?\e$(C$'\e(B)
1027 (#xea8 . ?\e$(C$(\e(B)
1028 (#xea9 . ?\e$(C$)\e(B)
1029 (#xeaa . ?\e$(C$*\e(B)
1030 (#xeab . ?\e$(C$+\e(B)
1031 (#xeac . ?\e$(C$,\e(B)
1032 (#xead . ?\e$(C$-\e(B)
1033 (#xeae . ?\e$(C$.\e(B)
1034 (#xeaf . ?\e$(C$/\e(B)
1035 (#xeb0 . ?\e$(C$0\e(B)
1036 (#xeb1 . ?\e$(C$1\e(B)
1037 (#xeb2 . ?\e$(C$2\e(B)
1038 (#xeb3 . ?\e$(C$3\e(B)
1039 (#xeb4 . ?\e$(C$4\e(B)
1040 (#xeb5 . ?\e$(C$5\e(B)
1041 (#xeb6 . ?\e$(C$6\e(B)
1042 (#xeb7 . ?\e$(C$7\e(B)
1043 (#xeb8 . ?\e$(C$8\e(B)
1044 (#xeb9 . ?\e$(C$9\e(B)
1045 (#xeba . ?\e$(C$:\e(B)
1046 (#xebb . ?\e$(C$;\e(B)
1047 (#xebc . ?\e$(C$<\e(B)
1048 (#xebd . ?\e$(C$=\e(B)
1049 (#xebe . ?\e$(C$>\e(B)
1050 (#xebf . ?\e$(C$?\e(B)
1051 (#xec0 . ?\e$(C$@\e(B)
1052 (#xec1 . ?\e$(C$A\e(B)
1053 (#xec2 . ?\e$(C$B\e(B)
1054 (#xec3 . ?\e$(C$C\e(B)
1055 (#xec4 . ?\e$(C$D\e(B)
1056 (#xec5 . ?\e$(C$E\e(B)
1057 (#xec6 . ?\e$(C$F\e(B)
1058 (#xec7 . ?\e$(C$G\e(B)
1059 (#xec8 . ?\e$(C$H\e(B)
1060 (#xec9 . ?\e$(C$I\e(B)
1061 (#xeca . ?\e$(C$J\e(B)
1062 (#xecb . ?\e$(C$K\e(B)
1063 (#xecc . ?\e$(C$L\e(B)
1064 (#xecd . ?\e$(C$M\e(B)
1065 (#xece . ?\e$(C$N\e(B)
1066 (#xecf . ?\e$(C$O\e(B)
1067 (#xed0 . ?\e$(C$P\e(B)
1068 (#xed1 . ?\e$(C$Q\e(B)
1069 (#xed2 . ?\e$(C$R\e(B)
1070 (#xed3 . ?\e$(C$S\e(B)
1071 (#xed4 . ?\e$,1LH\e(B)
1072 (#xed5 . ?\e$,1LI\e(B)
1073 (#xed6 . ?\e$,1LJ\e(B)
1074 (#xed7 . ?\e$,1LK\e(B)
1075 (#xed8 . ?\e$,1LL\e(B)
1076 (#xed9 . ?\e$,1LM\e(B)
1077 (#xeda . ?\e$,1LN\e(B)
1078 (#xedb . ?\e$,1LO\e(B)
1079 (#xedc . ?\e$,1LP\e(B)
1080 (#xedd . ?\e$,1LQ\e(B)
1081 (#xede . ?\e$,1LR\e(B)
1082 (#xedf . ?\e$,1LS\e(B)
1083 (#xee0 . ?\e$,1LT\e(B)
1084 (#xee1 . ?\e$,1LU\e(B)
1085 (#xee2 . ?\e$,1LV\e(B)
1086 (#xee3 . ?\e$,1LW\e(B)
1087 (#xee4 . ?\e$,1LX\e(B)
1088 (#xee5 . ?\e$,1LY\e(B)
1089 (#xee6 . ?\e$,1LZ\e(B)
1090 (#xee7 . ?\e$,1L[\e(B)
1091 (#xee8 . ?\e$,1L\\e(B)
1092 (#xee9 . ?\e$,1L]\e(B)
1093 (#xeea . ?\e$,1L^\e(B)
1094 (#xeeb . ?\e$,1L_\e(B)
1095 (#xeec . ?\e$,1L`\e(B)
1096 (#xeed . ?\e$,1La\e(B)
1097 (#xeee . ?\e$,1Lb\e(B)
1098 (#xeef . ?\e$(C$]\e(B)
1099 (#xef0 . ?\e$(C$a\e(B)
1100 (#xef1 . ?\e$(C$h\e(B)
1101 (#xef2 . ?\e$(C$o\e(B)
1102 (#xef3 . ?\e$(C$q\e(B)
1103 (#xef4 . ?\e$(C$t\e(B)
1104 (#xef5 . ?\e$(C$v\e(B)
1105 (#xef6 . ?\e$(C$}\e(B)
1106 (#xef7 . ?\e$(C$~\e(B)
1107 (#xef8 . ?\e$,1M+\e(B)
1108 (#xef9 . ?\e$,1M0\e(B)
1109 (#xefa . ?\e$,1M9\e(B)
1110 (#xeff . ?\e$,1tI\e(B)
1116 (#x13bc . ?\e,b<\e(B)
1117 (#x13bd . ?\e,b=\e(B)
1118 (#x13be . ?\e,_/\e(B)
1120 (#x20a0 . ?\e$,1t@\e(B)
1121 (#x20a1 . ?\e$,1tA\e(B)
1122 (#x20a2 . ?\e$,1tB\e(B)
1123 (#x20a3 . ?\e$,1tC\e(B)
1124 (#x20a4 . ?\e$,1tD\e(B)
1125 (#x20a5 . ?\e$,1tE\e(B)
1126 (#x20a6 . ?\e$,1tF\e(B)
1127 (#x20a7 . ?\e$,1tG\e(B)
1128 (#x20a8 . ?\e$,1tH\e(B)
1129 (#x20aa . ?\e$,1tJ\e(B)
1130 (#x20ab . ?\e$,1tK\e(B)
1131 ;; Kana: Fixme: needs checking. Using Emacs to convert this to Unicode
1132 ;; and back changes this from "\e,b$
\e(B" (i.e., bytes "ESC
, b $ ESC
( B
") to
1133 ;; "\e,F$
\e(B" (i.e., bytes "ESC
, F $ ESC
( B
").
1134 (#x20ac . ?\e,b$\e(B)))
1135 (puthash (car pair) (cdr pair) x-keysym-table))
1137 ;; The following keysym codes for graphics are listed in the document
1138 ;; as not having unicodes available:
1140 ;; #x08b1 TOP LEFT SUMMATION Technical
1141 ;; #x08b2 BOTTOM LEFT SUMMATION Technical
1142 ;; #x08b3 TOP VERTICAL SUMMATION CONNECTOR Technical
1143 ;; #x08b4 BOTTOM VERTICAL SUMMATION CONNECTOR Technical
1144 ;; #x08b5 TOP RIGHT SUMMATION Technical
1145 ;; #x08b6 BOTTOM RIGHT SUMMATION Technical
1146 ;; #x08b7 RIGHT MIDDLE SUMMATION Technical
1147 ;; #x0aac SIGNIFICANT BLANK SYMBOL Publish
1148 ;; #x0abd DECIMAL POINT Publish
1149 ;; #x0abf MARKER Publish
1150 ;; #x0acb TRADEMARK SIGN IN CIRCLE Publish
1151 ;; #x0ada HEXAGRAM Publish
1152 ;; #x0aff CURSOR Publish
1153 ;; #x0dde THAI MAIHANAKAT Thai
1158 (define-obsolete-function-alias 'x-cut-buffer-or-selection-value
1159 'x-selection-value "24.1")
1161 ;; Arrange for the kill and yank functions to set and check the clipboard.
1163 (defun x-clipboard-yank ()
1164 "Insert the clipboard contents
, or the last stretch of killed text.
"
1165 (declare (obsolete clipboard-yank "25.1"))
1167 (let ((clipboard-text (gui--selection-value-internal 'CLIPBOARD))
1168 (select-enable-clipboard t))
1169 (if (and clipboard-text (> (length clipboard-text) 0))
1170 (kill-new clipboard-text))
1173 (declare-function accelerate-menu "xmenu.c
" (&optional frame) t)
1175 (defun x-menu-bar-open (&optional frame)
1176 "Open the menu bar if it is shown.
1177 `popup-menu
' is used if it is off.
"
1180 ((and (not (zerop (or (frame-parameter nil 'menu-bar-lines) 0)))
1181 (fboundp 'accelerate-menu))
1182 (accelerate-menu frame))
1184 (popup-menu (mouse-menu-bar-map) last-nonmenu-event))))
1187 ;;; Window system initialization.
1189 (defun x-win-suspend-error ()
1190 "Report an error when a suspend is attempted.
1191 This returns an error if any Emacs frames are X frames.
"
1192 ;; Don't allow suspending if any of the frames are X frames.
1193 (if (memq 'x (mapcar #'window-system (frame-list)))
1194 (error "Cannot suspend Emacs while running under X
")))
1196 (defvar x-initialized nil
1197 "Non-nil if the X window system has been initialized.
")
1199 (declare-function x-open-connection "xfns.c
"
1200 (display &optional xrm-string must-succeed))
1201 (declare-function x-server-max-request-size "xfns.c
" (&optional terminal))
1202 (declare-function x-get-resource "frame.c
"
1203 (attribute class &optional component subclass))
1204 (declare-function x-parse-geometry "frame.c
" (string))
1205 (defvar x-resource-name)
1206 (defvar x-display-name)
1207 (defvar x-command-line-resources)
1209 (defun x-initialize-window-system (&optional display)
1210 "Initialize Emacs for X frames and open the first connection to an X server.
"
1211 (cl-assert (not x-initialized))
1213 ;; Make sure we have a valid resource name.
1214 (or (stringp x-resource-name)
1216 (setq x-resource-name (invocation-name))
1218 ;; Change any . or * characters in x-resource-name to hyphens,
1219 ;; so as not to choke when we use it in X resource queries.
1220 (while (setq i (string-match "[.
*]" x-resource-name))
1221 (aset x-resource-name i ?-))))
1223 (x-open-connection (or display
1224 (setq x-display-name (or (getenv "DISPLAY
" (selected-frame))
1225 (getenv "DISPLAY
"))))
1226 x-command-line-resources
1227 ;; Exit Emacs with fatal error if this fails and we
1228 ;; are the initial display.
1229 (eq initial-window-system 'x))
1231 ;; Create the default fontset.
1232 (create-default-fontset)
1234 ;; Create the standard fontset.
1236 (create-fontset-from-fontset-spec standard-fontset-spec t)
1237 (error (display-warning
1239 (format "Creation of the standard fontset failed
: %s
" err)
1242 ;; Create fontset specified in X resources "Fontset-N
" (N is 0, 1, ...).
1243 (create-fontset-from-x-resource)
1245 ;; Set scroll bar mode to right if set by X resources. Default is left.
1246 (if (equal (x-get-resource "verticalScrollBars
" "ScrollBars
") "right
")
1247 (customize-set-variable 'scroll-bar-mode 'right))
1249 ;; Apply a geometry resource to the initial frame. Put it at the end
1250 ;; of the alist, so that anything specified on the command line takes
1252 (let* ((res-geometry (x-get-resource "geometry
" "Geometry
"))
1256 (setq parsed (x-parse-geometry res-geometry))
1257 ;; If the resource specifies a position,
1258 ;; call the position and size "user-specified
".
1259 (if (or (assq 'top parsed) (assq 'left parsed))
1260 (setq parsed (cons '(user-position . t)
1261 (cons '(user-size . t) parsed))))
1262 ;; All geometry parms apply to the initial frame.
1263 (setq initial-frame-alist (append initial-frame-alist parsed))
1264 ;; The size parms apply to all frames. Don't set it if there are
1265 ;; sizes there already (from command line).
1266 (if (and (assq 'height parsed)
1267 (not (assq 'height default-frame-alist)))
1268 (setq default-frame-alist
1269 (cons (cons 'height (cdr (assq 'height parsed)))
1270 default-frame-alist)))
1271 (if (and (assq 'width parsed)
1272 (not (assq 'width default-frame-alist)))
1273 (setq default-frame-alist
1274 (cons (cons 'width (cdr (assq 'width parsed)))
1275 default-frame-alist))))))
1277 ;; Check the reverseVideo resource.
1278 (let ((case-fold-search t))
1279 (let ((rv (x-get-resource "reverseVideo
" "ReverseVideo
")))
1281 (string-match "^
\\(true\\|yes
\\|on
\\)$
" rv))
1282 (setq default-frame-alist
1283 (cons '(reverse . t) default-frame-alist)))))
1285 ;; Set x-selection-timeout, measured in milliseconds.
1286 (let ((res-selection-timeout (x-get-resource "selectionTimeout
"
1287 "SelectionTimeout
")))
1288 (setq x-selection-timeout
1289 (if res-selection-timeout
1290 (string-to-number res-selection-timeout)
1293 ;; Don't let Emacs suspend under X.
1294 (add-hook 'suspend-hook 'x-win-suspend-error)
1296 ;; During initialization, we defer sending size hints to the window
1297 ;; manager, because that can induce a race condition:
1298 ;; http://lists.gnu.org/archive/html/emacs-devel/2008-10/msg00033.html
1299 ;; Send the size hints once initialization is done.
1300 (add-hook 'after-init-hook 'x-wm-set-size-hint)
1302 ;; Turn off window-splitting optimization; X is usually fast enough
1303 ;; that this is only annoying.
1304 (setq split-window-keep-point t)
1306 ;; Motif direct handling of f10 wasn't working right,
1307 ;; So temporarily we've turned it off in lwlib-Xm.c
1308 ;; and turned the Emacs f10 back on.
1309 ;; ;; Motif normally handles f10 itself, so don't try to handle it a second time.
1310 ;; (if (featurep 'motif)
1311 ;; (global-set-key [f10] 'ignore))
1313 ;; Enable CLIPBOARD copy/paste through menu bar commands.
1314 (menu-bar-enable-clipboard)
1316 ;; ;; Override Paste so it looks at CLIPBOARD first.
1317 ;; (define-key menu-bar-edit-menu [paste]
1318 ;; (append '(menu-item "Paste
" x-clipboard-yank
1319 ;; :enable (not buffer-read-only)
1320 ;; :help "Paste
(yank) text most recently cut
/copied
")
1323 (x-apply-session-resources)
1324 (setq x-initialized t))
1326 (add-to-list 'display-format-alist '("\\`[^
:]*:[0-
9]+\\(\\.
[0-
9]+\\)?
\\'" . x))
1327 (gui-method-define handle-args-function x #'x-handle-args)
1328 (gui-method-define frame-creation-function x #'x-create-frame-with-faces)
1329 (gui-method-define window-system-initialization x #'x-initialize-window-system)
1331 (gui-method-define gui-set-selection x
1332 (lambda (selection value)
1333 (if value (x-own-selection-internal selection value)
1334 (x-disown-selection-internal selection))))
1335 (gui-method-define gui-selection-owner-p x #'x-selection-owner-p)
1336 (gui-method-define gui-selection-exists-p x #'x-selection-exists-p)
1337 (gui-method-define gui-get-selection x #'x-get-selection-internal)
1339 ;; Initiate drag and drop
1340 (add-hook 'after-make-frame-functions 'x-dnd-init-frame)
1341 (define-key special-event-map [drag-n-drop] 'x-dnd-handle-drag-n-drop-event)
1343 (defcustom x-gtk-stock-map
1344 (mapcar (lambda (arg)
1345 (cons (purecopy (car arg)) (purecopy (cdr arg))))
1347 ("etc
/images
/new
" . ("document-new
" "gtk-new
"))
1348 ("etc
/images
/open
" . ("document-open
" "gtk-open
"))
1349 ("etc
/images
/diropen
" . "n
:system-file-manager
")
1350 ("etc
/images
/close
" . ("window-close
" "gtk-close
"))
1351 ("etc
/images
/save
" . ("document-save
" "gtk-save
"))
1352 ("etc
/images
/saveas
" . ("document-save-as
" "gtk-save-as
"))
1353 ("etc
/images
/undo
" . ("edit-undo
" "gtk-undo
"))
1354 ("etc
/images
/cut
" . ("edit-cut
" "gtk-cut
"))
1355 ("etc
/images
/copy
" . ("edit-copy
" "gtk-copy
"))
1356 ("etc
/images
/paste
" . ("edit-paste
" "gtk-paste
"))
1357 ("etc
/images
/search
" . ("edit-find
" "gtk-find
"))
1358 ("etc
/images
/print
" . ("document-print
" "gtk-print
"))
1359 ("etc
/images
/preferences
" . ("preferences-system
" "gtk-preferences
"))
1360 ("etc
/images
/help
" . ("help-browser
" "gtk-help
"))
1361 ("etc
/images
/left-arrow
" . ("go-previous
" "gtk-go-back
"))
1362 ("etc
/images
/right-arrow
" . ("go-next
" "gtk-go-forward
"))
1363 ("etc
/images
/home
" . ("go-home
" "gtk-home
"))
1364 ("etc
/images
/jump-to
" . ("go-jump
" "gtk-jump-to
"))
1365 ("etc
/images
/index
" . "gtk-index
")
1366 ("etc
/images
/exit
" . ("application-exit
" "gtk-quit
"))
1367 ("etc
/images
/cancel
" . "gtk-cancel
")
1368 ("etc
/images
/info
" . ("dialog-information
" "gtk-info
"))
1369 ("etc
/images
/bookmark_add
" . "n
:bookmark_add
")
1370 ;; Used in Gnus and/or MH-E:
1371 ("etc
/images
/attach
" . "gtk-attach
")
1372 ("etc
/images
/connect
" . "gtk-connect
")
1373 ("etc
/images
/contact
" . "gtk-contact
")
1374 ("etc
/images
/delete
" . ("edit-delete
" "gtk-delete
"))
1375 ("etc
/images
/describe
" . ("ocument-properties
" "gtk-properties
"))
1376 ("etc
/images
/disconnect
" . "gtk-disconnect
")
1377 ;; ("etc
/images
/exit
" . "gtk-exit
")
1378 ("etc
/images
/lock-broken
" . "gtk-lock_broken
")
1379 ("etc
/images
/lock-ok
" . "gtk-lock_ok
")
1380 ("etc
/images
/lock
" . "gtk-lock
")
1381 ("etc
/images
/next-page
" . "gtk-next-page
")
1382 ("etc
/images
/refresh
" . ("view-refresh
" "gtk-refresh
"))
1383 ("etc
/images
/sort-ascending
" . ("view-sort-ascending
" "gtk-sort-ascending
"))
1384 ("etc
/images
/sort-column-ascending
" . "gtk-sort-column-ascending
")
1385 ("etc
/images
/sort-criteria
" . "gtk-sort-criteria
")
1386 ("etc
/images
/sort-descending
" . ("view-sort-descending
"
1387 "gtk-sort-descending
"))
1388 ("etc
/images
/sort-row-ascending
" . "gtk-sort-row-ascending
")
1389 ("images
/gnus
/toggle-subscription
" . "gtk-task-recurring
")
1390 ("images
/mail
/compose
" . "gtk-mail-compose
")
1391 ("images
/mail
/copy
" . "gtk-mail-copy
")
1392 ("images
/mail
/forward
" . "gtk-mail-forward
")
1393 ("images
/mail
/inbox
" . "gtk-inbox
")
1394 ("images
/mail
/move
" . "gtk-mail-move
")
1395 ("images
/mail
/not-spam
" . "gtk-not-spam
")
1396 ("images
/mail
/outbox
" . "gtk-outbox
")
1397 ("images
/mail
/reply-all
" . "gtk-mail-reply-to-all
")
1398 ("images
/mail
/reply
" . "gtk-mail-reply
")
1399 ("images
/mail
/save-draft
" . "gtk-mail-handling
")
1400 ("images
/mail
/send
" . "gtk-mail-send
")
1401 ("images
/mail
/spam
" . "gtk-spam
")
1402 ;; Used for GDB Graphical Interface
1403 ("images
/gud
/break
" . "gtk-no
")
1404 ("images
/gud
/recstart
" . ("media-record
" "gtk-media-record
"))
1405 ("images
/gud
/recstop
" . ("media-playback-stop
" "gtk-media-stop
"))
1406 ;; No themed versions available:
1407 ;; mail/preview (combining stock_mail and stock_zoom)
1408 ;; mail/save (combining stock_mail, stock_save and stock_convert)
1410 "How icons for tool bars are mapped to Gtk
+ stock items.
1411 Emacs must be compiled with the Gtk
+ toolkit for this to have any effect.
1412 A value that begins with n
: denotes a named icon instead of a stock icon.
"
1414 :type '(choice (repeat
1416 (cons (string :tag "Emacs icon
")
1417 (choice (group (string :tag "Named
")
1418 (string :tag "Stock
"))
1419 (string :tag "Stock
/named
"))))))
1422 (defcustom icon-map-list '(x-gtk-stock-map)
1423 "A list of alists that map icon file names to stock
/named icons.
1424 The alists are searched in the order they appear. The first match is used.
1425 The keys in the alists are file names without extension and with two directory
1426 components. For example
, to map
/usr
/share
/emacs
/22.1.1/etc
/images
/open.xpm
1427 to stock item gtk-open
, use
:
1429 (\"etc
/images
/open
\" .
\"gtk-open
\")
1431 Themes also have named icons. To map to one of those
, use n
: before the name
:
1433 (\"etc
/images
/diropen
\" .
\"n
:system-file-manager
\")
1435 The list elements are either the symbol name for the alist or the
1438 If you don
't want stock icons
, set the variable to nil.
"
1440 :type '(choice (const :tag "Don
't use stock icons
" nil)
1441 (repeat (choice symbol
1442 (cons (string :tag "Emacs icon
")
1443 (string :tag "Stock
/named
")))))
1446 (defconst x-gtk-stock-cache (make-hash-table :weakness t :test 'equal))
1448 (defun x-gtk-map-stock (file)
1449 "Map icon with file name FILE to a Gtk
+ stock name.
1450 This uses
`icon-map-list
' to map icon file names to stock icon names.
"
1451 (when (stringp file)
1452 (or (gethash file x-gtk-stock-cache)
1456 (let* ((file-sans (file-name-sans-extension file))
1457 (key (and (string-match "/\\([^
/]+/[^
/]+/[^
/]+$
\\)"
1459 (match-string 1 file-sans)))
1460 (icon-map icon-map-list)
1462 (while (and (null value) icon-map)
1463 (setq elem (car icon-map)
1464 value (assoc-string (or key file-sans)
1468 icon-map (cdr icon-map)))
1469 (and value (cdr value))))
1470 x-gtk-stock-cache))))
1472 (global-set-key [XF86WakeUp] 'ignore)
1476 ;;; x-win.el ends here