spotify / dockerfile-mode

An emacs mode for handling Dockerfiles
Apache License 2.0
535 stars 79 forks source link

Do not modify indentation if there's nothing to modify #81

Closed Hi-Angel closed 8 months ago

Hi-Angel commented 8 months ago

The older code has been always deleting the whitespace, even if indentation is already as expected. Fix that by replacing indent-to with indent-line-to which avoids modifying the line if there's nothing to modify.

As a bonus, this simplifies the code.