[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swsw b10ff98f3d 079/146: Add a window deletion command
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swsw b10ff98f3d 079/146: Add a window deletion command |
Date: |
Wed, 25 May 2022 02:59:48 -0400 (EDT) |
branch: elpa/swsw
commit b10ff98f3d02a469d78b005d1aecb0e1315de288
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>
Add a window deletion command
* swsw.el (swsw-delete): New window command which deletes a window.
(swsw-command-map): Bind 'swsw-delete' to '0' by default.
---
swsw.el | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/swsw.el b/swsw.el
index a60120c3d1..b900245eb5 100644
--- a/swsw.el
+++ b/swsw.el
@@ -236,9 +236,22 @@ This command is intended to be used only when ‘swsw-mode’
is enabled."
(if window (select-window window)
(message "There is no active minibuffer window"))))
+(defun swsw-delete ()
+ "Start window deletion.
+If less than three windows have been assigned an ID, delete the window
+returned by ‘next-window’.
+Otherwise, window deletion allows either choosing a window by its ID
+\(deleting it), or using a window manipulation command.
+This command is intended to be used only when ‘swsw-mode’ is enabled."
+ (interactive)
+ (if (< swsw-window-count 3)
+ (delete-window (next-window))
+ (swsw--run-window-command #'delete-window)))
+
(defvar swsw-command-map (let ((map (make-sparse-keymap)))
(define-key map [?o] #'swsw-select)
(define-key map [?m] #'swsw-select-minibuffer)
+ (define-key map [?0] #'swsw-delete)
map)
"Key map for window commands.
This key map is set as the parent of ‘swsw--id-map’ during ID
- [nongnu] elpa/swsw 85d9c690b1 102/146: ; Add key binding to swsw-mode's docstring, (continued)
- [nongnu] elpa/swsw 85d9c690b1 102/146: ; Add key binding to swsw-mode's docstring, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw cf70d1d22c 071/146: ; Make an if statement more readable, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 7db205a145 105/146: ; Change all instances of "‘" and "’" to "`" and "'" respectively, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 8a9686e0fe 111/146: ; Change required Emacs version according to package-lint, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 8febd864f9 085/146: ; Remove old reference to 'swsw-minibuffer-id', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 03747300a3 082/146: ; Add missing 'Window commands' entry to the detailed node listing, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw ff30079d41 075/146: ; Remove trailing period in a tag string of 'swsw-scope', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 2b43f66c82 145/146: ; Use 'kbd' instead of vector notation for 'define-key' example, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 5d1ea190ab 011/146: Only display a mode line lighter for tracked windows, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw bbe31e347c 146/146: ; Bump version to 2.1.1, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw b10ff98f3d 079/146: Add a window deletion command,
ELPA Syncer <=
- [nongnu] elpa/swsw ddfed7b727 012/146: * swsw.el (swsw-mode): Add a sparse keymap., ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 8b74678bcf 028/146: * swsw.el (swsw-display-function): Avoid byte compilation warning, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 2d2edca2c3 029/146: ; Add 'Usage:' section to the commentary, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 54ca1baa14 030/146: ; Restructure README and commentary, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw c0f5277538 045/146: ; Update the URL property of the package, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw b3f6cee6af 068/146: ; Unify information in the README and commentary, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw ca14f1d0c5 107/146: Mark some variables as risky local variables, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 57e9986858 141/146: ; Small documentation fixes, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 3882424448 099/146: ; Bump to version 2.0.2, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw ccab7194a7 133/146: Use 'custom-initialize-changed' to initialize some user options, ELPA Syncer, 2022/05/25