comparison lisp/x11/x-init.el @ 70:131b0175ea99 r20-0b30

Import from CVS: tag r20-0b30
author cvs
date Mon, 13 Aug 2007 09:02:59 +0200
parents ee648375d8d6
children 54cc21c15cbb
comparison
equal deleted inserted replaced
69:804d1389bcd6 70:131b0175ea99
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of 17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 ;; General Public License for more details. 19 ;; General Public License for more details.
20 20
21 ;; You should have received a copy of the GNU General Public License 21 ;; You should have received a copy of the GNU General Public License
22 ;; along with XEmacs; see the file COPYING. If not, write to the Free 22 ;; along with XEmacs; see the file COPYING. If not, write to the
23 ;; Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. 23 ;; Free Software Foundation, 59 Temple Place - Suite 330,
24 ;; Boston, MA 02111-1307, USA.
24 25
25 ;;; Commentary: 26 ;;; Commentary:
26 27
27 ;;; Code: 28 ;;; Code:
28 29
78 79
79 (defun ow-find-backward () 80 (defun ow-find-backward ()
80 "Search backward the previous occurrence of the text of the selection." 81 "Search backward the previous occurrence of the text of the selection."
81 (interactive) 82 (interactive)
82 (ow-find t)) 83 (ow-find t))
83
84 (defun x-initialize-compose ()
85 "Enable compose processing"
86 (when (x-keysym-on-keyboard-p "Multi_key")
87 (require 'x-compose)))
88 84
89 ;;; Load X-server specific code. 85 ;;; Load X-server specific code.
90 ;;; Specifically, load some code to repair the grievous damage that MIT and 86 ;;; Specifically, load some code to repair the grievous damage that MIT and
91 ;;; Sun have done to the default keymap for the Sun keyboards. 87 ;;; Sun have done to the default keymap for the Sun keyboards.
92 88
152 ;; We can't load this until after the initial X device is created 148 ;; We can't load this until after the initial X device is created
153 ;; because the icon initialization needs to access the display to get 149 ;; because the icon initialization needs to access the display to get
154 ;; any toolbar-related color resources. 150 ;; any toolbar-related color resources.
155 (if (featurep 'toolbar) 151 (if (featurep 'toolbar)
156 (init-x-toolbar)) 152 (init-x-toolbar))
153 (if (featurep 'mule)
154 (init-mule-x-win))
157 ;; these are only ever called if zmacs-regions is true. 155 ;; these are only ever called if zmacs-regions is true.
158 (add-hook 'zmacs-deactivate-region-hook 156 (add-hook 'zmacs-deactivate-region-hook 'x-disown-selection)
159 (lambda () 157 (add-hook 'zmacs-activate-region-hook 'x-activate-region-as-selection)
160 (if (console-on-window-system-p) 158 (add-hook 'zmacs-update-region-hook 'x-activate-region-as-selection)
161 (x-disown-selection)))) 159
162 (add-hook 'zmacs-activate-region-hook
163 (lambda ()
164 (if (console-on-window-system-p)
165 (x-activate-region-as-selection))))
166 (add-hook 'zmacs-update-region-hook
167 (lambda ()
168 (if (console-on-window-system-p)
169 (x-activate-region-as-selection))))
170 ;; Motif-ish bindings 160 ;; Motif-ish bindings
171 ;; The following two were generally unliked. 161 ;; The following two were generally unliked.
172 ;;(define-key global-map '(shift delete) 'x-kill-primary-selection) 162 ;;(define-key global-map '(shift delete) 'x-kill-primary-selection)
173 ;;(define-key global-map '(control delete) 'x-delete-primary-selection) 163 ;;(define-key global-map '(control delete) 'x-delete-primary-selection)
174 (define-key global-map '(shift insert) 'x-yank-clipboard-selection) 164 (define-key global-map '(shift insert) 'x-yank-clipboard-selection)
184 ;; This runs after the first frame has been created (we can't 174 ;; This runs after the first frame has been created (we can't
185 ;; talk to the X server before that) but before the 175 ;; talk to the X server before that) but before the
186 ;; site-start-file or .emacs file, so sites and users have a 176 ;; site-start-file or .emacs file, so sites and users have a
187 ;; chance to override it. 177 ;; chance to override it.
188 (add-hook 'before-init-hook 'x-initialize-keyboard) 178 (add-hook 'before-init-hook 'x-initialize-keyboard)
189 (add-hook 'before-init-hook 'x-initialize-compose)
190 179
191 (setq post-x-win-initted t))) 180 (setq post-x-win-initted t)))
192 181
193 (defun make-frame-on-display (display &optional parms) 182 (defun make-frame-on-display (display &optional props)
194 "Create a frame on the X display named DISPLAY. 183 "Create a frame on the X display named DISPLAY.
195 DISPLAY should be a standard display string such as \"unix:0\", 184 DISPLAY should be a standard display string such as \"unix:0\",
196 or nil for the display specified on the command line or in the 185 or nil for the display specified on the command line or in the
197 DISPLAY environment variable. 186 DISPLAY environment variable.
198 187
199 PROPS should be an plist of properties, as in the call to `make-frame'. 188 PROPS should be a plist of properties, as in the call to `make-frame'.
200 189
201 This function opens a connection to the display or reuses an existing 190 This function opens a connection to the display or reuses an existing
202 connection. 191 connection.
203 192
204 This function is a trivial wrapper around `make-frame-on-device'." 193 This function is a trivial wrapper around `make-frame-on-device'."
205 (interactive "sMake frame on display: ") 194 (interactive "sMake frame on display: ")
206 (if (equal display "") (setq display nil)) 195 (if (equal display "") (setq display nil))
207 (make-frame-on-device 'x display parms)) 196 (make-frame-on-device 'x display props))
208 197
209 ;;; x-init.el ends here 198 ;;; x-init.el ends here