Mercurial > emacs
changeset 103961:b7581638b542
(deactivate-mark, activate-mark, set-mark): Don't call x-set-selection
if display-selections-p returns nil for the current frame.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 18 Jul 2009 19:03:53 +0000 |
parents | 8f1c96160773 |
children | 6de347bcd326 |
files | lisp/simple.el |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/simple.el Sat Jul 18 17:39:35 2009 +0000 +++ b/lisp/simple.el Sat Jul 18 19:03:53 2009 +0000 @@ -3489,6 +3489,7 @@ ;; Copy the latest region into the primary selection, if desired. (and select-active-regions mark-active + (display-selections-p) (x-selection-owner-p 'PRIMARY) (x-set-selection 'PRIMARY (buffer-substring-no-properties (region-beginning) (region-end)))) @@ -3510,7 +3511,8 @@ (setq mark-active t) (unless transient-mark-mode (setq transient-mark-mode 'lambda)) - (when select-active-regions + (when (and select-active-regions + (display-selections-p)) (x-set-selection 'PRIMARY (current-buffer))))) (defun set-mark (pos) @@ -3534,7 +3536,8 @@ (progn (setq mark-active t) (run-hooks 'activate-mark-hook) - (when select-active-regions + (when (and select-active-regions + (display-selections-p)) (x-set-selection 'PRIMARY (current-buffer))) (set-marker (mark-marker) pos (current-buffer))) ;; Normally we never clear mark-active except in Transient Mark mode.