[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/window-commander a816f208e9 005/170: Simplify the forma
From: |
ELPA Syncer |
Subject: |
[elpa] externals/window-commander a816f208e9 005/170: Simplify the format of 'swsw-window-list' |
Date: |
Wed, 28 Jun 2023 19:00:09 -0400 (EDT) |
branch: externals/window-commander
commit a816f208e9b2fc748415684bd401c262b4312a77
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>
Simplify the format of 'swsw-window-list'
Use an alist instead of a plist to store window information;
accomplish this by not saving the (currently unused) buffer associated
with the ID.
* swsw.el (swsw-window-list): Update docstring.
(swsw-update): Create new elements of 'swsw-window-list' as cons
cells, disregarding the buffer corresponding to the window.
(swsw-select): Use 'assq' instead of 'plist-get' to get the window
associated with an ID.
---
swsw.el | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/swsw.el b/swsw.el
index 7dc791d6f0..cd0c4022c8 100644
--- a/swsw.el
+++ b/swsw.el
@@ -46,7 +46,7 @@
"Characters from which window IDs can currently be constructed.")
(defvar swsw-window-list nil
- "List of active window plists.")
+ "Alist of active active windows and their IDs.")
(defun swsw-reset ()
"Reset information for all windows."
@@ -57,10 +57,7 @@
"Update information for WINDOW."
(let ((id (pop swsw-id-chars)))
(when id
- (push (list
- id
- :window window
- :buffer (window-buffer window))
+ (push (cons id window)
swsw-window-list)
(set-window-parameter window 'swsw-id id))))
@@ -101,9 +98,8 @@ line update for all windows."
(interactive (unless (< (length swsw-window-list) 3)
(list (read-char))))
(if id
- (let (window)
- (when (setq
- window (plist-get (cdr (assq id swsw-window-list)) :window))
+ (let ((window (cdr (assq id swsw-window-list))))
+ (when window
(select-window window)))
(other-window 1)))
- [elpa] branch externals/window-commander created (now dc7f6f264e), ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander f9a901c809 004/170: * swsw.el (swsw-id-chars-base): Remove erroneous quote, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 15e188aa17 009/170: Fix some edge cases related to the minibuffer, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 24720bfbe7 008/170: ; Bump version to 0.2, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 6a9b3544c9 002/170: ; Fix 'git clone' example command in README file, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander bc734b9937 003/170: Use 'read-char' instead of 'read-char-from-minibuffer' to read IDs, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander a816f208e9 005/170: Simplify the format of 'swsw-window-list',
ELPA Syncer <=
- [elpa] externals/window-commander 5d1ea190ab 011/170: Only display a mode line lighter for tracked windows, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander ba9e82c95f 001/170: initial commit, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 3f507e91c0 006/170: ; Fix docstring for 'swsw-mode', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander ac8efcbbd1 007/170: Assign a unique ID to an active minibuffer, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 024502f51f 017/170: * swsw.el (swsw-mode): Don't call 'force-mode-line-update', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander ddfed7b727 012/170: * swsw.el (swsw-mode): Add a sparse keymap., ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 37ad725b1e 018/170: ; Update comment referencing single character IDs, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander def4d94e43 013/170: ; Update README to better reflect the current state of the package, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 0aef3311c6 014/170: ; Bump to version 0.3, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 9873ff1bd2 020/170: * swsw.el (swsw-select): Add before and after hooks., ELPA Syncer, 2023/06/28