[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/window-commander a46fab04cd 168/170: Improve implementa
From: |
ELPA Syncer |
Subject: |
[elpa] externals/window-commander a46fab04cd 168/170: Improve implementation of keywords in 'wincom-define-window-command' |
Date: |
Wed, 28 Jun 2023 19:00:37 -0400 (EDT) |
branch: externals/window-commander
commit a46fab04cdf20f60b7a81088667d79977df71ca3
Author: Daniel Semyonov <daniel@dsemy.com>
Commit: Daniel Semyonov <daniel@dsemy.com>
Improve implementation of keywords in 'wincom-define-window-command'
* wincom.el (wincom-define-window-command): Change order of docstring
and keyword args, parse keyword args in a way which should make it
easier to add more.
(wincom-select): Switch placement of docstring and ':minibuffer'.
* wincom.texi (Window commands): Update for changes.
---
wincom.el | 14 +++++++-------
wincom.texi | 2 +-
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/wincom.el b/wincom.el
index fe20200cc5..ad068da3a2 100644
--- a/wincom.el
+++ b/wincom.el
@@ -340,15 +340,15 @@ When it's non-nil, allow the minibuffer to be selected by
For more information, see info node `(Window Commander) Window Commands'.
-\(fn NAME (WINDOW [PREFIX]) [KEYWORD-ARG...] [DOCSTRING] BODY...)"
+\(fn NAME (WINDOW [PREFIX]) [DOCSTRING] [KEYWORD-ARG...] BODY...)"
(declare (debug (&define name listp [&optional stringp]
def-body keywordp t))
(doc-string 3) (indent defun))
- (let* ((first (car body))
- (minibuffer (and (eq first :minibuffer) (cadr body)))
- (docstring (if (stringp first) first
- (and minibuffer (caddr body))))
- (window (car args)) (prefix (cadr args)))
+ (let* ((window (car args)) (prefix (cadr args))
+ (docstring (car body)) minibuffer)
+ (and (stringp docstring) (pop body))
+ (while-let (((keywordp (car body))) (form (pop body)))
+ (and (eq form :minibuffer) (setq minibuffer (car body))))
`(defun ,name ,(and prefix `(,prefix))
,(when (stringp docstring) (format "%s
@@ -373,8 +373,8 @@ window command is chosen.
(wincom--get-scope)))))))
(wincom-define-window-command wincom-select (window)
- :minibuffer t
"Select a window."
+ :minibuffer t
(select-window window))
(wincom-define-window-command wincom-delete (window)
diff --git a/wincom.texi b/wincom.texi
index d62e373626..4faeacf719 100644
--- a/wincom.texi
+++ b/wincom.texi
@@ -303,7 +303,7 @@ active). It can be used to change the behavior of window
commands (or
display functions, @xref{ID display}).
@end defvar
-@defmac wincom-define-window-command name (window [prefix] [minibuffer])
docstring body...
+@defmac wincom-define-window-command name (window [prefix]) [docstring]
[keyword-arg...] body...
Define NAME as a window command with DOCSTRING as its documentation
string. PREFIX (a symbol) is passed as an argument to the command
(when not omitted or nil), with its value being the raw prefix
- [elpa] externals/window-commander 9767e52e8c 150/170: ; Replace (unnecessary) backticks with normal quotes, (continued)
- [elpa] externals/window-commander 9767e52e8c 150/170: ; Replace (unnecessary) backticks with normal quotes, ELPA Syncer, 2023/06/28
- [elpa] externals/window-commander d46309a7a8 151/170: Rework display functions, ELPA Syncer, 2023/06/28
- [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 <=
- [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, 2023/06/28
- [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