[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/window-commander 73a241cf38 064/170: Ensure 'swsw-id-ch
From: |
ELPA Syncer |
Subject: |
[elpa] externals/window-commander 73a241cf38 064/170: Ensure 'swsw-id-chars' is set correctly when customized |
Date: |
Wed, 28 Jun 2023 19:00:27 -0400 (EDT) |
branch: externals/window-commander
commit 73a241cf383ef7c6a8591cb34b17ac3cdd1c4668
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>
Ensure 'swsw-id-chars' is set correctly when customized
* swsw.el (swsw--set-id-chars): New set function for 'swsw-id-chars'
which ensures it contains at least 2 characters and updates
information for all tracked windows.
(swsw-id-chars): Set 'set' function to 'swsw--set-id-chars'.
---
swsw.el | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/swsw.el b/swsw.el
index a41d48d748..65c52f0f52 100644
--- a/swsw.el
+++ b/swsw.el
@@ -64,9 +64,21 @@
:group 'convenience
:prefix "swsw-")
+(defun swsw--set-id-chars (sym chars)
+ "Set the variable ‘swsw-id-chars’.
+Check that the new list has at least two elements, set SYM’s value to
+CHARS, and call ‘swsw-update’."
+ (if (> 2 (length chars))
+ (user-error
+ "‘swsw-id-chars’ should contain at least two characters")
+ (set-default sym chars)
+ (swsw-update)))
+
(defcustom swsw-id-chars '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
- "Base set of characters from which window IDs are constructed."
- :type '(repeat character))
+ "Base set of characters from which window IDs are constructed.
+This list should contain at least two characters."
+ :type '(repeat character)
+ :set #'swsw--set-id-chars)
(defcustom swsw-minibuffer-id ?m
"ID reserved for the minibuffer."
- [elpa] externals/window-commander 8a8be23f1b 050/170: ; Include license information in created package archives, (continued)
- [elpa] externals/window-commander 8a8be23f1b 050/170: ; Include license information in created package archives, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander ec011dc3b9 053/170: ; Fix inconsistency in URL between swsw.el and swsw-pkg.el, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 0a3edee2e5 055/170: ; Bump version to 1.1.1 and update NEWS file, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 0b67d7bc00 056/170: * swsw.el (swsw-display-function): Define early only when byte-compiling, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 5446df0f3e 059/170: * swsw.el (swsw--get-id-length): Fix the calculation of the ID length, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 095091cf33 057/170: Handle cases where there are less than three tracked windows better, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander c2c579a3c9 061/170: Construct multi-character IDs without pre-computing all possible IDs, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 7d82ffeef4 076/170: ; Small modifications to the NEWS file, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander d7fe615c3f 049/170: ; Fix inconsistency between requirements in swsw.el and swsw-pkg.el, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander cacbe44c08 058/170: ; Remove unnecessary ':group' keywords from 'defcustom' calls, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 73a241cf38 064/170: Ensure 'swsw-id-chars' is set correctly when customized,
ELPA Syncer <=
- [elpa] externals/window-commander f66c043abc 067/170: Only call 'swsw-update' automatically when it's bound, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 53321ab4f2 069/170: ; Correct swsw-select's docstring, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander dbe46d5b86 070/170: * swsw.el (swsw-select): Don't select the next window for non-existent IDs, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 03747300a3 082/170: ; Add missing 'Window commands' entry to the detailed node listing, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 300a4e8e61 084/170: * swsw.el (swsw-delete): Fix when the other tracked window is a minibuffer, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander c153d9a32c 087/170: ; Add version information to customizable variables, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander dc4595546a 094/170: ; Change a message to a (more fitting in this context) user-error, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 1411a6314c 116/170: * swsw.el (swsw--update-window): Use 'when-let' instead of 'let' and 'when', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 4b308b978a 113/170: ; Move a comment slightly, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander e774ead908 104/170: ; Update mail address, ELPA Syncer, 2023/06/28