diff options
| author | Stefan Monnier | 2005-11-02 21:43:21 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-11-02 21:43:21 +0000 |
| commit | 1c7c774b86e5a81ec24f1be68cb2be7e054ccdb5 (patch) | |
| tree | fad8efb3042e37ee8de9637cff5e1a521f17e904 | |
| parent | cfa1d4c6d14a66e7ba6d2779e79e18a8aebd310c (diff) | |
| download | emacs-1c7c774b86e5a81ec24f1be68cb2be7e054ccdb5.tar.gz emacs-1c7c774b86e5a81ec24f1be68cb2be7e054ccdb5.zip | |
Various comment syntax fixes.
| -rw-r--r-- | lisp/term/x-win.el | 55 |
1 files changed, 27 insertions, 28 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index f38baa6b720..2eff5661517 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -2116,12 +2116,12 @@ as returned by `x-server-vendor'." | |||
| 2116 | 2116 | ||
| 2117 | ;;;; Selections and cut buffers | 2117 | ;;;; Selections and cut buffers |
| 2118 | 2118 | ||
| 2119 | ;;; We keep track of the last text selected here, so we can check the | 2119 | ;; We keep track of the last text selected here, so we can check the |
| 2120 | ;;; current selection against it, and avoid passing back our own text | 2120 | ;; current selection against it, and avoid passing back our own text |
| 2121 | ;;; from x-cut-buffer-or-selection-value. We track all three | 2121 | ;; from x-cut-buffer-or-selection-value. We track all three |
| 2122 | ;;; seperately in case another X application only sets one of them | 2122 | ;; seperately in case another X application only sets one of them |
| 2123 | ;;; (say the cut buffer) we aren't fooled by the PRIMARY or | 2123 | ;; (say the cut buffer) we aren't fooled by the PRIMARY or |
| 2124 | ;;; CLIPBOARD selection staying the same. | 2124 | ;; CLIPBOARD selection staying the same. |
| 2125 | (defvar x-last-selected-text-clipboard nil | 2125 | (defvar x-last-selected-text-clipboard nil |
| 2126 | "The value of the CLIPBOARD X selection last time we selected or | 2126 | "The value of the CLIPBOARD X selection last time we selected or |
| 2127 | pasted text.") | 2127 | pasted text.") |
| @@ -2135,10 +2135,9 @@ The actual text stored in the X cut buffer is what encoded from this value.") | |||
| 2135 | "The value of the X cut buffer last time we selected or pasted text. | 2135 | "The value of the X cut buffer last time we selected or pasted text. |
| 2136 | This is the actual text stored in the X cut buffer.") | 2136 | This is the actual text stored in the X cut buffer.") |
| 2137 | 2137 | ||
| 2138 | ;;; It is said that overlarge strings are slow to put into the cut buffer. | 2138 | (defvar x-cut-buffer-max 20000 ; Note this value is overridden below. |
| 2139 | ;;; Note this value is overridden below. | 2139 | "Max number of characters to put in the cut buffer. |
| 2140 | (defvar x-cut-buffer-max 20000 | 2140 | It is said that overlarge strings are slow to put into the cut buffer.") |
| 2141 | "Max number of characters to put in the cut buffer.") | ||
| 2142 | 2141 | ||
| 2143 | (defcustom x-select-enable-clipboard nil | 2142 | (defcustom x-select-enable-clipboard nil |
| 2144 | "Non-nil means cutting and pasting uses the clipboard. | 2143 | "Non-nil means cutting and pasting uses the clipboard. |
| @@ -2146,12 +2145,12 @@ This is in addition to, but in preference to, the primary selection." | |||
| 2146 | :type 'boolean | 2145 | :type 'boolean |
| 2147 | :group 'killing) | 2146 | :group 'killing) |
| 2148 | 2147 | ||
| 2149 | ;;; Make TEXT, a string, the primary X selection. | ||
| 2150 | ;;; Also, set the value of X cut buffer 0, for backward compatibility | ||
| 2151 | ;;; with older X applications. | ||
| 2152 | ;;; gildea@stop.mail-abuse.org says it's not desirable to put kills | ||
| 2153 | ;;; in the clipboard. | ||
| 2154 | (defun x-select-text (text &optional push) | 2148 | (defun x-select-text (text &optional push) |
| 2149 | "Make TEXT, a string, the primary X selection. | ||
| 2150 | Also, set the value of X cut buffer 0, for backward compatibility | ||
| 2151 | with older X applications. | ||
| 2152 | gildea@stop.mail-abuse.org says it's not desirable to put kills | ||
| 2153 | in the clipboard." | ||
| 2155 | ;; Don't send the cut buffer too much text. | 2154 | ;; Don't send the cut buffer too much text. |
| 2156 | ;; It becomes slow, and if really big it causes errors. | 2155 | ;; It becomes slow, and if really big it causes errors. |
| 2157 | (cond ((>= (length text) x-cut-buffer-max) | 2156 | (cond ((>= (length text) x-cut-buffer-max) |
| @@ -2276,12 +2275,12 @@ order until succeed.") | |||
| 2276 | (remove-text-properties 0 (length text) '(foreign-selection nil) text)) | 2275 | (remove-text-properties 0 (length text) '(foreign-selection nil) text)) |
| 2277 | text)) | 2276 | text)) |
| 2278 | 2277 | ||
| 2279 | ;;; Return the value of the current X selection. | 2278 | ;; Return the value of the current X selection. |
| 2280 | ;;; Consult the selection, and the cut buffer. Treat empty strings | 2279 | ;; Consult the selection, and the cut buffer. Treat empty strings |
| 2281 | ;;; as if they were unset. | 2280 | ;; as if they were unset. |
| 2282 | ;;; If this function is called twice and finds the same text, | 2281 | ;; If this function is called twice and finds the same text, |
| 2283 | ;;; it returns nil the second time. This is so that a single | 2282 | ;; it returns nil the second time. This is so that a single |
| 2284 | ;;; selection won't be added to the kill ring over and over. | 2283 | ;; selection won't be added to the kill ring over and over. |
| 2285 | (defun x-cut-buffer-or-selection-value () | 2284 | (defun x-cut-buffer-or-selection-value () |
| 2286 | (let (clip-text primary-text cut-text) | 2285 | (let (clip-text primary-text cut-text) |
| 2287 | (when x-select-enable-clipboard | 2286 | (when x-select-enable-clipboard |
| @@ -2373,12 +2372,12 @@ order until succeed.") | |||
| 2373 | )) | 2372 | )) |
| 2374 | 2373 | ||
| 2375 | 2374 | ||
| 2376 | ;;; Do the actual X Windows setup here; the above code just defines | 2375 | ;; Do the actual X Windows setup here; the above code just defines |
| 2377 | ;;; functions and variables that we use now. | 2376 | ;; functions and variables that we use now. |
| 2378 | 2377 | ||
| 2379 | (setq command-line-args (x-handle-args command-line-args)) | 2378 | (setq command-line-args (x-handle-args command-line-args)) |
| 2380 | 2379 | ||
| 2381 | ;;; Make sure we have a valid resource name. | 2380 | ;; Make sure we have a valid resource name. |
| 2382 | (or (stringp x-resource-name) | 2381 | (or (stringp x-resource-name) |
| 2383 | (let (i) | 2382 | (let (i) |
| 2384 | (setq x-resource-name (invocation-name)) | 2383 | (setq x-resource-name (invocation-name)) |
| @@ -2474,12 +2473,12 @@ order until succeed.") | |||
| 2474 | (error "Suspending an Emacs running under X makes no sense")) | 2473 | (error "Suspending an Emacs running under X makes no sense")) |
| 2475 | (add-hook 'suspend-hook 'x-win-suspend-error) | 2474 | (add-hook 'suspend-hook 'x-win-suspend-error) |
| 2476 | 2475 | ||
| 2477 | ;;; Arrange for the kill and yank functions to set and check the clipboard. | 2476 | ;; Arrange for the kill and yank functions to set and check the clipboard. |
| 2478 | (setq interprogram-cut-function 'x-select-text) | 2477 | (setq interprogram-cut-function 'x-select-text) |
| 2479 | (setq interprogram-paste-function 'x-cut-buffer-or-selection-value) | 2478 | (setq interprogram-paste-function 'x-cut-buffer-or-selection-value) |
| 2480 | 2479 | ||
| 2481 | ;;; Turn off window-splitting optimization; X is usually fast enough | 2480 | ;; Turn off window-splitting optimization; X is usually fast enough |
| 2482 | ;;; that this is only annoying. | 2481 | ;; that this is only annoying. |
| 2483 | (setq split-window-keep-point t) | 2482 | (setq split-window-keep-point t) |
| 2484 | 2483 | ||
| 2485 | ;; Don't show the frame name; that's redundant with X. | 2484 | ;; Don't show the frame name; that's redundant with X. |
| @@ -2517,5 +2516,5 @@ order until succeed.") | |||
| 2517 | (add-hook 'after-make-frame-functions 'x-dnd-init-frame) | 2516 | (add-hook 'after-make-frame-functions 'x-dnd-init-frame) |
| 2518 | (global-set-key [drag-n-drop] 'x-dnd-handle-drag-n-drop-event) | 2517 | (global-set-key [drag-n-drop] 'x-dnd-handle-drag-n-drop-event) |
| 2519 | 2518 | ||
| 2520 | ;;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78 | 2519 | ;; arch-tag: f1501302-db8b-4d95-88e3-116697d89f78 |
| 2521 | ;;; x-win.el ends here | 2520 | ;;; x-win.el ends here |