Mercurial > emacs
comparison lisp/select.el @ 3035:5c758290ba6c
(x-set-cut-buffer): New arg PUSH.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 24 May 1993 21:19:26 +0000 |
parents | 48dd9b2361df |
children | c81cfdffcf49 |
comparison
equal
deleted
inserted
replaced
3034:dd65780e6246 | 3035:5c758290ba6c |
---|---|
100 (aref [CUT_BUFFER0 CUT_BUFFER1 CUT_BUFFER2 CUT_BUFFER3 | 100 (aref [CUT_BUFFER0 CUT_BUFFER1 CUT_BUFFER2 CUT_BUFFER3 |
101 CUT_BUFFER4 CUT_BUFFER5 CUT_BUFFER6 CUT_BUFFER7] | 101 CUT_BUFFER4 CUT_BUFFER5 CUT_BUFFER6 CUT_BUFFER7] |
102 which-one) | 102 which-one) |
103 'CUT_BUFFER0))) | 103 'CUT_BUFFER0))) |
104 | 104 |
105 (defun x-set-cut-buffer (string) | 105 (defun x-set-cut-buffer (string &optional push) |
106 "Store STRING into the X server's primary cut buffer. | 106 "Store STRING into the X server's primary cut buffer. |
107 The previous value of the primary cut buffer is rotated to the secondary | 107 If PUSH is non-nil, also rotate the cut buffers: |
108 this means the previous value of the primary cut buffer moves the second | |
108 cut buffer, and the second to the third, and so on (there are 8 buffers.) | 109 cut buffer, and the second to the third, and so on (there are 8 buffers.) |
109 Cut buffers are considered obsolete; you should use selections instead." | 110 Cut buffers are considered obsolete; you should use selections instead." |
110 ;; Check the data type of STRING. | 111 ;; Check the data type of STRING. |
111 (substring string 0 0) | 112 (substring string 0 0) |
112 (x-rotate-cut-buffers-internal 1) | 113 (if push |
114 (x-rotate-cut-buffers-internal 1)) | |
113 (x-store-cut-buffer-internal 'CUT_BUFFER0 string)) | 115 (x-store-cut-buffer-internal 'CUT_BUFFER0 string)) |
114 | 116 |
115 | 117 |
116 ;;; Functions to convert the selection into various other selection types. | 118 ;;; Functions to convert the selection into various other selection types. |
117 ;;; Every selection type that Emacs handles is implemented this way, except | 119 ;;; Every selection type that Emacs handles is implemented this way, except |