[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/swsw 6a70afa84f 097/146: ; Documentation fixes
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/swsw 6a70afa84f 097/146: ; Documentation fixes |
Date: |
Wed, 25 May 2022 02:59:51 -0400 (EDT) |
branch: elpa/swsw
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
- [nongnu] elpa/swsw 082e03382e 033/146: * swsw.el (swsw-select): Ensure 'swsw-after-select-hook' runs., (continued)
- [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
- [nongnu] elpa/swsw 4ceacd0330 132/146: Indicate that some functions are for interactive use only, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw eba70478e0 065/146: Update window information after 'swsw-scope' is customized, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 51fcc776bd 081/146: ; Reorganize swsw.el, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 2f7500636d 098/146: ; Add 'swsw' to .gitignore, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw db5cd237a7 125/146: ; Documentation improvements, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 6a70afa84f 097/146: ; Documentation fixes,
ELPA Syncer <=
- [nongnu] elpa/swsw 384dae5d45 128/146: ; Move local mode declaration to the top of NEWS, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 220c023a2a 088/146: ; Update copyright years, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 73a241cf38 064/146: Ensure 'swsw-id-chars' is set correctly when customized, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 3261f323e9 077/146: ; Bump version to 1.1.2, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw e43021aa7e 112/146: * swsw.el (swsw-format-id): Use 'format-spec' instead of 'format', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw c864e6d524 144/146: ; Add change log for version 2.1.1, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw d7fe615c3f 049/146: ; Fix inconsistency between requirements in swsw.el and swsw-pkg.el, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 74124620af 048/146: ; Add brief usage information to the docstring of 'swsw-mode', ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 83eb90586a 051/146: ; Alter comments and docstrings to comply with Emacs' conventions, ELPA Syncer, 2022/05/25
- [nongnu] elpa/swsw 8fc0e7dfa7 046/146: ; Bump required emacs version to 26.1, ELPA Syncer, 2022/05/25