[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swsw 721d0208f7 026/146: Update the window list after dele
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swsw 721d0208f7 026/146: Update the window list after deleting a frame |
Date: |
Wed, 25 May 2022 02:59:40 -0400 (EDT) |
branch: elpa/swsw
commit 721d0208f7746b1127c847f4e5bf109c9686449c
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>
Update the window list after deleting a frame
* swsw.el (swsw-update): Add optional '_frame' argument.
(swsw-mode): Add hook to run 'swsw-update' to
'after-delete-frame-functions'.
---
swsw.el | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/swsw.el b/swsw.el
index 421dce92c7..0aade5091c 100644
--- a/swsw.el
+++ b/swsw.el
@@ -112,7 +112,16 @@ If set to `lighter', use the mode line lighter of
`swsw-mode'"
div
(1+ div))))
-(defun swsw-update ()
+(defun swsw-update-window (window)
+ "Update information for WINDOW."
+ (let ((id (if (window-minibuffer-p window)
+ swsw-minibuffer-id
+ (pop swsw-ids))))
+ (when id
+ (push (cons id window) swsw-window-list)
+ (set-window-parameter window 'swsw-id id))))
+
+(defun swsw-update (&optional _frame)
"Update information for all windows."
(setq swsw-window-list nil
;; Build a list of all possible IDs for the current length.
@@ -123,15 +132,6 @@ If set to `lighter', use the mode line lighter of
`swsw-mode'"
(apply #'swsw--get-possible-ids char-lists)))
(walk-windows #'swsw-update-window nil swsw-scope))
-(defun swsw-update-window (window)
- "Update information for WINDOW."
- (let ((id (if (window-minibuffer-p window)
- swsw-minibuffer-id
- (pop swsw-ids))))
- (when id
- (push (cons id window) swsw-window-list)
- (set-window-parameter window 'swsw-id id))))
-
(defun swsw-format-id (window)
"Format an ID string for WINDOW."
(format swsw-id-format
@@ -151,12 +151,14 @@ If set to `lighter', use the mode line lighter of
`swsw-mode'"
(funcall swsw-display-function t))
(add-hook 'window-configuration-change-hook #'swsw-update)
(add-hook 'minibuffer-setup-hook #'swsw-update)
- (add-hook 'minibuffer-exit-hook #'swsw-update))
+ (add-hook 'minibuffer-exit-hook #'swsw-update)
+ (add-hook 'after-delete-frame-functions #'swsw-update))
(unless (eq swsw-display-function 'lighter)
(funcall swsw-display-function nil))
(remove-hook 'window-configuration-change-hook #'swsw-update)
(remove-hook 'minibuffer-setup-hook #'swsw-update)
- (remove-hook 'minibuffer-exit-hook #'swsw-update)))
+ (remove-hook 'minibuffer-exit-hook #'swsw-update)
+ (remove-hook 'after-delete-frame-functions #'swsw-update)))
(defun swsw--read-id (len)
"Read a window ID of length LEN using `read-char'."
- [nongnu] elpa/swsw dd65e7c8af 139/146: ; Update copyright years, (continued)
- [nongnu] elpa/swsw dd65e7c8af 139/146: ; Update copyright years, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw ac8efcbbd1 007/146: Assign a unique ID to an active minibuffer, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 08b56d124c 015/146: Add support for multi-character IDs, ELPA Syncer, 2022/05/25
- [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 <=
- [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, 2022/05/25
- [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