aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTino Calancha2017-10-17 16:20:08 +0900
committerTino Calancha2017-10-17 16:20:08 +0900
commit2c3e6f1ddc90335249f1a7f56f5f7b377c873fb7 (patch)
tree0363d2b8c5a6fbfd1886deee094325702adb3d92
parentb38724ab675ac02dec865930a35abd8e06ee8e76 (diff)
downloademacs-2c3e6f1ddc90335249f1a7f56f5f7b377c873fb7.tar.gz
emacs-2c3e6f1ddc90335249f1a7f56f5f7b377c873fb7.zip
Dont update primary selection with winner-undo
* 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>
-rw-r--r--lisp/winner.el15
1 files changed, 9 insertions, 6 deletions
diff --git a/lisp/winner.el b/lisp/winner.el
index 61ea4d40e7b..6bc27484a79 100644
--- a/lisp/winner.el
+++ b/lisp/winner.el
@@ -304,12 +304,15 @@ You may want to include buffer names such as *Help*, *Apropos*,
304 (push win xwins))) ; delete this window 304 (push win xwins))) ; delete this window
305 305
306 ;; Restore marks 306 ;; Restore marks
307 (save-current-buffer 307 ;; `winner-undo' shouldn't update the selection (Bug#28631) when
308 (cl-loop for buf in buffers 308 ;; select-enable-primary is non-nil.
309 for entry = (cadr (assq buf winner-point-alist)) 309 (unless select-enable-primary
310 do (progn (set-buffer buf) 310 (save-current-buffer
311 (set-mark (car entry)) 311 (cl-loop for buf in buffers
312 (setf (winner-active-region) (cdr entry))))) 312 for entry = (cadr (assq buf winner-point-alist))
313 do (progn (set-buffer buf)
314 (set-mark (car entry))
315 (setf (winner-active-region) (cdr entry))))))
313 ;; Delete windows, whose buffers are dead or boring. 316 ;; Delete windows, whose buffers are dead or boring.
314 ;; Return t if this is still a possible configuration. 317 ;; Return t if this is still a possible configuration.
315 (or (null xwins) 318 (or (null xwins)