diff options
| author | Eli Zaretskii | 2009-07-18 19:04:22 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2009-07-18 19:04:22 +0000 |
| commit | 102e1a41cdabd4266e76ebe260f46274295839d4 (patch) | |
| tree | a7ca0c9e6d8ed879f3a3a1871b95d18ff5ac5d26 /lisp | |
| parent | 16f2e9fca0eb8d7127b243d66acc36235432cd21 (diff) | |
| download | emacs-102e1a41cdabd4266e76ebe260f46274295839d4.tar.gz emacs-102e1a41cdabd4266e76ebe260f46274295839d4.zip | |
(deactivate-mark, activate-mark, set-mark): Don't call x-set-selection
if display-selections-p returns nil for the current frame.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/simple.el | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 390475000a1..0db46676935 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2009-07-18 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * simple.el (deactivate-mark, activate-mark, set-mark): Don't call | ||
| 4 | x-set-selection if display-selections-p returns nil for the | ||
| 5 | current frame. | ||
| 6 | |||
| 1 | 2009-07-18 Chong Yidong <cyd@stupidchicken.com> | 7 | 2009-07-18 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 8 | ||
| 3 | * simple.el (region-active-p, use-region-p): Doc fix (Bug#3873). | 9 | * simple.el (region-active-p, use-region-p): Doc fix (Bug#3873). |
diff --git a/lisp/simple.el b/lisp/simple.el index 6ea572b68e5..cfbbad500fc 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -3489,6 +3489,7 @@ This function also runs `deactivate-mark-hook'." | |||
| 3489 | ;; Copy the latest region into the primary selection, if desired. | 3489 | ;; Copy the latest region into the primary selection, if desired. |
| 3490 | (and select-active-regions | 3490 | (and select-active-regions |
| 3491 | mark-active | 3491 | mark-active |
| 3492 | (display-selections-p) | ||
| 3492 | (x-selection-owner-p 'PRIMARY) | 3493 | (x-selection-owner-p 'PRIMARY) |
| 3493 | (x-set-selection 'PRIMARY (buffer-substring-no-properties | 3494 | (x-set-selection 'PRIMARY (buffer-substring-no-properties |
| 3494 | (region-beginning) (region-end)))) | 3495 | (region-beginning) (region-end)))) |
| @@ -3510,7 +3511,8 @@ This function also runs `deactivate-mark-hook'." | |||
| 3510 | (setq mark-active t) | 3511 | (setq mark-active t) |
| 3511 | (unless transient-mark-mode | 3512 | (unless transient-mark-mode |
| 3512 | (setq transient-mark-mode 'lambda)) | 3513 | (setq transient-mark-mode 'lambda)) |
| 3513 | (when select-active-regions | 3514 | (when (and select-active-regions |
| 3515 | (display-selections-p)) | ||
| 3514 | (x-set-selection 'PRIMARY (current-buffer))))) | 3516 | (x-set-selection 'PRIMARY (current-buffer))))) |
| 3515 | 3517 | ||
| 3516 | (defun set-mark (pos) | 3518 | (defun set-mark (pos) |
| @@ -3534,7 +3536,8 @@ store it in a Lisp variable. Example: | |||
| 3534 | (progn | 3536 | (progn |
| 3535 | (setq mark-active t) | 3537 | (setq mark-active t) |
| 3536 | (run-hooks 'activate-mark-hook) | 3538 | (run-hooks 'activate-mark-hook) |
| 3537 | (when select-active-regions | 3539 | (when (and select-active-regions |
| 3540 | (display-selections-p)) | ||
| 3538 | (x-set-selection 'PRIMARY (current-buffer))) | 3541 | (x-set-selection 'PRIMARY (current-buffer))) |
| 3539 | (set-marker (mark-marker) pos (current-buffer))) | 3542 | (set-marker (mark-marker) pos (current-buffer))) |
| 3540 | ;; Normally we never clear mark-active except in Transient Mark mode. | 3543 | ;; Normally we never clear mark-active except in Transient Mark mode. |