From: Eli Zaretskii Date: Sat, 18 Jul 2009 19:04:22 +0000 (+0000) Subject: (deactivate-mark, activate-mark, set-mark): Don't call x-set-selection X-Git-Tag: emacs-pretest-23.1.90~2121 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=102e1a41cdabd4266e76ebe260f46274295839d4;p=emacs.git (deactivate-mark, activate-mark, set-mark): Don't call x-set-selection if display-selections-p returns nil for the current frame. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 390475000a1..0db46676935 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2009-07-18 Eli Zaretskii + + * simple.el (deactivate-mark, activate-mark, set-mark): Don't call + x-set-selection if display-selections-p returns nil for the + current frame. + 2009-07-18 Chong Yidong * 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'." ;; 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 @@ This function also runs `deactivate-mark-hook'." (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 @@ store it in a Lisp variable. Example: (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.