Mercurial > emacs
comparison lisp/term/x-win.el @ 707:e4253da532fb
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 10 Jun 1992 02:47:07 +0000 |
parents | 9759addc5671 |
children | 540b047ece4d |
comparison
equal
deleted
inserted
replaced
706:86cb5db0b6c3 | 707:e4253da532fb |
---|---|
435 | 435 |
436 (setq command-line-args (x-handle-args command-line-args)) | 436 (setq command-line-args (x-handle-args command-line-args)) |
437 (x-open-connection (or x-display-name | 437 (x-open-connection (or x-display-name |
438 (setq x-display-name (getenv "DISPLAY")))) | 438 (setq x-display-name (getenv "DISPLAY")))) |
439 | 439 |
440 ;; xterm.c depends on using interrupt-driven input, but we don't want | 440 ;;; xterm.c depends on using interrupt-driven input, but we don't want |
441 ;; the fcntls to apply to the terminal, so we do this after opening | 441 ;;; the fcntls to apply to the terminal, so we do this after opening |
442 ;; the display. | 442 ;;; the display. |
443 (set-input-mode t nil t) | 443 (set-input-mode t nil t) |
444 | 444 |
445 (setq screen-creation-function 'x-create-screen) | 445 (setq screen-creation-function 'x-create-screen) |
446 (setq suspend-hook | 446 (setq suspend-hook |
447 '(lambda () | 447 '(lambda () |
448 (error "Suspending an emacs running under X makes no sense"))) | 448 (error "Suspending an emacs running under X makes no sense"))) |
449 | |
450 ;;; Make TEXT, a string, the primary and clipboard X selections. | |
451 ;;; If you are running xclipboard, this means you can effectively | |
452 ;;; have a window on a copy of the kill-ring. | |
453 ;;; Also, set the value of X cut buffer 0, for backward compatibility | |
454 ;;; with older X application. | |
455 (defun x-select-text (text) | |
456 (x-own-selection text 'cut-buffer0) | |
457 (x-own-selection text 'clipboard) | |
458 (x-own-selection text)) | |
459 | |
460 ;;; Return the value of the current X selection. For compatibility | |
461 ;;; with older X applications, this checks cut buffer 0 before | |
462 ;;; retrieving the value of the primary selection. | |
463 (defun x-cut-buffer-or-selection-value () | |
464 (or (x-selection-value 'cut-buffer0) | |
465 (x-selection-value))) | |
466 | |
467 ;;; Arrange for the kill and yank functions to set and check the clipboard. | |
449 (setq interprogram-cut-function 'x-select-text) | 468 (setq interprogram-cut-function 'x-select-text) |
450 | 469 (setq interprogram-paste-function 'x-cut-buffer-or-selection-value) |
451 ;; Make TEXT, a string, the primary and clipboard X selections. | |
452 ;; If you are running xclipboard, this means you can effectively | |
453 ;; have a window on a copy of the kill-ring. | |
454 (defun x-select-text (text) | |
455 (if (eq window-system 'x) | |
456 (progn | |
457 (x-own-selection text 'clipboard) | |
458 (x-own-selection text)))) | |
459 | 470 |
460 ;;; Turn off window-splitting optimization; X is usually fast enough | 471 ;;; Turn off window-splitting optimization; X is usually fast enough |
461 ;;; that this is only annoying. | 472 ;;; that this is only annoying. |
462 (setq split-window-keep-point t) | 473 (setq split-window-keep-point t) |