emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-24 c3c4b75: Fixes: debbugs:18939


From: Jan D.
Subject: [Emacs-diffs] emacs-24 c3c4b75: Fixes: debbugs:18939
Date: Sun, 22 Mar 2015 18:31:59 +0000

branch: emacs-24
commit c3c4b758c6d3e33d7fa7621ba4a50ec75c121247
Author: Jan D <address@hidden>
Commit: Jan D <address@hidden>

    Fixes: debbugs:18939
    
    * simple.el (deactivate-mark): Only modify PRIMARY if we own PRIMARY.
---
 lisp/ChangeLog |    5 +++++
 lisp/simple.el |    3 ++-
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8f888e3..7c7c66d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-03-22  Jan Djärv  <address@hidden>
+
+       * simple.el (deactivate-mark): Only modify PRIMARY if we own
+       PRIMARY (Bug#18939).
+
 2015-03-22  Martin Rudalics  <address@hidden>
 
        * emacs-lisp/debug.el (debug): Don't try using "previous" window
diff --git a/lisp/simple.el b/lisp/simple.el
index ae07f62..5e5cd87 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4420,7 +4420,8 @@ run `deactivate-mark-hook'."
       ;; the region prior to the last command modifying the buffer.
       ;; Set the selection to that, or to the current region.
       (cond (saved-region-selection
-            (x-set-selection 'PRIMARY saved-region-selection)
+            (if (x-selection-owner-p 'PRIMARY)
+                (x-set-selection 'PRIMARY saved-region-selection))
             (setq saved-region-selection nil))
            ;; If another program has acquired the selection, region
            ;; deactivation should not clobber it (Bug#11772).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]