comparison lisp/term/x-win.el @ 104066:b564cde0cb8b

Fix Bug#3888: w32-vars.el (x-select-enable-clipboard): Doc fix. term/pc-win.el (x-display-name, x-colors) (x-select-enable-clipboard, x-select-text): Doc fix. term/common-win.el (x-display-name, x-colors): Doc fix. term/ns-win.el (x-select-text, x-setup-function-keys, x-colors) (xw-defined-colors): Doc fix. w32-fns.el (x-select-text, x-setup-function-keys) (x-get-selection, x-set-selection): Doc fix. term/x-win.el (x-select-text, x-setup-function-keys) (x-select-enable-clipboard, xw-defined-colors): Doc fix. select.el (x-set-selection): Doc fix.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 25 Jul 2009 09:31:05 +0000
parents 0ad88f8fc5a6
children 3727134fef6c
comparison
equal deleted inserted replaced
104065:498e3e120e1f 104066:b564cde0cb8b
253 253
254 254
255 (defvar x-colors) 255 (defvar x-colors)
256 256
257 (defun xw-defined-colors (&optional frame) 257 (defun xw-defined-colors (&optional frame)
258 "Internal function called by `defined-colors', which see." 258 "Internal function called by `defined-colors'."
259 (or frame (setq frame (selected-frame))) 259 (or frame (setq frame (selected-frame)))
260 (let ((all-colors x-colors) 260 (let ((all-colors x-colors)
261 (this-color nil) 261 (this-color nil)
262 (defined-colors nil)) 262 (defined-colors nil))
263 (while all-colors 263 (while all-colors
290 (define-key map [S-iso-lefttab] [backtab]) 290 (define-key map [S-iso-lefttab] [backtab])
291 map) 291 map)
292 "Keymap of possible alternative meanings for some keys.") 292 "Keymap of possible alternative meanings for some keys.")
293 293
294 (defun x-setup-function-keys (frame) 294 (defun x-setup-function-keys (frame)
295 "Set up `function-key-map' on FRAME for the X window system." 295 "Set up `function-key-map' on the graphical frame FRAME."
296 ;; Don't do this twice on the same display, or it would break 296 ;; Don't do this twice on the same display, or it would break
297 ;; normal-erase-is-backspace-mode. 297 ;; normal-erase-is-backspace-mode.
298 (unless (terminal-parameter frame 'x-setup-function-keys) 298 (unless (terminal-parameter frame 'x-setup-function-keys)
299 ;; Map certain keypad keys into ASCII characters that people usually expect. 299 ;; Map certain keypad keys into ASCII characters that people usually expect.
300 (with-selected-frame frame 300 (with-selected-frame frame
1237 "Max number of characters to put in the cut buffer. 1237 "Max number of characters to put in the cut buffer.
1238 It is said that overlarge strings are slow to put into the cut buffer.") 1238 It is said that overlarge strings are slow to put into the cut buffer.")
1239 1239
1240 (defcustom x-select-enable-clipboard nil 1240 (defcustom x-select-enable-clipboard nil
1241 "Non-nil means cutting and pasting uses the clipboard. 1241 "Non-nil means cutting and pasting uses the clipboard.
1242 This is in addition to, but in preference to, the primary selection." 1242 This is in addition to, but in preference to, the primary selection.
1243
1244 On MS-Windows, this is non-nil by default, since Windows does not
1245 support other types of selections. \(The primary selection that is
1246 set by Emacs is not accessible to other programs on Windows.\)"
1243 :type 'boolean 1247 :type 'boolean
1244 :group 'killing) 1248 :group 'killing)
1245 1249
1246 (defcustom x-select-enable-primary t 1250 (defcustom x-select-enable-primary t
1247 "Non-nil means cutting and pasting uses the primary selection." 1251 "Non-nil means cutting and pasting uses the primary selection."
1248 :type 'boolean 1252 :type 'boolean
1249 :group 'killing) 1253 :group 'killing)
1250 1254
1251 (defun x-select-text (text &optional push) 1255 (defun x-select-text (text &optional push)
1252 "Make TEXT, a string, the primary X selection. 1256 "Select TEXT, a string, according to the window system.
1253 Also, set the value of X cut buffer 0, for backward compatibility 1257
1254 with older X applications. 1258 On X, put TEXT in the primary X selection. For backward
1255 gildea@stop.mail-abuse.org says it's not desirable to put kills 1259 compatibility with older X applications, set the value of X cut
1256 in the clipboard." 1260 buffer 0 as well, and if the optional argument PUSH is non-nil,
1261 rotate the cut buffers. If `x-select-enable-clipboard' is
1262 non-nil, copy the text to the X clipboard as well.
1263
1264 On Windows, make TEXT the current selection. If
1265 `x-select-enable-clipboard' is non-nil, copy the text to the
1266 clipboard as well. The argument PUSH is ignored.
1267
1268 On Nextstep, put TEXT in the pasteboard; PUSH is ignored."
1257 ;; With multi-tty, this function may be called from a tty frame. 1269 ;; With multi-tty, this function may be called from a tty frame.
1258 (when (eq (framep (selected-frame)) 'x) 1270 (when (eq (framep (selected-frame)) 'x)
1259 ;; Don't send the cut buffer too much text. 1271 ;; Don't send the cut buffer too much text.
1260 ;; It becomes slow, and if really big it causes errors. 1272 ;; It becomes slow, and if really big it causes errors.
1261 (cond ((>= (length text) x-cut-buffer-max) 1273 (cond ((>= (length text) x-cut-buffer-max)