| Age | Commit message (Collapse) | Author |
|
|
|
|
|
Closes #417
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
An event that has no binding in `isearch-mode-map' causes Isearch to
be exited (see `isearch-pre-command-hook'). When that happens we have
to resume the transient menu just like when the user explicitly uses a
a command whose purpose it is to exit Isearch.
We deal with regular Isearch exit commands by rebinding them to wrapper
commands in our `isearch-mode-map' wrapper. We can deal with irregular
isearch exits by using one of our wrapper commands as the default
binding in that keymap.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Emacs commit 60c10b40d5b addresses this issued. That hasn't landed
on master yet (and so the hash is likely to change), so let's copy
the message here:
> Make C-g in command loops consistently invoke quit keybinding
>
> C-g in command loops could unpredictably either signal an error or
> invoke the quit_char keybinding, depending on the relative timing
> of input and redisplay. This change ensures C-g always runs the
> quit_char keybinding by wrapping read_char to check for quit_flag
> after reading input.
For older Emacs versions we have to work around the issue using this
new advice, approximately as suggested by Daniel Colascione at
https://github.com/magit/transient/commit/45fbefdc5b112f0a15cd93657.
The `unreadp' variable is an additional safety net, which should not
be necessary. It would kick in if the unread C-g again causesd quit
to be signaled, or if somehow our transient keymap got disabled,
without this advice also getting disabled.
Also see #388.
|
|
|
|
For class constructors and `clone', if a keyword argument is specified
multiple times, the latter instance wins, which in our case was the
outdated one.
As a result, it was impossible to change the level of a suffix if that
was set inline, in the prefix definition.
Fixes [1: bcc0bf83].
1: 2025-05-16 bcc0bf836808e156262d9ff631be7d91a0ec201d
Improve format of layout and handling of included groups
|
|
|
|
We already call `transient--post-exit', which also takes care of this,
but to be absolutely sure, also reset here and unconditionally (i.e.,
even if `transient--prefix' is nil or `transient--exitp' is `replace').
Before the emergency exit was added, unexpected bugs could look up
Emacs. That does not happen anymore, and we can also rely on it
to guarantee quitting is enabled again.
|
|
|
|
The existing `transient-option' class is suitable for options passed to
commands. A suffix that uses that class may represent an argument such
as "--option". In the list returned by `transient-args', that argument
and its value, "value", is represented as one element "--option=value".
For "options" that are not passed to a command that is not appropriate.
A caller that wants to extract the value of such an option would have
to parse that string. `transient-arg-value' can help with that, but it
always returns a string (or nil).
The new `transient-cons-option' class provides a more direct way to deal
with "non-command-line options", by representing the key value pair
using a cons-cell (ARGUMENT . VALUE), not just internally, but in
particular when handing it of to a caller. VALUE can have any printable
type and ARGUMENT can have any printable type, expect string.
We cannot use the term "key" because that is already used to the key
binding for the command. Also avoid using "property" because that
implies a property list, while the value returned by `transient-args'
is an alist when all infixes use the `transient-cons-options' class.
Sticking to "argument" also has the advantage, that we don't have to
implement or generalize a dozen methods.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Closes #334.
|
|
|
|
|
|
|
|
|
|
In [1: 1b7f9be7] we intentionally started signaling an error in
`transient-suffix-object' if no object can be determined, to learn
whether there actually are any callers for which it actually make
sense to return nil instead.
Now we know about one, but I am still not sure whether that should
be a valid use-case, so we keep the error for now, but ignore the
error in this one case.
Closes #337.
1: 2024-11-02 1b7f9be7b9fbc8acb5d71f028b19e1f78d9dd090
transient-suffix-object: Drop faulty fallback behavior
|