[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/window-commander 6a70afa84f 097/170: ; Documentation fi
From: |
ELPA Syncer |
Subject: |
[elpa] externals/window-commander 6a70afa84f 097/170: ; Documentation fixes |
Date: |
Wed, 28 Jun 2023 19:00:29 -0400 (EDT) |
branch: externals/window-commander
commit 6a70afa84f0a2dbd95b9d613243fb183565a23dd
Author: Daniel Semyonov <cmstr@dsemy.com>
Commit: Daniel Semyonov <cmstr@dsemy.com>
; Documentation fixes
---
NEWS | 2 +-
swsw.el | 10 +++++++++-
swsw.texi | 21 +++++++--------------
3 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/NEWS b/NEWS
index 0f0da776b3..f9a483552b 100644
--- a/NEWS
+++ b/NEWS
@@ -128,7 +128,7 @@ through the customize interface).
A MAJOR version bump is very unlikely.
The MINOR version is bumped when a feature is added in a non-breaking
way.
-The PATCH version is bumped when a no feature is added (e.g. a version
+The PATCH version is bumped when no feature is added (e.g. a version
with only fixes, or changes to documentation).
Note that versions before 1.0 did not follow this scheme.
diff --git a/swsw.el b/swsw.el
index 9d33cdf27a..498cab9f0f 100644
--- a/swsw.el
+++ b/swsw.el
@@ -114,7 +114,7 @@ t means consider all windows on all existing frames.
:tag "All windows on all visible and iconified frames" 0)
(const :tag "All windows on all visible frames" visible)
(const
- :tag "All window on the currently selected frame"
+ :tag "All windows on the currently selected frame"
current))
:set #'swsw--set-scope
:package-version '(swsw . 1.1))
@@ -175,6 +175,8 @@ If set to ‘lighter’, use the mode line lighter of
‘swsw-mode’."
"Get the next available ID."
(let ((len (length swsw-id-chars)) (adv-flag t) id)
(setq swsw--id-counter
+ ;; Translate the current value of the counter to the
+ ;; corresponding ID.
(mapcar (lambda (elt)
(push (nth elt swsw-id-chars) id)
;; Advance ‘swsw--id-counter’.
@@ -194,6 +196,12 @@ If set to ‘lighter’, use the mode line lighter of
‘swsw-mode’."
nil)
(swsw--next-id))))
(when id
+ ;; Create a key sequence from the ID, which corresponds to a
+ ;; command which calls the last command (with the corresponding
+ ;; window as the sole argument).
+ ;; This allows controlling which command is invoked when
+ ;; choosing an ID by setting ‘this-command’ in a command which
+ ;; sets the transient map to ‘swsw--id-map’.
(define-key swsw--id-map (apply #'vector id)
`(lambda ()
(interactive)
diff --git a/swsw.texi b/swsw.texi
index 6467636e3e..9c3f571729 100644
--- a/swsw.texi
+++ b/swsw.texi
@@ -217,16 +217,6 @@ will be @code{t} when enabling @code{swsw-mode} and
@code{nil} when disabling
it. By default, @code{lighter} is used.
@end defopt
-@defvar swsw-before-select-hook
-Hook which runs after @code{swsw-select} is called, but before and ID has been
-read. This hook can be used display window IDs conditionally.
-@end defvar
-
-@defvar swsw-after-select-hook
-Hook which runs after reading an ID, or if the user interrupts
-@code{swsw--read-id}. This hook can be used hide window IDs conditionally.
-@end defvar
-
@defun swsw-mode-line-display-function switch
Reference implementation of a ``simple'' display function. Display window IDs
on
the mode line if SWITCH isn't @code{nil}, and hide window IDs from the mode
@@ -236,8 +226,8 @@ line if SWITCH is @code{nil}. This display function respects
@defun swsw-mode-line-conditional-display-function switch
Reference implementation of a conditional display function. Add a hook to
-@code{swsw-before-select-hook} which displays window IDs on the mode line and
-add a hook to @code{swsw-after-select-hook} which hides window IDs from the
+@code{swsw-before-command-hook} which displays window IDs on the mode line and
+add a hook to @code{swsw-after-command-hook} which hides window IDs from the
mode line if SWITCH isn't @code{nil}, and remove those hooks if SWITCH is
@code{nil}. This display function respects @code{swsw-id-format}.
@end defun
@@ -247,7 +237,7 @@ mode line if SWITCH isn't @code{nil}, and remove those
hooks if SWITCH is
Window commands are used to perform operations on specific
windows. They are normal commands (interactive functions) which are
-bound to key in @code{swsw-command-map}. @code{swsw-select},
+bound to a key sequence in @code{swsw-command-map}. @code{swsw-select},
@code{swsw-select-minibuffer} and @code{swsw-delete} are implemented
as window commands.
@@ -276,7 +266,10 @@ conditionally run window commands.
Run FUN as a window command. Run @code{swsw-before-command-hook}, set
@code{this-command} to FUN, and set @code{swsw--id-map} as a transient
map which runs @code{swsw-after-command-hook} on exit. This function
-can be used to easily define new window commands.
+can be used to easily define new window commands. The hooks ran by
+this function are expected by swsw to run for any window command which
+requires ID selection; they should be manually added even if this
+function isn't used when defining a new window command.
@end defun
@node Keystroke Index
- [elpa] externals/window-commander 385c2f9602 166/170: ; Fix remaining wrong references to swsw, (continued)
- [elpa] externals/window-commander 385c2f9602 166/170: ; Fix remaining wrong references to swsw, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander c4c77ddf34 161/170: ; Update introduction, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 366972729f 162/170: Improve user option error checking and updating, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander b1cf47530d 155/170: ; Small change and fix to README and commentary, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 447e7c18b9 165/170: ; Clean .gitignore, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 76b11d7b76 154/170: ; Add a space between the name of the manual and a section name, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander f1693950a9 169/170: ; Bump version to 3.0, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 93814ae925 158/170: ; Fix swsw-pkg.el generation on OpenBSD, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander a46fab04cd 168/170: Improve implementation of keywords in 'wincom-define-window-command', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander e43021aa7e 112/170: * swsw.el (swsw-format-id): Use 'format-spec' instead of 'format', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 6a70afa84f 097/170: ; Documentation fixes,
ELPA Syncer <=
- [elpa] externals/window-commander 435e462891 115/170: ; Fix the required Emacs version in swsw-pkg.el, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander e7646bf372 129/170: ; Bump to version 2.1, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander f0f65362d4 095/170: * swsw.el (swsw--set-id-chars): Use 'length' instead of 'nth', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 2f7500636d 098/170: ; Add 'swsw' to .gitignore, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander cb2cb1e5cb 131/170: ; Small code style change, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander cacd11a1b7 072/170: Prevent setting 'swsw-minibuffer-id' to a member of 'swsw-id-chars', ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 48e4811965 089/170: ; Remove (incorrect) description of the 'make all' target in the Makefile, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 862d945bdb 101/170: ; Ignore Emacs' backup files, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander 95fc96e8c1 092/170: ; Add a link to the Info node in the customization buffer, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander cec8c4aacc 110/170: ; Edit docstrings to conform completely to 'checkdoc', ELPA Syncer, 2023/06/28