diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/simple.el | 6 |
2 files changed, 10 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 70894c5fc7b..8a608ea7b10 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2012-07-08 Chong Yidong <cyd@gnu.org> | ||
| 2 | |||
| 3 | * simple.el (deactivate-mark): Do not set the primary selection | ||
| 4 | if another program has acquired it (Bug#11772). | ||
| 5 | |||
| 1 | 2012-07-07 Kevin Ryde <user42@zip.com.au> | 6 | 2012-07-07 Kevin Ryde <user42@zip.com.au> |
| 2 | 7 | ||
| 3 | * woman.el (woman-strings): Fix double-quote handling (Bug#1151). | 8 | * woman.el (woman-strings): Fix double-quote handling (Bug#1151). |
diff --git a/lisp/simple.el b/lisp/simple.el index 4527a9da0dc..e6b4a79b9b2 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3863,7 +3863,11 @@ run `deactivate-mark-hook'." | |||
| 3863 | (cond (saved-region-selection | 3863 | (cond (saved-region-selection |
| 3864 | (x-set-selection 'PRIMARY saved-region-selection) | 3864 | (x-set-selection 'PRIMARY saved-region-selection) |
| 3865 | (setq saved-region-selection nil)) | 3865 | (setq saved-region-selection nil)) |
| 3866 | ((/= (region-beginning) (region-end)) | 3866 | ;; If another program has acquired the selection, region |
| 3867 | ;; deactivation should not clobber it (Bug#11772). | ||
| 3868 | ((and (/= (region-beginning) (region-end)) | ||
| 3869 | (or (x-selection-owner-p 'PRIMARY) | ||
| 3870 | (null (x-selection-exists-p 'PRIMARY)))) | ||
| 3867 | (x-set-selection 'PRIMARY | 3871 | (x-set-selection 'PRIMARY |
| 3868 | (buffer-substring-no-properties | 3872 | (buffer-substring-no-properties |
| 3869 | (region-beginning) | 3873 | (region-beginning) |