[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swsw a816f208e9 005/146: Simplify the format of 'swsw-wind
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swsw a816f208e9 005/146: Simplify the format of 'swsw-window-list' |
Date: |
Wed, 25 May 2022 02:59:37 -0400 (EDT) |
branch: elpa/swsw
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)))
- [nongnu] elpa/swsw 185861a2e9 010/146: Use a lighter for 'swsw-mode', (continued)
- [nongnu] elpa/swsw 185861a2e9 010/146: Use a lighter for 'swsw-mode', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 6a9b3544c9 002/146: ; Fix 'git clone' example command in README file, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 15e188aa17 009/146: Fix some edge cases related to the minibuffer, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 0aef3311c6 014/146: ; Bump to version 0.3, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 9873ff1bd2 020/146: * swsw.el (swsw-select): Add before and after hooks., ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 4a7ea31b37 036/146: * swsw.el (swsw-mode): Bind 'C-x o' to 'swsw-select', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 63e295f599 025/146: Add a user option to customize the scope of window tracking, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 721d0208f7 026/146: Update the window list after deleting a frame, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 48db8fe39b 021/146: Add a reference implementation for a conditional display function, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 4c84ca310f 016/146: ; Update README to reflect recent changes, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw a816f208e9 005/146: Simplify the format of 'swsw-window-list',
ELPA Syncer <=
- [nongnu] elpa/swsw f9a901c809 004/146: * swsw.el (swsw-id-chars-base): Remove erroneous quote, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 96809a6cae 019/146: Add the ability to change the way window IDs are displayed, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw c08a9b1e58 024/146: ; Fix a docstring, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw b6277eb31f 037/146: ; Indicate that version 1.1 is still in development in the NEWS file, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw a5b25e075f 032/146: Allow setting the scope to the selected frame, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 082e03382e 033/146: * swsw.el (swsw-select): Ensure 'swsw-after-select-hook' runs., ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 40f7a25f82 047/146: ; Add license information to the title page of the Info node, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 3a9848deac 042/146: Add an Info node for the package, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw c2c579a3c9 061/146: Construct multi-character IDs without pre-computing all possible IDs, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 7d82ffeef4 076/146: ; Small modifications to the NEWS file, ELPA Syncer, 2022/05/25