# HG changeset patch # User Eli Zaretskii # Date 1247943833 0 # Node ID b7581638b54264793b77cad11ffbfc532f2659f3 # Parent 8f1c96160773fd49b44ab18a9c3366a516006410 (deactivate-mark, activate-mark, set-mark): Don't call x-set-selection if display-selections-p returns nil for the current frame. diff -r 8f1c96160773 -r b7581638b542 lisp/simple.el --- 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.