annotate lisp/x11/x-init.el @ 48:56c54cf7c5b6 r19-16b90

Import from CVS: tag r19-16b90
author cvs
date Mon, 13 Aug 2007 08:56:04 +0200
parents b82b59fe008d
children ee648375d8d6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; x-init.el --- initialization code for X windows
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 ;; Copyright (C) 1990, 1993, 1994 Free Software Foundation, Inc.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;; Copyright (C) 1995 Board of Trustees, University of Illinois.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 ;; Copyright (C) 1995, 1996 Ben Wing.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;; Author: various
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;; Keywords: terminals
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;; This file is part of XEmacs.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;; XEmacs is free software; you can redistribute it and/or modify it
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;; under the terms of the GNU General Public License as published by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;; the Free Software Foundation; either version 2, or (at your option)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;; any later version.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;; XEmacs is distributed in the hope that it will be useful, but
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;; General Public License for more details.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21 ;; You should have received a copy of the GNU General Public License
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;; Commentary:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 ;;; Code:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 ;;; If you want to change this variable, this is the place you must do it.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 ;;; Do not set it to a string containing periods. X doesn't like that.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 ;(setq x-emacs-application-class "Emacs")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 ;;; selections and active regions
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35 ;;; If and only if zmacs-regions is true:
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 ;;; When a mark is pushed and the region goes into the "active" state, we
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 ;;; assert it as the Primary selection. This causes it to be hilighted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 ;;; When the region goes into the "inactive" state, we disown the Primary
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 ;;; selection, causing the region to be dehilighted.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 ;;; Note that it is possible for the region to be in the "active" state
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 ;;; and not be hilighted, if it is in the active state and then some other
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 ;;; application asserts the selection. This is probably not a big deal.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (defun x-activate-region-as-selection ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 (if (marker-buffer (mark-marker t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (x-own-selection (cons (point-marker t) (mark-marker t)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 ;;; OpenWindows-like "find" processing. These functions are really Sunisms,
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 ;;; but we put them here instead of in x-win-sun.el in case someone wants
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
52 ;;; to use them when not running on a Sun console (presumably after binding
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
53 ;;; them to different keys, or putting them on menus.)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (defvar ow-find-last-string nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 (defvar ow-find-last-clipboard nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 (defun ow-find (&optional backward-p)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 "Search forward the next occurrence of the text of the selection."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 (let ((sel (condition-case () (x-get-selection) (error nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 (clip (condition-case () (x-get-clipboard) (error nil)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (setq text (cond
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 (sel)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 ((not (equal clip ow-find-last-clipboard))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (setq ow-find-last-clipboard clip))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (ow-find-last-string)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69 (t (error "No selection available"))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 (setq ow-find-last-string text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 (cond (backward-p
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 (search-backward text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73 (set-mark (+ (point) (length text))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 (t
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75 (search-forward text)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 (set-mark (- (point) (length text)))))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77 (zmacs-activate-region)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79 (defun ow-find-backward ()
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
80 "Search backward the previous occurrence of the text of the selection."
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81 (interactive)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 (ow-find t))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83
48
56c54cf7c5b6 Import from CVS: tag r19-16b90
cvs
parents: 4
diff changeset
84 (defun x-initialize-compose ()
56c54cf7c5b6 Import from CVS: tag r19-16b90
cvs
parents: 4
diff changeset
85 "Enable compose processing"
56c54cf7c5b6 Import from CVS: tag r19-16b90
cvs
parents: 4
diff changeset
86 (require 'x-compose))
56c54cf7c5b6 Import from CVS: tag r19-16b90
cvs
parents: 4
diff changeset
87
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
88 ;;; Load X-server specific code.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
89 ;;; Specifically, load some code to repair the grievous damage that MIT and
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
90 ;;; Sun have done to the default keymap for the Sun keyboards.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
91
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
92 (defun x-initialize-keyboard ()
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
93 "Perform X-Server-specific initializations. Don't call this."
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
94 ;; This is some heuristic junk that tries to guess whether this is
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
95 ;; a Sun keyboard.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
96 ;;
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
97 ;; One way of implementing this (which would require C support) would
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
98 ;; be to examine the X keymap itself and see if the layout looks even
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
99 ;; remotely like a Sun - check for the Find key on a particular
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
100 ;; keycode, for example. It'd be nice to have a table of this to
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
101 ;; recognize various keyboards; see also xkeycaps.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
102 (let ((vendor (x-server-vendor)))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
103 (cond ((or (string-match "Sun Microsystems" vendor)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
104 ;; MIT losingly fails to tell us what hardware the X server
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
105 ;; is managing, so assume all MIT displays are Suns... HA HA!
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
106 (string-equal "MIT X Consortium" vendor)
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
107 (string-equal "X Consortium" vendor))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
108 ;; Ok, we think this could be a Sun keyboard. Load the Sun code.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
109 (or (load "x-win-sun" t t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
110 (warn "Unable to load term file x-win-sun")))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
111 ((string-match "XFree86" vendor)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
112 ;; Those XFree86 people do some weird keysym stuff, too.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
113 (or (load "x-win-xfree86" t t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
114 (warn "Unable to load term file x-win-xfree86")))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
115 )))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
116
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
117
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
118 (defvar pre-x-win-initted nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
119
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
120 (defun init-pre-x-win ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
121 "Initialize X Windows at startup (pre). Don't call this."
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
122 (when (not pre-x-win-initted)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
123 (require 'x-iso8859-1)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
124 (setq character-set-property 'x-iso8859/1) ; see x-iso8859-1.el
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
125
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
126 (setq initial-frame-plist (if initial-frame-unmapped-p
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
127 '(initially-unmapped t)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
128 nil))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
129 (setq pre-x-win-initted t)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
130
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
131 (defvar x-win-initted nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
132
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
133 (defun init-x-win ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
134 "Initialize X Windows at startup. Don't call this."
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
135 (when (not x-win-initted)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
136 (init-pre-x-win)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
137
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
138 ;; Open the X display when this file is loaded
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
139 ;; (Note that the first frame is created later.)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
140 (setq x-initial-argv-list (cons (car command-line-args)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
141 command-line-args-left))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
142 (make-x-device nil)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
143 (setq command-line-args-left (cdr x-initial-argv-list))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
144 (setq x-win-initted t)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
145
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
146 (defvar post-x-win-initted nil)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
147
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
148 (defun init-post-x-win ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
149 "Initialize X Windows at startup (post). Don't call this."
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
150 (when (not post-x-win-initted)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
151 ;; We can't load this until after the initial X device is created
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
152 ;; because the icon initialization needs to access the display to get
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
153 ;; any toolbar-related color resources.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
154 (if (featurep 'toolbar)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
155 (init-x-toolbar))
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
156 ;; these are only ever called if zmacs-regions is true.
4
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
157 (add-hook 'zmacs-deactivate-region-hook
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
158 (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
159 (if (console-on-window-system-p)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
160 (x-disown-selection))))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
161 (add-hook 'zmacs-activate-region-hook
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
162 (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
163 (if (console-on-window-system-p)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
164 (x-activate-region-as-selection))))
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
165 (add-hook 'zmacs-update-region-hook
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
166 (lambda ()
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
167 (if (console-on-window-system-p)
b82b59fe008d Import from CVS: tag r19-15b3
cvs
parents: 2
diff changeset
168 (x-activate-region-as-selection))))
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
169 ;; Motif-ish bindings
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
170 ;; The following two were generally unliked.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
171 ;;(define-key global-map '(shift delete) 'x-kill-primary-selection)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
172 ;;(define-key global-map '(control delete) 'x-delete-primary-selection)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
173 (define-key global-map '(shift insert) 'x-yank-clipboard-selection)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
174 (define-key global-map '(control insert) 'x-copy-primary-selection)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
175 ;; These are Sun-isms.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
176 (define-key global-map 'copy 'x-copy-primary-selection)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
177 (define-key global-map 'paste 'x-yank-clipboard-selection)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
178 (define-key global-map 'cut 'x-kill-primary-selection)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
179
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
180 (define-key global-map 'menu 'popup-mode-menu)
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
181 ;;(define-key global-map '(shift menu) 'x-goto-menubar) ;NYI
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
182
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
183 ;; This runs after the first frame has been created (we can't
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
184 ;; talk to the X server before that) but before the
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
185 ;; site-start-file or .emacs file, so sites and users have a
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
186 ;; chance to override it.
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
187 (add-hook 'before-init-hook 'x-initialize-keyboard)
48
56c54cf7c5b6 Import from CVS: tag r19-16b90
cvs
parents: 4
diff changeset
188 (add-hook 'before-init-hook 'x-initialize-compose)
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
189
2
ac2d302a0011 Import from CVS: tag r19-15b2
cvs
parents: 0
diff changeset
190 (setq post-x-win-initted t)))
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
191
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
192 (defun make-frame-on-display (display &optional parms)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
193 "Create a frame on the X display named DISPLAY.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
194 DISPLAY should be a standard display string such as \"unix:0\",
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
195 or nil for the display specified on the command line or in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
196 DISPLAY environment variable.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
197
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
198 PROPS should be an plist of properties, as in the call to `make-frame'.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
199
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
200 This function opens a connection to the display or reuses an existing
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
201 connection.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
202
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
203 This function is a trivial wrapper around `make-frame-on-device'."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
204 (interactive "sMake frame on display: ")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
205 (if (equal display "") (setq display nil))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
206 (make-frame-on-device 'x display parms))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
207
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
208 ;;; x-init.el ends here