Skip to content

Commit 8b7fae0

Browse files
committed
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]. Closes #376. Closes #377. 1: 2023-02-16 2dcce30290dc7782e9de3b4adf59f38b42408c98 Update Android port
1 parent 20a82c4 commit 8b7fae0

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

lisp/transient.el

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2323,6 +2323,7 @@ EDIT may be non-nil."
23232323
(transient--redisplay))
23242324
(get name 'transient--prefix))
23252325
(transient--setup-transient)
2326+
(transient--suspend-text-conversion-style)
23262327
(transient--suspend-which-key-mode)))
23272328

23282329
(cl-defgeneric transient-setup-children (group children)
@@ -5110,6 +5111,16 @@ search instead."
51105111
2)
51115112
lisp-imenu-generic-expression :test #'equal)
51125113

5114+
(defun transient--suspend-text-conversion-style ()
5115+
(static-if (fboundp 'set-text-conversion-style) ; since Emasc 30.1
5116+
(when text-conversion-style
5117+
(letrec ((suspended text-conversion-style)
5118+
(fn (lambda ()
5119+
(set-text-conversion-style suspended)
5120+
(remove-hook 'transient-exit-hook fn))))
5121+
(set-text-conversion-style nil)
5122+
(add-hook 'transient-exit-hook fn)))))
5123+
51135124
(declare-function which-key-mode "ext:which-key" (&optional arg))
51145125

51155126
(defun transient--suspend-which-key-mode ()

0 commit comments

Comments
 (0)