(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)