On Wed, Mar 20 2013 (01:52), Linus Arver <[email protected]> wrote:
> On Tue, Mar 19, 2013 at 06:32:24PM +0100, Michael Markert wrote: >> Actually not direct, but when it does when entering insert-state, this >> >> (add-hook haskell-mode-hook (lambda () (setq evil-auto-indent nil))) >> >> should work around it. > > This works wonderfully! Thank you very much. > > For what it's worth, here is my current Haskell-specific code for > dead-simple indentation in my ~/.emacs: > > ; custom indentation function: copy the indentation of the previous line > ; adopted from http://sequence.complete.org/node/365 > (defun newline-and-indent-relative () > (interactive) > (newline) > (indent-to-column (save-excursion > (forward-line -1) > (back-to-indentation) > (current-column))) > ) Well if you don't want to use the indent modes this one is even simpler: (add-hook 'haskell-mode (lambda () (setq indent-line-function #'indent-relative))) This could make your custom function superfluous and you don't have to disable the auto-indent. Michael
pgp0TY1ZMPAVu.pgp
Description: PGP signature
_______________________________________________ implementations-list mailing list [email protected] https://lists.ourproject.org/cgi-bin/mailman/listinfo/implementations-list
