From 9425a6fe82014388aa5619005c193ec60267af01 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Sat, 14 Sep 2019 15:23:57 +0200 Subject: [PATCH 2/4] Remove XEmacs compat code from winner.el * lisp/winner.el (winner-active-region, winner-edges) (winner-window-list, winner-sorted-window-list, winner-win-data) (winner-make-point-alist): Remove XEmacs compat code. --- lisp/winner.el | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/lisp/winner.el b/lisp/winner.el index ec3b296489..dc8bde5331 100644 --- a/lisp/winner.el +++ b/lisp/winner.el @@ -36,19 +36,9 @@ (defun winner-active-region () (declare (gv-setter (lambda (store) - (if (featurep 'xemacs) - `(if ,store (zmacs-activate-region) - (zmacs-deactivate-region)) - `(if ,store (activate-mark) (deactivate-mark)))))) + `(if ,store (activate-mark) (deactivate-mark))))) (region-active-p)) -(defalias 'winner-edges - (if (featurep 'xemacs) 'window-pixel-edges 'window-edges)) -(defalias 'winner-window-list - (if (featurep 'xemacs) - (lambda () (delq (minibuffer-window) (window-list nil 0))) - (lambda () (window-list nil 0)))) - (require 'ring) (defgroup winner nil @@ -82,17 +72,17 @@ winner-boring-buffers-regexp ;; List the windows according to their edges. (defun winner-sorted-window-list () - (sort (winner-window-list) + (sort (window-list nil 0) (lambda (x y) - (cl-loop for a in (winner-edges x) - for b in (winner-edges y) + (cl-loop for a in (window-edges x) + for b in (window-edges y) while (= a b) finally return (< a b))))) (defun winner-win-data () ;; Essential properties of the windows in the selected frame. (cl-loop for win in (winner-sorted-window-list) - collect (cons (winner-edges win) (window-buffer win)))) + collect (cons (window-edges win) (window-buffer win)))) ;; This variable is updated with the current window configuration ;; every time it changes. @@ -242,7 +232,7 @@ winner-point-alist (defun winner-make-point-alist () (save-current-buffer (cl-loop with alist - for win in (winner-window-list) + for win in (window-list nil 0) for entry = (or (assq (window-buffer win) alist) (car (push (list (set-buffer (window-buffer win)) -- 2.20.1