How to change repl keybindings

REPL: allow editing current input in editor (via Meta-e) by rfourquet · Pull Request #33759 · JuliaLang/julia · GitHub uses Meta+e for edit command line in editor.

I want to use Ctrl+xCtrl+e for that because that’s what shells use. So I tried

atreplinit((repl)-> begin
    @eval import REPL
    @eval import REPL.LineEdit
    repl.interface = REPL.setup_interface(repl; extra_repl_keymap = Dict(
        "^x^e" => (s, o...) -> LineEdit.edit_input(s),
    ))

but then on startup Julia says

WARNING: Detected access to binding `Main.REPL` in a world prior to its definition world.
  Julia 1.12 has introduced more strict world age semantics for global bindings.
  !!! This code may malfunction under Revise.
  !!! This code will error in future versions of Julia.
Hint: Add an appropriate `invokelatest` around the access to this binding.
To make this warning an error, and hence obtain a stack trace, use `julia --depwarn=error`.

What’s the right way to do this?

I’m doing it as described in the documentation, and it works well.