jscheid / dtrt-indent

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-set` #82

Closed ramnes closed 4 months ago

ramnes commented 4 months ago

Hey there, thanks for the great mode!

I'm always wondering what command I need to type to change the indentation offset with the mode I'm on. What would you think of adding a dtrt-indent-set command that would prompt for an indentation offset, and work with all modes supported by dtrt-indent-set in the first place – thus acting as a central command for indentation?

rrthomas commented 4 months ago

I would certainly accept a PR for such a function, which I guess would use dtrt-indent-hook-mapping-list to find the variable to set for the current mode.