-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support SMIE (Emacs 24.4) #14
Comments
In fact, this would be trivial. All you need to do is detect if SMIE is supported and fire off a (defun smie-auto-guess ()
(when (featurep 'smie)
(unless (eq smie-grammar 'unset)
(smie-config-guess))))
(add-hook 'after-change-major-mode-hook 'smie-auto-guess) |
In dtrt-indent-find-file-hook, if we have SMIE and the current mode supports it, use smie-config-guess. Otherwise, fall back to dtrt-indent-try-set-offset as normal. Thanks to @PythonNut for example code.
I believe this now works: Thanks @PythonNut for the bug report and example code. |
Thanks @rrthomas ! I've also tested it with sh-mode and it works fine for me. TBH, I don't understand how
Indentation works fine with your recent changes, but |
Thanks for confirming. Good luck sussing out SMIE; I don't know much about it either. |
I still run into this, whenever a css-mode file is in the desktop file -- seems related. Reopen?
|
@hrehfeld as far as I can tell, you're experiencing a problem with CSS mode and desktop.el when you have dtrt-indent active? (I made a quick test, of opening a CSS file, quitting Emacs and restarting; the css-mode buffer was loaded fine by desktop.el with no error.) That's not the same as this issue (which was a request for SMIE support), so please file a new issue, with a way to repro and some evidence that the problem is caused by dtrt. |
Will try, but time is limited atm, currently i'm just not using dtrt-indent on css-mode as a quick workaround. |
Many Emacs 24.4 major modes are now using SMIE, a parser that improves automatic indentation and indentation based navigation. Many minor modes have switched to using it instead of the normal indentation variables, which breaks dtrt-indent in sh-mode for example.
The text was updated successfully, but these errors were encountered: