branch: externals/transient commit 5f33dfe21b4d3923b4e18051d9caf9b4ec075c93 Author: Jonas Bernoulli <jo...@bernoul.li> Commit: Jonas Bernoulli <jo...@bernoul.li>
Suspend text-conversion-style while transient is active It has been reported that this is necessary on Android and the author of the Android port suspends this for Isearch too, see [1: 2dcce30290d]. We set `overriding-text-conversion-style' instead of the buffer-local `text-conversion-style' because some menus allow switching to another buffer while the menu is still active. Closes #376. Closes #377. 1: 2023-02-16 2dcce30290dc7782e9de3b4adf59f38b42408c98 Update Android port --- lisp/transient.el | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lisp/transient.el b/lisp/transient.el index 692f993b69..2537fa9029 100644 --- a/lisp/transient.el +++ b/lisp/transient.el @@ -2323,6 +2323,7 @@ EDIT may be non-nil." (transient--redisplay)) (get name 'transient--prefix)) (transient--setup-transient) + (transient--suspend-text-conversion-style) (transient--suspend-which-key-mode))) (cl-defgeneric transient-setup-children (group children) @@ -5110,6 +5111,16 @@ search instead." 2) lisp-imenu-generic-expression :test #'equal) +(defun transient--suspend-text-conversion-style () + (static-if (boundp 'overriding-text-conversion-style) ; since Emasc 30.1 + (when text-conversion-style + (letrec ((suspended overriding-text-conversion-style) + (fn (lambda () + (setq overriding-text-conversion-style nil) + (remove-hook 'transient-exit-hook fn)))) + (setq overriding-text-conversion-style suspended) + (add-hook 'transient-exit-hook fn))))) + (declare-function which-key-mode "ext:which-key" (&optional arg)) (defun transient--suspend-which-key-mode ()