Cycling through indentation levels in python.el
1 can be achieved by pressing <tab>
repeatedly, which is bound to indent-for-tab-command
.
Now, consider:
(defun malb/my-indent (&optional arg)
(interactive "P")
(indent-for-tab-command arg))
(bind-key "C-<tab>" #'malb/my-indent)
Now, pressing C-<tab>
repeatedly does not lead to cycling through indentation levels. On the other hand,
(bind-key "C-<tab>" #'indent-for-tab-command)
does lead to the desired outcome. Hence, somehow, calling indent-for-tab-command
from another function behaves differently from calling it directly. Can anyone explain why that is?