Mercurial > emacs
comparison lisp/term/x-win.el @ 1259:be61776a20c4
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Tue, 29 Sep 1992 12:31:16 +0000 |
parents | 49e9dffbb2dc |
children | cfda1fa93624 |
comparison
equal
deleted
inserted
replaced
1258:353663d81b11 | 1259:be61776a20c4 |
---|---|
471 ;;; If you are running xclipboard, this means you can effectively | 471 ;;; If you are running xclipboard, this means you can effectively |
472 ;;; have a window on a copy of the kill-ring. | 472 ;;; have a window on a copy of the kill-ring. |
473 ;;; Also, set the value of X cut buffer 0, for backward compatibility | 473 ;;; Also, set the value of X cut buffer 0, for backward compatibility |
474 ;;; with older X application. | 474 ;;; with older X application. |
475 (defun x-select-text (text) | 475 (defun x-select-text (text) |
476 (x-own-selection text 'cut-buffer0) | |
477 (x-own-selection text 'clipboard) | 476 (x-own-selection text 'clipboard) |
478 (x-own-selection text) | 477 (x-own-selection text) |
479 (setq x-last-selected-text text)) | 478 (setq x-last-selected-text text)) |
480 | 479 |
481 ;;; Return the value of the current X selection. For compatibility | 480 ;;; Return the value of the current X selection. For compatibility |
482 ;;; with older X applications, this checks cut buffer 0 before | 481 ;;; with older X applications, this checks cut buffer 0 before |
483 ;;; retrieving the value of the primary selection. | 482 ;;; retrieving the value of the primary selection. |
484 (defun x-cut-buffer-or-selection-value () | 483 (defun x-cut-buffer-or-selection-value () |
485 (let ((text (or (x-selection-value 'cut-buffer0) | 484 (let ((text (or (x-selection-value)))) |
486 (x-selection-value)))) | 485 (if (or (string= text x-last-selected-text) |
487 (if (string= text x-last-selected-text) | 486 (string= "")) |
488 nil | 487 nil |
489 (setq x-last-selected-text nil) | 488 (setq x-last-selected-text nil) |
490 text))) | 489 text))) |
491 | 490 |
492 ;;; Arrange for the kill and yank functions to set and check the clipboard. | 491 ;;; Arrange for the kill and yank functions to set and check the clipboard. |