; * lisp/transient.el: Fix compiler warning.

`overriding-text-conversion-style' isn't defined on all platforms, in
which case this is a no-op; there's nothing that has to be suspended.

Re <id:86zf2uc2ve.fsf@gnu.org>.
This commit is contained in:
Jonas Bernoulli 2026-04-23 16:31:25 +02:00
parent 0a04a4bc7a
commit 65bd3fe047
No known key found for this signature in database
GPG key ID: 230C2EFBB326D927

View file

@ -5524,13 +5524,15 @@ search instead."
lisp-imenu-generic-expression :test #'equal)
(defun transient--suspend-text-conversion-style ()
(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))))
;; Added in Emacs 30.1, but not defined on all platforms.
(static-when (boundp 'overriding-text-conversion-style)
(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))