Mercurial > hg > xemacs-beta
comparison lisp/x-init.el @ 487:54fa1a5c2d12
[xemacs-hg @ 2001-04-28 07:48:36 by ben]
misc changes, some for 21.4
remove bogus lines setting zmacs_region_stays to 0.
remove debug lines.
Correct general info about init file.
Fix up Cygwin section.
More contributions.
Fix spurious setting of zmacs-region-stays to t after a non-shift
motion command.
Sync up with FSF 20.7, to fix bugs handling some etags line formats.
Move non-window-system specific code that was duplicated in
all window systems into the generic code.
* gutter.el (init-gutter): Removed. (unused)
Clean up the rectangle code w.r.t. selections. You'll now get
the right text copied into the primary selection (but not the
clipboard yet, unfortunately -- that really requires defining
our own rectangle type).
author | ben |
---|---|
date | Sat, 28 Apr 2001 07:48:46 +0000 |
parents | abe6d1db359e |
children | 7039e6323819 |
comparison
equal
deleted
inserted
replaced
486:a83afd50994d | 487:54fa1a5c2d12 |
---|---|
37 ;(setq x-emacs-application-class "Emacs") | 37 ;(setq x-emacs-application-class "Emacs") |
38 | 38 |
39 (defgroup x nil | 39 (defgroup x nil |
40 "The X Window system." | 40 "The X Window system." |
41 :group 'environment) | 41 :group 'environment) |
42 | |
43 ;; selections and active regions | |
44 | |
45 ;; If and only if zmacs-regions is true: | |
46 | |
47 ;; When a mark is pushed and the region goes into the "active" state, we | |
48 ;; assert it as the Primary selection. This causes it to be hilighted. | |
49 ;; When the region goes into the "inactive" state, we disown the Primary | |
50 ;; selection, causing the region to be dehilighted. | |
51 | |
52 ;; Note that it is possible for the region to be in the "active" state | |
53 ;; and not be hilighted, if it is in the active state and then some other | |
54 ;; application asserts the selection. This is probably not a big deal. | |
55 | |
56 (defun x-activate-region-as-selection () | |
57 (if (marker-buffer (mark-marker t)) | |
58 (own-selection (cons (point-marker t) (mark-marker t))))) | |
59 | 42 |
60 ;; OpenWindows-like "find" processing. These functions are really Sunisms, | 43 ;; OpenWindows-like "find" processing. These functions are really Sunisms, |
61 ;; but we put them here instead of in x-win-sun.el in case someone wants | 44 ;; but we put them here instead of in x-win-sun.el in case someone wants |
62 ;; to use them when not running on a Sun console (presumably after binding | 45 ;; to use them when not running on a Sun console (presumably after binding |
63 ;; them to different keys, or putting them on menus.) | 46 ;; them to different keys, or putting them on menus.) |
296 (defvar post-x-win-initted nil) | 279 (defvar post-x-win-initted nil) |
297 | 280 |
298 (defun init-post-x-win () | 281 (defun init-post-x-win () |
299 "Initialize X Windows at startup (post). Don't call this." | 282 "Initialize X Windows at startup (post). Don't call this." |
300 (when (not post-x-win-initted) | 283 (when (not post-x-win-initted) |
301 ;; We can't load this until after the initial X device is created | |
302 ;; because the icon initialization needs to access the display to get | |
303 ;; any toolbar-related color resources. | |
304 (if (and (not (featurep 'infodock)) (featurep 'toolbar)) | |
305 (init-x-toolbar)) | |
306 (if (and (featurep 'infodock) (featurep 'toolbar)) | |
307 (require 'id-x-toolbar)) | |
308 (if (featurep 'gutter) (init-gutter)) | |
309 (if (featurep 'mule) (init-mule-x-win)) | 284 (if (featurep 'mule) (init-mule-x-win)) |
310 ;; these are only ever called if zmacs-regions is true. | |
311 (add-hook 'zmacs-deactivate-region-hook | |
312 (lambda () | |
313 (when (console-on-window-system-p) | |
314 (disown-selection)))) | |
315 (add-hook 'zmacs-activate-region-hook | |
316 (lambda () | |
317 (when (console-on-window-system-p) | |
318 (x-activate-region-as-selection)))) | |
319 (add-hook 'zmacs-update-region-hook | |
320 (lambda () | |
321 (when (console-on-window-system-p) | |
322 (x-activate-region-as-selection)))) | |
323 ;; Motif-ish bindings | 285 ;; Motif-ish bindings |
324 ;; The following two were generally unliked. | 286 ;; The following two were generally unliked. |
325 ;;(define-key global-map '(shift delete) 'kill-primary-selection) | 287 ;;(define-key global-map '(shift delete) 'kill-primary-selection) |
326 ;;(define-key global-map '(control delete) 'delete-primary-selection) | 288 ;;(define-key global-map '(control delete) 'delete-primary-selection) |
327 (define-key global-map '(shift insert) 'yank-clipboard-selection) | 289 (define-key global-map '(shift insert) 'yank-clipboard-selection) |
329 ;; These are Sun-isms. | 291 ;; These are Sun-isms. |
330 (define-key global-map 'copy 'copy-primary-selection) | 292 (define-key global-map 'copy 'copy-primary-selection) |
331 (define-key global-map 'paste 'yank-clipboard-selection) | 293 (define-key global-map 'paste 'yank-clipboard-selection) |
332 (define-key global-map 'cut 'kill-primary-selection) | 294 (define-key global-map 'cut 'kill-primary-selection) |
333 | 295 |
334 (define-key global-map 'menu 'popup-mode-menu) | |
335 ;;(define-key global-map '(shift menu) 'x-goto-menubar) ;NYI | 296 ;;(define-key global-map '(shift menu) 'x-goto-menubar) ;NYI |
336 | 297 |
337 (setq post-x-win-initted t))) | 298 (setq post-x-win-initted t))) |
338 | 299 |
339 ;;; Keyboard initialization needs to be done differently for each X | 300 ;;; Keyboard initialization needs to be done differently for each X |