summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2025-10-19 00:36:21 +0200
committerJonas Bernoulli <jonas@bernoul.li>2025-10-19 00:36:21 +0200
commit82baa889668d716e4d3b01e4a1d88f748993161e (patch)
treea4aeb69e26e96852d8c2360b26c32f7a6cadcc09
parenteed7386995c3fafc4e6b6007145848dbbae8bede (diff)
Resume transient when isearch is exited using non-isearch binding
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.
-rw-r--r--CHANGELOG3
-rw-r--r--lisp/transient.el1
2 files changed, 4 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index d46a8e1..e424306 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,9 @@
Because Emacs 28.1 was the first release that bundled this
package, we have to keep support for that release.
+- When Isearch was exited using a key that has no binding in
+ ~isearch-mode-map~, then the Transient state was not resumed.
+
* v0.10.1 2025-10-06
- ~transient--get-savable-value~ now also functions properly when
diff --git a/lisp/transient.el b/lisp/transient.el
index d316ae2..2043b67 100644
--- a/lisp/transient.el
+++ b/lisp/transient.el
@@ -5243,6 +5243,7 @@ See `forward-button' for information about N."
(defvar-keymap transient--isearch-mode-map
:parent isearch-mode-map
+ "<t>" #'transient-isearch-exit
"<remap> <isearch-exit>" #'transient-isearch-exit
"<remap> <isearch-cancel>" #'transient-isearch-cancel
"<remap> <isearch-abort>" #'transient-isearch-abort)