diff options
| author | Stefan Kangas | 2019-09-14 15:23:57 +0200 |
|---|---|---|
| committer | Stefan Kangas | 2019-10-01 20:25:11 +0200 |
| commit | b6a8014fbee33336e17d88b37b5ad46d9358cc2f (patch) | |
| tree | 1328b9c9d1fa84758f710e08243cd9d67dbce7dc /lisp | |
| parent | b03b3549207fab66464e3223367f45dbe7ecf0ac (diff) | |
| download | emacs-b6a8014fbee33336e17d88b37b5ad46d9358cc2f.tar.gz emacs-b6a8014fbee33336e17d88b37b5ad46d9358cc2f.zip | |
Remove XEmacs compat code from winner.el (Bug#37524)
* 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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/winner.el | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/lisp/winner.el b/lisp/winner.el index ec3b296489c..dc8bde5331f 100644 --- a/lisp/winner.el +++ b/lisp/winner.el | |||
| @@ -36,19 +36,9 @@ | |||
| 36 | 36 | ||
| 37 | (defun winner-active-region () | 37 | (defun winner-active-region () |
| 38 | (declare (gv-setter (lambda (store) | 38 | (declare (gv-setter (lambda (store) |
| 39 | (if (featurep 'xemacs) | 39 | `(if ,store (activate-mark) (deactivate-mark))))) |
| 40 | `(if ,store (zmacs-activate-region) | ||
| 41 | (zmacs-deactivate-region)) | ||
| 42 | `(if ,store (activate-mark) (deactivate-mark)))))) | ||
| 43 | (region-active-p)) | 40 | (region-active-p)) |
| 44 | 41 | ||
| 45 | (defalias 'winner-edges | ||
| 46 | (if (featurep 'xemacs) 'window-pixel-edges 'window-edges)) | ||
| 47 | (defalias 'winner-window-list | ||
| 48 | (if (featurep 'xemacs) | ||
| 49 | (lambda () (delq (minibuffer-window) (window-list nil 0))) | ||
| 50 | (lambda () (window-list nil 0)))) | ||
| 51 | |||
| 52 | (require 'ring) | 42 | (require 'ring) |
| 53 | 43 | ||
| 54 | (defgroup winner nil | 44 | (defgroup winner nil |
| @@ -82,17 +72,17 @@ You may want to include buffer names such as *Help*, *Apropos*, | |||
| 82 | 72 | ||
| 83 | ;; List the windows according to their edges. | 73 | ;; List the windows according to their edges. |
| 84 | (defun winner-sorted-window-list () | 74 | (defun winner-sorted-window-list () |
| 85 | (sort (winner-window-list) | 75 | (sort (window-list nil 0) |
| 86 | (lambda (x y) | 76 | (lambda (x y) |
| 87 | (cl-loop for a in (winner-edges x) | 77 | (cl-loop for a in (window-edges x) |
| 88 | for b in (winner-edges y) | 78 | for b in (window-edges y) |
| 89 | while (= a b) | 79 | while (= a b) |
| 90 | finally return (< a b))))) | 80 | finally return (< a b))))) |
| 91 | 81 | ||
| 92 | (defun winner-win-data () | 82 | (defun winner-win-data () |
| 93 | ;; Essential properties of the windows in the selected frame. | 83 | ;; Essential properties of the windows in the selected frame. |
| 94 | (cl-loop for win in (winner-sorted-window-list) | 84 | (cl-loop for win in (winner-sorted-window-list) |
| 95 | collect (cons (winner-edges win) (window-buffer win)))) | 85 | collect (cons (window-edges win) (window-buffer win)))) |
| 96 | 86 | ||
| 97 | ;; This variable is updated with the current window configuration | 87 | ;; This variable is updated with the current window configuration |
| 98 | ;; every time it changes. | 88 | ;; every time it changes. |
| @@ -242,7 +232,7 @@ You may want to include buffer names such as *Help*, *Apropos*, | |||
| 242 | (defun winner-make-point-alist () | 232 | (defun winner-make-point-alist () |
| 243 | (save-current-buffer | 233 | (save-current-buffer |
| 244 | (cl-loop with alist | 234 | (cl-loop with alist |
| 245 | for win in (winner-window-list) | 235 | for win in (window-list nil 0) |
| 246 | for entry = | 236 | for entry = |
| 247 | (or (assq (window-buffer win) alist) | 237 | (or (assq (window-buffer win) alist) |
| 248 | (car (push (list (set-buffer (window-buffer win)) | 238 | (car (push (list (set-buffer (window-buffer win)) |