arnested / drupal-mode

Advanced Emacs minor mode for Drupal development
https://melpa.org/#/drupal-mode
GNU General Public License v3.0
32 stars 14 forks source link

Make c-default-style local #75

Open xendk opened 7 years ago

xendk commented 7 years ago

While trying to track down my "somehow c-basic-indent is always 2 per default in non-Drupal php buffers", I notice we fiddle with c-default-style:

https://github.com/arnested/drupal-mode/blob/develop/drupal-mode.el#L351

The side effect of this is that customize says it's modified outside of customize (which is true). I'm not aware of any "make customize suggest this change to a variable", so wouldn't the next best thing be setting it to be buffer local (assuming that works)?

xendk commented 3 years ago

Dammit Jim!

Should check on what editorconfig-emacs does, it's basically doing the same thing for all kinds of file types.

And what should happen if one has an .editorconfig in a Drupal project that specifies 4 spaces?