1

I'm following the Haskell Emacs Tutorial here and Emacs is annoying me with the way it adds some extra TAB characters. E.g.

When I have this code:

data ExampleType = ExampleType Int Int

instance Eq ExampleType where

If I position myself in instance and execute C-u M-t, it generates

instance Eq ExampleType where
  x == y = _body
           x /= y = _body

Instead of:

instance Eq ExampleType where
  x == y = _body
  x /= y = _body

Anyone knows why the 2nd line is added with an extra TAB? How do you avoid Emacs doing this?

Cheers, Galder

1

I found the answer in this Stackoverflow post. Adding the following to your init file avoids the issue:

;; Avoid extra TAB indents when pasting or auto-generating code
(electric-indent-mode 0)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.