Obey standard variables for indentation style
Emacs offers standard variables for configuring indentation styles, such as indent-tabs-mode and sws-tab-width. When an Emacs user configures these globally, it is expected that the different programming modes respect these settings. Unless overridden, please have dockerfile-mode inform its indentation settings to match indent-tabs-mode and sws-tab-width by default.
You probably have (setq indent-tabs-mode nil) in your .emacs, you probably want
(setq-default indent-tabs-mode nil)
When using setq-default, dockerfile-mode does obey spaces in lieu of tabs.
I don't know anything about SWS (save for a quick duckduckgo'ing to find what sws-tab-width was), but it doesn't seem to be a standard emacs thing, so I don't know if there's some weird interaction between the standard emacs environment for tabs/spaces, etc. I would highly suspect that there's a standard emacs way to set the tab width, but I don't know it off hand.
Er, I have this at the top of my .emacs:
(setq-default indent-tabs-mode nil
tab-width 2)
Issue gardening. @mcandre does #43 fix the issue? Can it be closed?
@drewcsillag @mcandre pls close the report, it's fixed. I just tested: creating a buffer with
RUN foo \
bar
and then indenting bar results in it being indented with spaces as that's the default style in my configuration. Enabling M-x indent-tabs-mode and pressing TAB re-indents it using tabs instead.
@mcandre fancy to close the issue?