From 2dd0102ec3df901d421fc338e5c768467cc54ecf Mon Sep 17 00:00:00 2001 From: Jonas Bernoulli Date: Sun, 21 Apr 2024 19:37:33 +0200 Subject: [PATCH] transient-define-infix: Update debug specification and documentation --- docs/transient.org | 16 ++++++---------- docs/transient.texi | 16 ++++++---------- lisp/transient.el | 19 ++++++++----------- 3 files changed, 20 insertions(+), 31 deletions(-) diff --git a/docs/transient.org b/docs/transient.org index 79827b95..8d4c676a 100644 --- a/docs/transient.org +++ b/docs/transient.org @@ -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: diff --git a/docs/transient.texi b/docs/transient.texi index da6b1754..46e2305b 100644 --- a/docs/transient.texi +++ b/docs/transient.texi @@ -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: diff --git a/lisp/transient.el b/lisp/transient.el index 8de12682..a58eb2e8 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -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: @@ -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))