Skip to content

Commit

Permalink
transient-define-infix: Update debug specification and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tarsius committed Apr 21, 2024
1 parent f149136 commit 2dd0102
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 31 deletions.
16 changes: 6 additions & 10 deletions docs/transient.org
Original file line number Diff line number Diff line change
Expand Up @@ -1171,16 +1171,12 @@ suffixes”.
reserved for future use. {{{var(DOCSTRING)}}} is the documentation string and
is optional.

The keyword-value pairs are mandatory. All transient infix commands
are ~equal~ to each other (but not ~eq~), so it is meaningless to define
an infix command without also setting at least ~:class~ and one other
keyword (which it is depends on the used class, usually ~:argument~ or
~:variable~).

Each keyword has to be a keyword symbol, either ~:class~ or a keyword
argument supported by the constructor of that class. The
~transient-switch~ class is used if the class is not specified
explicitly.
At least one key-value pair is required. All transient infix
commands are ~equal~ to each other (but not ~eq~). It is meaningless
to define an infix command, without providing at least one keyword
argument (usually ~:argument~ or ~:variable~, depending on the class).
The suffix class defaults to ~transient-switch~ and can be set using
the ~:class~ keyword.

The function definition is always:

Expand Down
16 changes: 6 additions & 10 deletions docs/transient.texi
Original file line number Diff line number Diff line change
Expand Up @@ -1372,16 +1372,12 @@ This macro defines @var{NAME} as a transient infix command.
reserved for future use. @var{DOCSTRING} is the documentation string and
is optional.

The keyword-value pairs are mandatory. All transient infix commands
are @code{equal} to each other (but not @code{eq}), so it is meaningless to define
an infix command without also setting at least @code{:class} and one other
keyword (which it is depends on the used class, usually @code{:argument} or
@code{:variable}).

Each keyword has to be a keyword symbol, either @code{:class} or a keyword
argument supported by the constructor of that class. The
@code{transient-switch} class is used if the class is not specified
explicitly.
At least one key-value pair is required. All transient infix
commands are @code{equal} to each other (but not @code{eq}). It is meaningless
to define an infix command, without providing at least one keyword
argument (usually @code{:argument} or @code{:variable}, depending on the class).
The suffix class defaults to @code{transient-switch} and can be set using
the @code{:class} keyword.

The function definition is always:

Expand Down
19 changes: 8 additions & 11 deletions lisp/transient.el
Original file line number Diff line number Diff line change
Expand Up @@ -974,16 +974,12 @@ ARGLIST. The infix arguments are usually accessed by using
ARGLIST is always ignored and reserved for future use.
DOCSTRING is the documentation string and is optional.
The key-value pairs are mandatory. All transient infix commands
are equal to each other (but not eq), so it is meaningless to
define an infix command without also setting at least `:class'
and one other keyword (which it is depends on the used class,
usually `:argument' or `:variable').
Each key has to be a keyword symbol, either `:class' or a keyword
argument supported by the constructor of that class. The
`transient-switch' class is used if the class is not specified
explicitly.
At least one key-value pair is required. All transient infix
commands are equal to each other (but not eq). It is meaning-
less to define an infix command, without providing at least one
keyword argument (usually `:argument' or `:variable', depending
on the class). The suffix class defaults to `transient-switch'
and can be set using the `:class' keyword.
The function definitions is always:
Expand All @@ -1002,9 +998,10 @@ that case you have to use `transient-define-suffix' to define
the infix command and use t as the value of the `:transient'
keyword.
\(fn NAME ARGLIST [DOCSTRING] [KEYWORD VALUE]...)"
\(fn NAME ARGLIST [DOCSTRING] KEYWORD VALUE [KEYWORD VALUE]...)"
(declare (debug ( &define name lambda-list
[&optional lambda-doc]
keywordp sexp
[&rest keywordp sexp]))
(indent defun)
(doc-string 3))
Expand Down

0 comments on commit 2dd0102

Please sign in to comment.