comparison lisp/term/x-win.el @ 50114:627c4cc6b42b

(x-select-text): Don't set a text containing eight-bit-control/graphic into the cut buffer.
author Kenichi Handa <handa@m17n.org>
date Thu, 13 Mar 2003 06:23:59 +0000
parents cfb7d0684cf8
children ca35e855ba24
comparison
equal deleted inserted replaced
50113:8accd9a2cbed 50114:627c4cc6b42b
2124 ;; Don't send the cut buffer too much text. 2124 ;; Don't send the cut buffer too much text.
2125 ;; It becomes slow, and if really big it causes errors. 2125 ;; It becomes slow, and if really big it causes errors.
2126 (cond ((>= (length text) x-cut-buffer-max) 2126 (cond ((>= (length text) x-cut-buffer-max)
2127 (x-set-cut-buffer "" push) 2127 (x-set-cut-buffer "" push)
2128 (setq x-last-selected-text-cut "")) 2128 (setq x-last-selected-text-cut ""))
2129 ((and (multibyte-string-p text)
2130 (let ((charsets (find-charset-string text)))
2131 (or (memq 'eight-bit-control charsets)
2132 (memq 'eight-bit-graphic charsets))))
2133 (x-set-cut-buffer "" push)
2134 (setq x-last-selected-text-cut ""))
2129 (t 2135 (t
2130 (x-set-cut-buffer text push) 2136 (x-set-cut-buffer text push)
2131 (setq x-last-selected-text-cut text))) 2137 (setq x-last-selected-text-cut text)))
2132 (x-set-selection 'PRIMARY text) 2138 (x-set-selection 'PRIMARY text)
2133 (setq x-last-selected-text-primary text) 2139 (setq x-last-selected-text-primary text)
2134 (when x-select-enable-clipboard 2140 (when x-select-enable-clipboard
2135 (x-set-selection 'CLIPBOARD text) 2141 (x-set-selection 'CLIPBOARD text)
2136 (setq x-last-selected-text-clipboard text)) 2142 (setq x-last-selected-text-clipboard text))
2137 ) 2143 )
2138 2144
2139 ;;; Return the value of the current X selection. 2145 ;;; Return the value of the current X selection.
2140 ;;; Consult the selection, and the cut buffer. Treat empty strings 2146 ;;; Consult the selection, and the cut buffer. Treat empty strings
2141 ;;; as if they were unset. 2147 ;;; as if they were unset.