RET runs the command newline-and-indent (found in global-map), which is an
interactive compiled Lisp function in ‘simple.el’.
It is bound to RET.
(newline-and-indent)
:around advice: ‘ad-Advice-newline-and-indent’
Insert a newline, then indent according to major mode.
Indentation is done using the value of ‘indent-line-function’.
In programming language modes, this is the same as TAB.
In some text modes, where TAB inserts a tab, this command indents to the
column specified by the function ‘current-left-margin’.
[back]
ad-Advice-newline-and-indent is a compiled Lisp function.
(ad-Advice-newline-and-indent AD--ADDOIT-FUNCTION)
Around-advice ‘clean-aindent’:
Advice for newline-and-indent(), implements clean auto-indent.
Removes unneeded whitespaces by keeping track of the place of the
last indentation so that they can be deleted in case the indentation was
abandoned.
[back]