DogLooksGood / parinfer-mode

Parinfer for Emacs :)
GNU General Public License v3.0
407 stars 33 forks source link

Incorrect "correction" of emacs lisp code #52

Closed mattly closed 7 years ago

mattly commented 7 years ago

I'm toying with setting up an emacs from scratch, and I'm trying to work with parfiner before putting in paredit or the like. Anyway, if I have a buffer with this code, auto-indented:

(setq org-src-fontify-natively t
      org-src-tab-acts-natively t)

and then enable parinfer-mode, it starts in paren mode. Switching to indent mode and agreeing to let it modify the buffer gets me this:

  (setq org-src-fontify-natively t)
  org-src-tab-acts-natively t

Which is clearly not correct. Is there some sort of magic I have to do to get elisp code indenting correctly with parinfer?

DogLooksGood commented 7 years ago

could you share your whole configuration? There're something that not work properly with parinfer-mode, e.g. indentation with TAB not space.

mattly commented 7 years ago

Aha, indent-tabs-mode is set to t by default. Setting it to nil fixes the problem. I was a bit perplexed by the behavior because who in their right mind thinks its ok to use tabs indent lisp code, right? But apparently emacs does.