You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But, the following advice lets electric-indent-mode work more like intended:
(defun adocTZA-polymode-electric-indent-line (fun)
"Give `electric-indent-post-self-insert-function' the right indentation.
This is an advice for `electric-indent-post-self-insert-function' as FUN."
(let ((electric-indent-functions-without-reindent
(and
(memq pm--indent-line-function-original electric-indent-functions-without-reindent)
'(pm-indent-line-dispatcher))))
(funcall fun)))
(advice-add 'electric-indent-post-self-insert-function :around #'adocTZA-polymode-electric-indent-line)
(Really sorry, that I cannot be of more help at the moment...)
Without the advice electric-indent-mode also indents the current line at newline in modes where it shouldn't. (It should only indent the newly created line.)
For examples of affected modes, see the current setting of electric-indent-functions-without-reindent.
The text was updated successfully, but these errors were encountered:
Don't have much time. Have to work.
But, the following advice lets
electric-indent-mode
work more like intended:(Really sorry, that I cannot be of more help at the moment...)
Without the advice
electric-indent-mode
also indents the current line at newline in modes where it shouldn't. (It should only indent the newly created line.)For examples of affected modes, see the current setting of
electric-indent-functions-without-reindent
.The text was updated successfully, but these errors were encountered: