]> git.eshelyaron.com Git - emacs.git/commitdiff
Dont update primary selection with winner-undo
authorTino Calancha <tino.calancha@gmail.com>
Tue, 17 Oct 2017 07:20:08 +0000 (16:20 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Tue, 17 Oct 2017 07:20:08 +0000 (16:20 +0900)
* lisp/winner.el (winner-set):
Dont update primary selection when select-enable-primary
is non-nil (Bug#28631).

Co-authored-by: Noam Postavsky <npostavs@gmail.com>
lisp/winner.el

index 61ea4d40e7bec8c3fc5112f0dda2cfbfb13449eb..6bc27484a79e2631edf900ab1363e66288b48d25 100644 (file)
@@ -304,12 +304,15 @@ You may want to include buffer names such as *Help*, *Apropos*,
           (push win xwins)))            ; delete this window
 
       ;; Restore marks
-      (save-current-buffer
-       (cl-loop for buf in buffers
-                 for entry = (cadr (assq buf winner-point-alist))
-                 do (progn (set-buffer buf)
-                           (set-mark (car entry))
-                           (setf (winner-active-region) (cdr entry)))))
+      ;; `winner-undo' shouldn't update the selection (Bug#28631) when
+      ;; select-enable-primary is non-nil.
+      (unless select-enable-primary
+        (save-current-buffer
+         (cl-loop for buf in buffers
+                   for entry = (cadr (assq buf winner-point-alist))
+                   do (progn (set-buffer buf)
+                             (set-mark (car entry))
+                             (setf (winner-active-region) (cdr entry))))))
       ;; Delete windows, whose buffers are dead or boring.
       ;; Return t if this is still a possible configuration.
       (or (null xwins)