0

I have this configuration:

(setq tab-always-indent 'complete)
(global-corfu-mode 1)

Nothing else should have grabbed the <tab> key. When I do C-h k, then <tab>, I get that it is bould to indent-for-tab-command. Reading the source, it seems to call completion-at-point given my config. However, I still see a corfu popup.

Reading corfu.el, I do not understand how it is remapping <tab> to display a corfu popup.

2
  • This is the expected behavior for what you've described. Do you want to change the behavior in some way, or are you just curious about how it works? Commented Sep 17, 2023 at 3:02
  • I was just curious. I found out and posted the answer.
    – Gradient
    Commented Sep 20, 2023 at 1:35

1 Answer 1

0

indent-for-tab-command calls completion-at-point which calls completion-in-region which behaves according to completion-in-region-function. When corfu-mode is on, this variable is set to #corfu--in-region. This explains why <tab> displays a corfu popup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.