I can't seem to get indentation working properly in the REPLs I've used so far (IELM, MIT-Scheme, and Python).
Suppose I type the following and RET:
ELISP> (defun something ()
_
My cursor ends up at the underscore, and pressing TAB doesn't seem to do anything. The same thing happens with the MIT-Scheme REPL.
To be explicit, I'd like to have it automatically indent it like so:
ELISP> (defun something ()
_
In IELM, TAB is bound to ielm-tab
which is supposed to "Indent or complete". The function calls ielm-indent-line
at the beginning of a line. Calling ielm-indent-line
directly does not indent the line as advertised.
In the Python REPL, it does indent just enough to get past the prompt, but not more. For example:
>>> def something():
... _
I was hoping to be able to have the Python REPL automatically indent like in regular Python files. The mode description doesn't seem to turn up any relevant results for 'indent'.
electric-indent-mode
is enabled in all cases. Would anybody know what I'm missing?
Edit: I noticed that ielm-indent-line
is supposed to (but evidently does not) call lisp-indent-line
. Calling lisp-indent-line
directly does work in IELM, but not Inferior Scheme/MIT-Scheme.
Calling python-indent-line
in the Python REPL also does not work.