annotate lisp/term/x-win.el @ 1310:8db103d11270

* keyboard.c (echo_char, read_char): Apply EVENT_HEAD without first testing for EVENT_HAS_PARAMETERS; EVENT_HEAD works properly on all sorts of events now. (read_key_sequence): Use the new accessors to decide in which window an event occurred. * keyboard.c (Qevent_unmodified): Replaced by... (Qevent_symbol_elements): New property. (syms_of_keyboard): initialize and staticpro the latter, not the former. * keyboard.c (readable_events): This doesn't need to scan and discard mouse release events anymore; it just uses EVENT_QUEUES_EMPTY. (kbd_buffer_get_event): No need to skip past mouse release events. * keyboard.c (button_down_location): New variable, which stores the location at which each button was pressed, so we can build a complete drag event when the button is released. (make_lispy_event): When a button is pressed, record its location in button_down_location, and turn it into a `down' event. When a button is released, compare its release location with its press location, and decide whether to call it a `click' or `drag' event. Change mouse movement events to be arranged like click events. (format_modifiers): Note that the click modifier has no written representation. (modifier_names, modifer_symbols): New variables, used to create the Qevent_symbol_elements property. (modify_event_symbol): Change the format of the modified symbol cache; there are too many modifier bits now to use a vector indexed by a modifier mask. Use an assoc-list instead. Document the format of the cache. Put the Qevent_symbol_elements property on each new symbol, instead of a Qevent_unmodified property. (symbols_of_keyboard): Put Qevent_symbol_elements properties on the symbols specified in head_table, not Qevent_unmodifed properties. Initialize and staticpro modifier_symbols, and staticpro the window elements of button_down_location.
author Jim Blandy <jimb@redhat.com>
date Fri, 02 Oct 1992 23:55:39 +0000
parents bf6b4bc3ccc0
children da9a60e97e72
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
1 ;; Parse switches controlling how Emacs interfaces with X window system.
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
2 ;; Copyright (C) 1990 Free Software Foundation, Inc.
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
3
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
4 ;; This file is part of GNU Emacs.
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
5
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
6 ;; GNU Emacs is distributed in the hope that it will be useful,
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
7 ;; but WITHOUT ANY WARRANTY. No author or distributor
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
8 ;; accepts responsibility to anyone for the consequences of using it
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
9 ;; or for whether it serves any particular purpose or works at all,
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
10 ;; unless he says so in writing. Refer to the GNU Emacs General Public
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
11 ;; License for full details.
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
12
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
13 ;; Everyone is granted permission to copy, modify and redistribute
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
14 ;; GNU Emacs, but only under the conditions described in the
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
15 ;; GNU Emacs General Public License. A copy of this license is
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
16 ;; supposed to have been given to you along with GNU Emacs so you
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
17 ;; can know your rights and responsibilities. It should be in a
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
18 ;; file named COPYING. Among other things, the copyright notice
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
19 ;; and this notice must be preserved on all copies.
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
20
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
21
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
22 ;; X-win.el: this file is loaded from ../lisp/startup.el when it recognizes
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
23 ;; that X windows are to be used. Command line switches are parsed and those
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
24 ;; pertaining to X are processed and removed from the command line. The
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
25 ;; X display is opened and hooks are set for popping up the initial window.
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
26
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
27 ;; startup.el will then examine startup files, and eventually call the hooks
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
28 ;; which create the first window (s).
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
29
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
30 ;; These are the standard X switches from the Xt Initialize.c file of
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
31 ;; Release 4.
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
32
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
33 ;; Command line Resource Manager string
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
34
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
35 ;; +rv *reverseVideo
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
36 ;; +synchronous *synchronous
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
37 ;; -background *background
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
38 ;; -bd *borderColor
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
39 ;; -bg *background
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
40 ;; -bordercolor *borderColor
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
41 ;; -borderwidth .borderWidth
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
42 ;; -bw .borderWidth
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
43 ;; -display .display
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
44 ;; -fg *foreground
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
45 ;; -fn *font
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
46 ;; -font *font
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
47 ;; -foreground *foreground
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
48 ;; -geometry .geometry
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
49 ;; -iconic .iconic
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
50 ;; -name .name
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
51 ;; -reverse *reverseVideo
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
52 ;; -rv *reverseVideo
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
53 ;; -selectionTimeout .selectionTimeout
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
54 ;; -synchronous *synchronous
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
55 ;; -title .title
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
56 ;; -xrm
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
57
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
58 ;; An alist of X options and the function which handles them. See
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
59 ;; ../startup.el.
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
60
273
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
61 (if (not (eq window-system 'x))
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
62 (error "Loading x-win.el but not compiled for X"))
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
63
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
64 (require 'frame)
467
95e458d30014 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 396
diff changeset
65 (require 'mouse)
273
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
66
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
67 (setq command-switch-alist
380
2ee195986980 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 378
diff changeset
68 (append '(("-bw" . x-handle-numeric-switch)
273
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
69 ("-d" . x-handle-display)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
70 ("-display" . x-handle-display)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
71 ("-name" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
72 ("-T" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
73 ("-r" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
74 ("-rv" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
75 ("-reverse" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
76 ("-fn" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
77 ("-font" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
78 ("-ib" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
79 ("-g" . x-handle-geometry)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
80 ("-geometry" . x-handle-geometry)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
81 ("-fg" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
82 ("-foreground". x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
83 ("-bg" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
84 ("-background". x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
85 ("-ms" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
86 ("-ib" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
87 ("-iconic" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
88 ("-cr" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
89 ("-vb" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
90 ("-hb" . x-handle-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
91 ("-bd" . x-handle-switch))
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
92 command-switch-alist))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
93
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
94 (defconst x-switch-definitions
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
95 '(("-name" name)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
96 ("-T" name)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
97 ("-r" lose)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
98 ("-rv" lose)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
99 ("-reverse" lose)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
100 ("-fn" font)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
101 ("-font" font)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
102 ("-ib" internal-border-width)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
103 ("-fg" foreground-color)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
104 ("-foreground" foreground-color)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
105 ("-bg" background-color)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
106 ("-background" background-color)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
107 ("-ms" mouse-color)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
108 ("-cr" cursor-color)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
109 ("-ib" icon-type t)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
110 ("-iconic" iconic-startup t)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
111 ("-vb" vertical-scroll-bar t)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
112 ("-hb" horizontal-scroll-bar t)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
113 ("-bd" border-color)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
114 ("-bw" border-width)))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
115
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
116 ;; Handler for switches of the form "-switch value" or "-switch".
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
117 (defun x-handle-switch (switch)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
118 (let ((aelt (assoc switch x-switch-definitions)))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
119 (if aelt
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
120 (if (nth 2 aelt)
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
121 (setq default-frame-alist
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
122 (cons (cons (nth 1 aelt) (nth 2 aelt))
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
123 default-frame-alist))
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
124 (setq default-frame-alist
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
125 (cons (cons (nth 1 aelt)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
126 (car x-invocation-args))
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
127 default-frame-alist)
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
128 x-invocation-args (cdr x-invocation-args))))))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
129
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
130 ;; Handler for switches of the form "-switch n"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
131 (defun x-handle-numeric-switch (switch)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
132 (let ((aelt (assoc switch x-switch-definitions)))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
133 (if aelt
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
134 (setq default-frame-alist
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
135 (cons (cons (nth 1 aelt)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
136 (string-to-int (car x-invocation-args)))
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
137 default-frame-alist)
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
138 x-invocation-args
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
139 (cdr x-invocation-args)))))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
140
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
141 ;; Handle the geometry option
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
142 (defun x-handle-geometry (switch)
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
143 (setq initial-frame-alist (append initial-frame-alist
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
144 (x-geometry (car x-invocation-args)))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
145 x-invocation-args (cdr x-invocation-args)))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
146
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
147 (defvar x-display-name nil
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
148 "The X display name specifying server and X frame.")
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
149
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
150 (defun x-handle-display (switch)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
151 (setq x-display-name (car x-invocation-args)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
152 x-invocation-args (cdr x-invocation-args)))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
153
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
154 (defvar x-invocation-args nil)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
155
321
4f8a6ec23155 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 303
diff changeset
156 (defun x-handle-args (args)
4f8a6ec23155 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 303
diff changeset
157 "Here the X-related command line options in ARGS are processed,
4f8a6ec23155 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 303
diff changeset
158 before the user's startup file is loaded. They are copied to
4f8a6ec23155 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 303
diff changeset
159 x-invocation args from which the X-related things are extracted, first
4f8a6ec23155 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 303
diff changeset
160 the switch (e.g., \"-fg\") in the following code, and possible values
4f8a6ec23155 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 303
diff changeset
161 (e.g., \"black\") in the option handler code (e.g., x-handle-switch).
4f8a6ec23155 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 303
diff changeset
162 This returns ARGS with the arguments that have been processed removed."
273
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
163 (setq x-invocation-args args
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
164 args nil)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
165 (while x-invocation-args
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
166 (let* ((this-switch (car x-invocation-args))
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
167 (aelt (assoc this-switch command-switch-alist)))
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
168 (setq x-invocation-args (cdr x-invocation-args))
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
169 (if aelt
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
170 (funcall (cdr aelt) this-switch)
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
171 (setq args (cons this-switch args)))))
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
172 (setq args (nreverse args)))
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
173
279
481ba9350304 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 273
diff changeset
174
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
175
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
176 ;;
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
177 ;; Standard X cursor shapes, courtesy of Mr. Fox, who wanted ALL of them.
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
178 ;;
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
179
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
180 (defconst x-pointer-X-cursor 0)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
181 (defconst x-pointer-arrow 2)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
182 (defconst x-pointer-based-arrow-down 4)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
183 (defconst x-pointer-based-arrow-up 6)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
184 (defconst x-pointer-boat 8)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
185 (defconst x-pointer-bogosity 10)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
186 (defconst x-pointer-bottom-left-corner 12)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
187 (defconst x-pointer-bottom-right-corner 14)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
188 (defconst x-pointer-bottom-side 16)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
189 (defconst x-pointer-bottom-tee 18)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
190 (defconst x-pointer-box-spiral 20)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
191 (defconst x-pointer-center-ptr 22)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
192 (defconst x-pointer-circle 24)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
193 (defconst x-pointer-clock 26)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
194 (defconst x-pointer-coffee-mug 28)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
195 (defconst x-pointer-cross 30)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
196 (defconst x-pointer-cross-reverse 32)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
197 (defconst x-pointer-crosshair 34)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
198 (defconst x-pointer-diamond-cross 36)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
199 (defconst x-pointer-dot 38)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
200 (defconst x-pointer-dotbox 40)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
201 (defconst x-pointer-double-arrow 42)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
202 (defconst x-pointer-draft-large 44)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
203 (defconst x-pointer-draft-small 46)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
204 (defconst x-pointer-draped-box 48)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
205 (defconst x-pointer-exchange 50)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
206 (defconst x-pointer-fleur 52)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
207 (defconst x-pointer-gobbler 54)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
208 (defconst x-pointer-gumby 56)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
209 (defconst x-pointer-hand1 58)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
210 (defconst x-pointer-hand2 60)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
211 (defconst x-pointer-heart 62)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
212 (defconst x-pointer-icon 64)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
213 (defconst x-pointer-iron-cross 66)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
214 (defconst x-pointer-left-ptr 68)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
215 (defconst x-pointer-left-side 70)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
216 (defconst x-pointer-left-tee 72)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
217 (defconst x-pointer-leftbutton 74)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
218 (defconst x-pointer-ll-angle 76)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
219 (defconst x-pointer-lr-angle 78)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
220 (defconst x-pointer-man 80)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
221 (defconst x-pointer-middlebutton 82)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
222 (defconst x-pointer-mouse 84)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
223 (defconst x-pointer-pencil 86)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
224 (defconst x-pointer-pirate 88)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
225 (defconst x-pointer-plus 90)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
226 (defconst x-pointer-question-arrow 92)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
227 (defconst x-pointer-right-ptr 94)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
228 (defconst x-pointer-right-side 96)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
229 (defconst x-pointer-right-tee 98)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
230 (defconst x-pointer-rightbutton 100)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
231 (defconst x-pointer-rtl-logo 102)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
232 (defconst x-pointer-sailboat 104)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
233 (defconst x-pointer-sb-down-arrow 106)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
234 (defconst x-pointer-sb-h-double-arrow 108)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
235 (defconst x-pointer-sb-left-arrow 110)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
236 (defconst x-pointer-sb-right-arrow 112)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
237 (defconst x-pointer-sb-up-arrow 114)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
238 (defconst x-pointer-sb-v-double-arrow 116)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
239 (defconst x-pointer-shuttle 118)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
240 (defconst x-pointer-sizing 120)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
241 (defconst x-pointer-spider 122)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
242 (defconst x-pointer-spraycan 124)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
243 (defconst x-pointer-star 126)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
244 (defconst x-pointer-target 128)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
245 (defconst x-pointer-tcross 130)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
246 (defconst x-pointer-top-left-arrow 132)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
247 (defconst x-pointer-top-left-corner 134)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
248 (defconst x-pointer-top-right-corner 136)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
249 (defconst x-pointer-top-side 138)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
250 (defconst x-pointer-top-tee 140)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
251 (defconst x-pointer-trek 142)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
252 (defconst x-pointer-ul-angle 144)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
253 (defconst x-pointer-umbrella 146)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
254 (defconst x-pointer-ur-angle 148)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
255 (defconst x-pointer-watch 150)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
256 (defconst x-pointer-xterm 152)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
257
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
258 ;;
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
259 ;; Available colors
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
260 ;;
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
261
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
262 (defvar x-colors '("aquamarine"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
263 "Aquamarine"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
264 "medium aquamarine"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
265 "MediumAquamarine"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
266 "black"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
267 "Black"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
268 "blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
269 "Blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
270 "cadet blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
271 "CadetBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
272 "cornflower blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
273 "CornflowerBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
274 "dark slate blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
275 "DarkSlateBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
276 "light blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
277 "LightBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
278 "light steel blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
279 "LightSteelBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
280 "medium blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
281 "MediumBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
282 "medium slate blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
283 "MediumSlateBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
284 "midnight blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
285 "MidnightBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
286 "navy blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
287 "NavyBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
288 "navy"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
289 "Navy"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
290 "sky blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
291 "SkyBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
292 "slate blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
293 "SlateBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
294 "steel blue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
295 "SteelBlue"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
296 "coral"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
297 "Coral"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
298 "cyan"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
299 "Cyan"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
300 "firebrick"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
301 "Firebrick"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
302 "brown"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
303 "Brown"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
304 "gold"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
305 "Gold"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
306 "goldenrod"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
307 "Goldenrod"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
308 "medium goldenrod"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
309 "MediumGoldenrod"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
310 "green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
311 "Green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
312 "dark green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
313 "DarkGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
314 "dark olive green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
315 "DarkOliveGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
316 "forest green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
317 "ForestGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
318 "lime green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
319 "LimeGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
320 "medium forest green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
321 "MediumForestGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
322 "medium sea green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
323 "MediumSeaGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
324 "medium spring green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
325 "MediumSpringGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
326 "pale green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
327 "PaleGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
328 "sea green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
329 "SeaGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
330 "spring green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
331 "SpringGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
332 "yellow green"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
333 "YellowGreen"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
334 "dark slate grey"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
335 "DarkSlateGrey"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
336 "dark slate gray"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
337 "DarkSlateGray"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
338 "dim grey"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
339 "DimGrey"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
340 "dim gray"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
341 "DimGray"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
342 "light grey"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
343 "LightGrey"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
344 "light gray"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
345 "LightGray"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
346 "gray"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
347 "grey"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
348 "Gray"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
349 "Grey"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
350 "khaki"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
351 "Khaki"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
352 "magenta"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
353 "Magenta"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
354 "maroon"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
355 "Maroon"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
356 "orange"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
357 "Orange"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
358 "orchid"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
359 "Orchid"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
360 "dark orchid"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
361 "DarkOrchid"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
362 "medium orchid"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
363 "MediumOrchid"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
364 "pink"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
365 "Pink"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
366 "plum"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
367 "Plum"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
368 "red"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
369 "Red"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
370 "indian red"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
371 "IndianRed"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
372 "medium violet red"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
373 "MediumVioletRed"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
374 "orange red"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
375 "OrangeRed"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
376 "violet red"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
377 "VioletRed"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
378 "salmon"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
379 "Salmon"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
380 "sienna"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
381 "Sienna"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
382 "tan"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
383 "Tan"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
384 "thistle"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
385 "Thistle"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
386 "turquoise"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
387 "Turquoise"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
388 "dark turquoise"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
389 "DarkTurquoise"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
390 "medium turquoise"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
391 "MediumTurquoise"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
392 "violet"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
393 "Violet"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
394 "blue violet"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
395 "BlueViolet"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
396 "wheat"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
397 "Wheat"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
398 "white"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
399 "White"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
400 "yellow"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
401 "Yellow"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
402 "green yellow"
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
403 "GreenYellow")
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
404 "The full list of X colors from the rgb.text file.")
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
405
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
406 (defun x-defined-colors ()
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
407 "Return a list of colors supported by the current X-Display."
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
408 (let ((all-colors x-colors)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
409 (this-color nil)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
410 (defined-colors nil))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
411 (while all-colors
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
412 (setq this-color (car all-colors)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
413 all-colors (cdr all-colors))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
414 (and (x-defined-color this-color)
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
415 (setq defined-colors (cons this-color defined-colors))))
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
416 defined-colors))
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
417
1099
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
418 (defvar scroll-bar-mode nil)
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
419
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
420 ;;; ??? x-create-screen needs to be changed to use scroll-bar-mode
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
421 ;;; to decide (by default) whether to make a scroll bar.
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
422 (defun scroll-bar-mode (flag)
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
423 "Toggle display of vertical scroll bars on each frame.
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
424 This command applies to all frames that exist and frames to be
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
425 created in the future.
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
426 With a numeric argument, if the argument is negative,
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
427 turn off scroll bars; otherwise, turn on scroll bars."
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
428 (interactive "P")
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
429 (setq scroll-bar-mode (if (null flag) (not scroll-bar-mode)
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
430 (or (not (numberp flag)) (>= flag 0))))
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
431 (let ((frames (frame-list)))
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
432 (while frames
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
433 (modify-frame-parameters (car frames)
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
434 (list (cons 'vertical-scrollbar scroll-bar-mode)))
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
435 (setq frames (cdr frames)))))
178215fd8a20 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 958
diff changeset
436
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
437 ;;;; Function keys
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
438
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
439 ;;; Give some common function keys reasonable definitions.
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
440 (define-key global-map [home] 'beginning-of-line)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
441 (define-key global-map [left] 'backward-char)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
442 (define-key global-map [up] 'previous-line)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
443 (define-key global-map [right] 'forward-char)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
444 (define-key global-map [down] 'next-line)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
445 (define-key global-map [prior] 'scroll-down)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
446 (define-key global-map [next] 'scroll-up)
1153
49e9dffbb2dc *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1099
diff changeset
447 (define-key global-map [M-next] 'scroll-other-window)
396
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
448 (define-key global-map [begin] 'beginning-of-buffer)
d0eb77a4d8f7 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 385
diff changeset
449 (define-key global-map [end] 'end-of-buffer)
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
450
872
336ffe2bd537 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 779
diff changeset
451 (define-key global-map "\C-z" 'iconify-frame)
54
bacfccb982c9 Initial revision
Jim Blandy <jimb@redhat.com>
parents:
diff changeset
452
279
481ba9350304 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 273
diff changeset
453 ;;; Do the actual X Windows setup here; the above code just defines
481ba9350304 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 273
diff changeset
454 ;;; functions and variables that we use now.
273
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
455
380
2ee195986980 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 378
diff changeset
456 (setq command-line-args (x-handle-args command-line-args))
299
d14d86137063 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 282
diff changeset
457 (x-open-connection (or x-display-name
d14d86137063 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 282
diff changeset
458 (setq x-display-name (getenv "DISPLAY"))))
334
5f0324deb0c5 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 321
diff changeset
459
779
c2dbf1fe0506 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 727
diff changeset
460 (setq frame-creation-function 'x-create-frame)
273
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
461 (setq suspend-hook
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
462 '(lambda ()
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
463 (error "Suspending an emacs running under X makes no sense")))
707
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
464
727
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 707
diff changeset
465 ;;; We keep track of the last text selected here, so we can check the
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 707
diff changeset
466 ;;; current selection against it, and avoid passing back our own text
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 707
diff changeset
467 ;;; from x-cut-buffer-or-selection-value.
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 707
diff changeset
468 (defvar x-last-selected-text nil)
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 707
diff changeset
469
707
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
470 ;;; Make TEXT, a string, the primary and clipboard X selections.
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
471 ;;; If you are running xclipboard, this means you can effectively
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
472 ;;; have a window on a copy of the kill-ring.
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
473 ;;; Also, set the value of X cut buffer 0, for backward compatibility
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
474 ;;; with older X application.
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
475 (defun x-select-text (text)
1265
cfda1fa93624 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1259
diff changeset
476 (x-set-cut-buffer 0 text)
707
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
477 (x-own-selection text 'clipboard)
727
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 707
diff changeset
478 (x-own-selection text)
540b047ece4d *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 707
diff changeset
479 (setq x-last-selected-text text))
643
9759addc5671 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 506
diff changeset
480
707
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
481 ;;; Return the value of the current X selection. For compatibility
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
482 ;;; with older X applications, this checks cut buffer 0 before
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
483 ;;; retrieving the value of the primary selection.
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
484 (defun x-cut-buffer-or-selection-value ()
1266
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
485 (let (text)
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
486
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
487 ;; Consult the cut buffer, then the selection. Treat empty strings
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
488 ;; as if they were unset.
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
489 (setq text (x-get-cut-buffer 0))
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
490 (if (string= text "") (setq text nil))
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
491 (or text (setq text (x-get-cut-buffer 0)))
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
492 (if (string= text "") (setq text nil))
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
493
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
494 (cond
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
495 ((not text) nil)
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
496 ((eq text x-last-selected-text) nil)
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
497 ((string= text x-last-selected-text)
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
498 ;; Record the newer string, so subsequent calls can use the `eq' test.
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
499 (setq x-last-selected-text text)
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
500 nil)
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
501 (t
bf6b4bc3ccc0 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 1265
diff changeset
502 (setq x-last-selected-text text)))))
707
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
503
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
504 ;;; Arrange for the kill and yank functions to set and check the clipboard.
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
505 (setq interprogram-cut-function 'x-select-text)
e4253da532fb *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 643
diff changeset
506 (setq interprogram-paste-function 'x-cut-buffer-or-selection-value)
273
0740875c024a *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 192
diff changeset
507
383
4f7094a6b826 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 380
diff changeset
508 ;;; Turn off window-splitting optimization; X is usually fast enough
4f7094a6b826 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 380
diff changeset
509 ;;; that this is only annoying.
4f7094a6b826 *** empty log message ***
Jim Blandy <jimb@redhat.com>
parents: 380
diff changeset
510 (setq split-window-keep-point t)