diff options
| author | Jim Blandy | 1993-03-25 04:37:38 +0000 |
|---|---|---|
| committer | Jim Blandy | 1993-03-25 04:37:38 +0000 |
| commit | c8c72d6b4b54800d6efc9bca914eb0a1ffe12e8c (patch) | |
| tree | 9aeae8d80b8dd19aedb845e1257e171bc03abbbe | |
| parent | b2e521948e0742ade36f3afcf295feab062d115a (diff) | |
| download | emacs-c8c72d6b4b54800d6efc9bca914eb0a1ffe12e8c.tar.gz emacs-c8c72d6b4b54800d6efc9bca914eb0a1ffe12e8c.zip | |
* x-win.el: Update copyright to 1993.
* x-win.el: Bind [M-next] to advertised-scroll-other-window instead of
scroll-other-window, and then make advertised-scroll-other-window
an alias for scroll-other-window.
* term/x-win.el: Require select.el.
(x-select-text): Update call to x-set-cut-buffer.
Put `PRIMARY' and `CLIPBOARD' in upper case.
(x-cut-buffer-or-selection-value): Put `PRIMARY' in upper case.
| -rw-r--r-- | lisp/term/x-win.el | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 988c0b3d28f..a088a265b29 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | ;; Author: FSF | 3 | ;; Author: FSF |
| 4 | ;; Keywords: terminals | 4 | ;; Keywords: terminals |
| 5 | 5 | ||
| 6 | ;; Copyright (C) 1990 Free Software Foundation, Inc. | 6 | ;; Copyright (C) 1993 Free Software Foundation, Inc. |
| 7 | 7 | ||
| 8 | ;; This file is part of GNU Emacs. | 8 | ;; This file is part of GNU Emacs. |
| 9 | 9 | ||
| @@ -432,6 +432,9 @@ This returns ARGS with the arguments that have been processed removed." | |||
| 432 | (define-key global-map [down] 'next-line) | 432 | (define-key global-map [down] 'next-line) |
| 433 | (define-key global-map [prior] 'scroll-down) | 433 | (define-key global-map [prior] 'scroll-down) |
| 434 | (define-key global-map [next] 'scroll-up) | 434 | (define-key global-map [next] 'scroll-up) |
| 435 | ;; We use a different symbol to prevent | ||
| 436 | ;; doc strings from listing M-next as the preferred way to do this. | ||
| 437 | (fset 'advertised-scroll-other-window 'scroll-other-window) | ||
| 435 | (define-key global-map [M-next] 'scroll-other-window) | 438 | (define-key global-map [M-next] 'scroll-other-window) |
| 436 | (define-key global-map [begin] 'beginning-of-buffer) | 439 | (define-key global-map [begin] 'beginning-of-buffer) |
| 437 | (define-key global-map [end] 'end-of-buffer) | 440 | (define-key global-map [end] 'end-of-buffer) |
| @@ -478,9 +481,9 @@ This returns ARGS with the arguments that have been processed removed." | |||
| 478 | ;;; Also, set the value of X cut buffer 0, for backward compatibility | 481 | ;;; Also, set the value of X cut buffer 0, for backward compatibility |
| 479 | ;;; with older X applications. | 482 | ;;; with older X applications. |
| 480 | (defun x-select-text (text) | 483 | (defun x-select-text (text) |
| 481 | (x-set-cut-buffer 0 text) | 484 | (x-set-cut-buffer text) |
| 482 | (x-set-selection 'clipboard text) | 485 | (x-set-selection 'CLIPBOARD text) |
| 483 | (x-set-selection 'primary text) | 486 | (x-set-selection 'PRIMARY text) |
| 484 | (setq x-last-selected-text text)) | 487 | (setq x-last-selected-text text)) |
| 485 | 488 | ||
| 486 | ;;; Return the value of the current X selection. For compatibility | 489 | ;;; Return the value of the current X selection. For compatibility |
| @@ -493,7 +496,7 @@ This returns ARGS with the arguments that have been processed removed." | |||
| 493 | ;; as if they were unset. | 496 | ;; as if they were unset. |
| 494 | (setq text (x-get-cut-buffer 0)) | 497 | (setq text (x-get-cut-buffer 0)) |
| 495 | (if (string= text "") (setq text nil)) | 498 | (if (string= text "") (setq text nil)) |
| 496 | (or text (setq text (x-selection 'primary))) | 499 | (or text (setq text (x-get-selection 'PRIMARY))) |
| 497 | (if (string= text "") (setq text nil)) | 500 | (if (string= text "") (setq text nil)) |
| 498 | 501 | ||
| 499 | (cond | 502 | (cond |
| @@ -518,7 +521,9 @@ This returns ARGS with the arguments that have been processed removed." | |||
| 518 | 521 | ||
| 519 | (defun x-win-suspend-error () | 522 | (defun x-win-suspend-error () |
| 520 | (error "Suspending an emacs running under X makes no sense")) | 523 | (error "Suspending an emacs running under X makes no sense")) |
| 521 | (add-hook 'suspend-hooks 'x-win-suspend-error) | 524 | (add-hook 'suspend-hook 'x-win-suspend-error) |
| 525 | |||
| 526 | (require 'select) | ||
| 522 | 527 | ||
| 523 | ;;; Arrange for the kill and yank functions to set and check the clipboard. | 528 | ;;; Arrange for the kill and yank functions to set and check the clipboard. |
| 524 | (setq interprogram-cut-function 'x-select-text) | 529 | (setq interprogram-cut-function 'x-select-text) |