[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/buffer-expose d05d136 27/38: Handle window configuratio
From: |
Clemens Radermacher |
Subject: |
[elpa] externals/buffer-expose d05d136 27/38: Handle window configurations internally, don't use set-window-config |
Date: |
Mon, 25 Feb 2019 13:38:02 -0500 (EST) |
branch: externals/buffer-expose
commit d05d136057c68b108f061f8d2ea22643e19aac1c
Author: Clemens Radermacher <address@hidden>
Commit: Clemens Radermacher <address@hidden>
Handle window configurations internally, don't use set-window-config
Restoring window configs changed buffer order when scrolling back through
pages, so use own record/restore functions)
---
buffer-expose.el | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/buffer-expose.el b/buffer-expose.el
index 7f1594d..8abca11 100644
--- a/buffer-expose.el
+++ b/buffer-expose.el
@@ -647,14 +647,27 @@ MAX is the maximum of windows to display per page."
(buffer-expose--select-window (posn-window (event-start e)))
(buffer-expose-choose))
+(defun buffer-expose--window-config ()
+ (let* ((w (frame-first-window))
+ (ws (list (cons w (window-buffer w)))))
+ (while (setq w (buffer-expose--next-window w))
+ (push (cons w (window-buffer w))
+ ws))
+ (nreverse ws)))
+
+(defun buffer-expose--restore-windows (confs)
+ (dolist (c confs)
+ (setf (window-buffer (car c))
+ (cdr c))))
+
(defun buffer-expose-next-page ()
"Page to next view."
(interactive)
(when (or buffer-expose--prev-stack
buffer-expose--buffer-list)
- (push (current-window-configuration) buffer-expose--next-stack))
+ (push (buffer-expose--window-config) buffer-expose--next-stack))
(if buffer-expose--prev-stack
- (progn (set-window-configuration
+ (progn (buffer-expose--restore-windows
(pop buffer-expose--prev-stack))
(buffer-expose--select-window (frame-first-window)))
(if buffer-expose--buffer-list
@@ -669,9 +682,9 @@ MAX is the maximum of windows to display per page."
(interactive)
(if buffer-expose--next-stack
(progn
- (push (current-window-configuration)
+ (push (buffer-expose--window-config)
buffer-expose--prev-stack)
- (set-window-configuration (pop buffer-expose--next-stack))
+ (buffer-expose--restore-windows (pop buffer-expose--next-stack))
;; for consistency with next-page make sure it behaves the same
(buffer-expose--select-window (frame-first-window)))
(error "No previous view available")))
- [elpa] branch externals/buffer-expose created (now 713238b), Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 3d7b033 02/38: Extend config description, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 361f35f 04/38: Fix helm regex, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 3aa9718 03/38: Filter *helm- buffers by default, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose a86aa34 14/38: Fix byte compiler warnings, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose af53a9b 25/38: Improve switch buffer, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose d4f22e9 10/38: Make regex option a list of regexes, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose a47a46c 29/38: Reset buffer before aw-switch, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 9a2393c 28/38: Cleanup, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 69bfeb1 15/38: Add binding for no stars, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose d05d136 27/38: Handle window configurations internally, don't use set-window-config,
Clemens Radermacher <=
- [elpa] externals/buffer-expose adeb508 35/38: Docstring fixes, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 260a2ed 20/38: Replace `windmove` with package commands, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 713238b 38/38: Checkdoc fixes, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 07cea91 31/38: Code refactoring, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose f3fd7fa 13/38: Add command omitting star buffers, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 8dec782 07/38: Require cl-lib, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose ea8d671 11/38: Fix regex list type, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose e78ca06 21/38: Cleanup, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose c0034f5 26/38: Code reordering, Clemens Radermacher, 2019/02/25
- [elpa] externals/buffer-expose 5748ffb 34/38: Update docstrings, Clemens Radermacher, 2019/02/25