A minor mode that guesses the indentation offset originally used for creating source code files and transparently adjusts the corresponding settings in Emacs, making it more convenient to edit foreign files.
187
stars
31
forks
source link
dtrt-indent-try-set-offset doesn't set generic indent variables #41
prevents other variables in dtrt-indent-hook-generic-mapping-list from being
set, even if they don't match the best guess.
i.e. I want evil-shift-width to be set to the best guess, but if the mode's
offset variable (say, ruby-indent-level) already matches the guess, it won't
bother.
I'm guessing this wasn't intentional, so I suggest either removing the check or
checking if all indent-offset-variables match the best guess before short
circuiting. (Shall I PR this?)
On lines 923-924 of
dtrt-indent-try-set-offset
, the following checkprevents other variables in
dtrt-indent-hook-generic-mapping-list
from being set, even if they don't match the best guess.i.e. I want
evil-shift-width
to be set to the best guess, but if the mode's offset variable (say,ruby-indent-level
) already matches the guess, it won't bother.I'm guessing this wasn't intentional, so I suggest either removing the check or checking if all indent-offset-variables match the best guess before short circuiting. (Shall I PR this?)