-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overly aggressive indenting after recent Emacs update #377
Comments
I imagine the abominable electric-indent-mode has something to do with this. |
Did you update to Emacs 24.4? |
Yes, I'm in Emacs 24.4. Aaaaaaand you're right, disabling electric-indent-mode did the trick! Abominable is right. |
In the latest |
I got the version that's currently in marmalade. I guess I could switch to the melpa version, but easier thing is to just disable electric-indent, unless that's actually useful in other contexts? |
That's extremely old (Jun 2013). You'd likely have to update your config for the newer versions to work.
If you want to disable it only in (add-hook 'haskell-mode-hook (lambda () (setq electric-indent-inhibit t))) |
The melpa version of haskell-mode didn't appear to have the automatic suppression of electric-indent, so I followed the tip from @purcell. Quick thing, I had to change the hook you gave me to this for it to work: (add-hook 'haskell-mode-hook (lambda () (electric-indent-local-mode -1))) Thanks for the help! |
It's possible that |
I was mistaken: that var is in 24.4. And the MELPA version does correctly inhibit |
Note that
|
I think we need to do something similar in |
Given the bad support for |
Radical. Can we do some more research about this?
Electric mode has a black list of modes when it does not activate. It might
be better to add Haskell-mode to that list.
|
Honestly I'm a little surprised that the various indentations do not use electric, since that seems to work fine for c, java, perl etc. While on this topic, I wonder why haskell-mode doesn't leverage |
Electric seems to work best for languages with a unique, well defined indentation point derived from curly braces or parentheses. Haskell usually has multiple choices how a line should be indented with different semantics so a programmer needs to choose which semantics he wants. What exactly does 'semantic' buy in this case? Honest question, I've never used it. |
Semantic is pretty huge, and |
Is there a well known open source project that depends on semantic?
|
While My experience back then (circa 2003) was semantic was very fast and has a great API for use within an IDE-like mode. The problem is more that Haskell doesn't offer a BNF afaict. With a BNF you fire up ... or follow the semantic docs in writing a regex-based tag generator, using the Haskell report. This could be OK too in that it would at least centralize parsing code in one place. Apparently this disables incremental parsing though. references: |
About agressive indenting. One.
Two. Anyway this issue got offtopic, lets close it. If somebody experiences staricase problem again please report a new issue. Thanks. |
Howdy,
I recently updated to the latest version of Emacs on Homebrew (using OSX Yosemite):
https://github.com/Homebrew/homebrew/blob/master/Library/Formula/emacs.rb
Suddenly, whenever I go to a new line using simple-indent-mode the editor always adds a 4-space indent, even in simple cases like:
This behavior persisted even after completely nuking my emacs installation and starting over. Has anyone else experienced this issue?
The text was updated successfully, but these errors were encountered: