+2009-07-18 Eli Zaretskii <eliz@gnu.org>
+
+ * 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 <cyd@stupidchicken.com>
* simple.el (region-active-p, use-region-p): Doc fix (Bug#3873).
;; 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))))
(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)
(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.