diff options
| author | Chong Yidong | 2012-02-25 11:01:11 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-02-25 11:01:11 +0800 |
| commit | 3c9dfce6da30c2b4483b0e95d33af3dd0bd9b26f (patch) | |
| tree | f8db60a58e03ea6a58869935e5c55b12f4848abf | |
| parent | 833e48d3d84885cc62f6c3daf9ad26f53a7f5cf1 (diff) | |
| download | emacs-3c9dfce6da30c2b4483b0e95d33af3dd0bd9b26f.tar.gz emacs-3c9dfce6da30c2b4483b0e95d33af3dd0bd9b26f.zip | |
Reduce x-selection-timeout to 5s, and add a message for clipboard manager saving.
* lisp/term/x-win.el (x-initialize-window-system): Reduce default for
x-selection-timeout to 5 seconds.
* src/xselect.c (Fx_selection_exists_p): Doc fix.
(x_clipboard_manager_save_all): Print an informative message
before saving to clipboard manager.
Fixes: debbugs:8869
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/dired.el | 2 | ||||
| -rw-r--r-- | lisp/term/x-win.el | 11 | ||||
| -rw-r--r-- | src/ChangeLog | 6 | ||||
| -rw-r--r-- | src/xselect.c | 16 |
5 files changed, 29 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1af7193b4f3..3dbed71d4b5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-02-25 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * term/x-win.el (x-initialize-window-system): Reduce default for | ||
| 4 | x-selection-timeout to 5 seconds (Bug#8869). | ||
| 5 | |||
| 1 | 2012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com> | 6 | 2012-02-24 Thierry Volpiatto <thierry.volpiatto@gmail.com> |
| 2 | 7 | ||
| 3 | * files.el (file-subdir-of-p): Fix typo. | 8 | * files.el (file-subdir-of-p): Fix typo. |
diff --git a/lisp/dired.el b/lisp/dired.el index c087f65eaeb..57bf3c88322 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -3732,7 +3732,7 @@ Ask means pop up a menu for the user to select one of copy, move or link." | |||
| 3732 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command | 3732 | ;;;;;; dired-run-shell-command dired-do-shell-command dired-do-async-shell-command |
| 3733 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown | 3733 | ;;;;;; dired-clean-directory dired-do-print dired-do-touch dired-do-chown |
| 3734 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff | 3734 | ;;;;;; dired-do-chgrp dired-do-chmod dired-compare-directories dired-backup-diff |
| 3735 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "e77c506a0dd793230c5856a67e408fc6") | 3735 | ;;;;;; dired-diff) "dired-aux" "dired-aux.el" "cab9b84177ac3555c24cf8e870a64095") |
| 3736 | ;;; Generated autoloads from dired-aux.el | 3736 | ;;; Generated autoloads from dired-aux.el |
| 3737 | 3737 | ||
| 3738 | (autoload 'dired-diff "dired-aux" "\ | 3738 | (autoload 'dired-diff "dired-aux" "\ |
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el index 394e4d4fe48..21d49267b21 100644 --- a/lisp/term/x-win.el +++ b/lisp/term/x-win.el | |||
| @@ -1408,11 +1408,12 @@ Request data types in the order specified by `x-select-request-type'." | |||
| 1408 | (cons '(reverse . t) default-frame-alist))))) | 1408 | (cons '(reverse . t) default-frame-alist))))) |
| 1409 | 1409 | ||
| 1410 | ;; Set x-selection-timeout, measured in milliseconds. | 1410 | ;; Set x-selection-timeout, measured in milliseconds. |
| 1411 | (let ((res-selection-timeout | 1411 | (let ((res-selection-timeout (x-get-resource "selectionTimeout" |
| 1412 | (x-get-resource "selectionTimeout" "SelectionTimeout"))) | 1412 | "SelectionTimeout"))) |
| 1413 | (setq x-selection-timeout 20000) | 1413 | (setq x-selection-timeout |
| 1414 | (if res-selection-timeout | 1414 | (if res-selection-timeout |
| 1415 | (setq x-selection-timeout (string-to-number res-selection-timeout)))) | 1415 | (string-to-number res-selection-timeout) |
| 1416 | 5000))) | ||
| 1416 | 1417 | ||
| 1417 | ;; Don't let Emacs suspend under X. | 1418 | ;; Don't let Emacs suspend under X. |
| 1418 | (add-hook 'suspend-hook 'x-win-suspend-error) | 1419 | (add-hook 'suspend-hook 'x-win-suspend-error) |
diff --git a/src/ChangeLog b/src/ChangeLog index d35c65266cc..7b546244792 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-02-25 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * xselect.c (Fx_selection_exists_p): Doc fix. | ||
| 4 | (x_clipboard_manager_save_all): Print an informative message | ||
| 5 | before saving to clipboard manager. | ||
| 6 | |||
| 1 | 2012-02-24 Chong Yidong <cyd@gnu.org> | 7 | 2012-02-24 Chong Yidong <cyd@gnu.org> |
| 2 | 8 | ||
| 3 | * keyboard.c (process_special_events): Handle all X selection | 9 | * keyboard.c (process_special_events): Handle all X selection |
diff --git a/src/xselect.c b/src/xselect.c index 49955f03fd0..173cf78bdaa 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -2142,9 +2142,9 @@ DEFUN ("x-selection-exists-p", Fx_selection_exists_p, Sx_selection_exists_p, | |||
| 2142 | 0, 2, 0, | 2142 | 0, 2, 0, |
| 2143 | doc: /* Whether there is an owner for the given X selection. | 2143 | doc: /* Whether there is an owner for the given X selection. |
| 2144 | SELECTION should be the name of the selection in question, typically | 2144 | SELECTION should be the name of the selection in question, typically |
| 2145 | one of the symbols `PRIMARY', `SECONDARY', or `CLIPBOARD'. (X expects | 2145 | one of the symbols `PRIMARY', `SECONDARY', `CLIPBOARD', or |
| 2146 | these literal upper-case names.) The symbol nil is the same as | 2146 | `CLIPBOARD_MANAGER' (X expects these literal upper-case names.) The |
| 2147 | `PRIMARY', and t is the same as `SECONDARY'. | 2147 | symbol nil is the same as `PRIMARY', and t is the same as `SECONDARY'. |
| 2148 | 2148 | ||
| 2149 | TERMINAL should be a terminal object or a frame specifying the X | 2149 | TERMINAL should be a terminal object or a frame specifying the X |
| 2150 | server to query. If omitted or nil, that stands for the selected | 2150 | server to query. If omitted or nil, that stands for the selected |
| @@ -2273,8 +2273,14 @@ x_clipboard_manager_save_all (void) | |||
| 2273 | 2273 | ||
| 2274 | local_frame = XCAR (XCDR (XCDR (XCDR (local_selection)))); | 2274 | local_frame = XCAR (XCDR (XCDR (XCDR (local_selection)))); |
| 2275 | if (FRAME_LIVE_P (XFRAME (local_frame))) | 2275 | if (FRAME_LIVE_P (XFRAME (local_frame))) |
| 2276 | internal_condition_case_1 (x_clipboard_manager_save, local_frame, | 2276 | { |
| 2277 | Qt, x_clipboard_manager_error_2); | 2277 | Lisp_Object args[1]; |
| 2278 | args[0] = build_string ("Saving clipboard to X clipboard manager..."); | ||
| 2279 | Fmessage (1, args); | ||
| 2280 | |||
| 2281 | internal_condition_case_1 (x_clipboard_manager_save, local_frame, | ||
| 2282 | Qt, x_clipboard_manager_error_2); | ||
| 2283 | } | ||
| 2278 | } | 2284 | } |
| 2279 | } | 2285 | } |
| 2280 | 2286 | ||