|
139 | 139 | (require 'haskell-lexeme) |
140 | 140 | (require 'haskell-sort-imports) |
141 | 141 | (require 'haskell-string) |
| 142 | +(require 'haskell-indentation) |
142 | 143 |
|
143 | 144 | ;; All functions/variables start with `(literate-)haskell-'. |
144 | 145 |
|
@@ -656,7 +657,7 @@ Minor modes that work well with `haskell-mode': |
656 | 657 | (set (make-local-variable 'comment-end-skip) "[ \t]*\\(-}\\|\\s>\\)") |
657 | 658 | (set (make-local-variable 'forward-sexp-function) #'haskell-forward-sexp) |
658 | 659 | (set (make-local-variable 'parse-sexp-ignore-comments) nil) |
659 | | - (set (make-local-variable 'indent-line-function) 'haskell-mode-suggest-indent-choice) |
| 660 | + |
660 | 661 | ;; Set things up for eldoc-mode. |
661 | 662 | (set (make-local-variable 'eldoc-documentation-function) |
662 | 663 | 'haskell-doc-current-info) |
@@ -693,7 +694,7 @@ Minor modes that work well with `haskell-mode': |
693 | 694 | (setq haskell-literate nil) |
694 | 695 | (add-hook 'before-save-hook 'haskell-mode-before-save-handler nil t) |
695 | 696 | (add-hook 'after-save-hook 'haskell-mode-after-save-handler nil t) |
696 | | - ) |
| 697 | + (haskell-indentation-mode)) |
697 | 698 |
|
698 | 699 | (defun haskell-fill-paragraph (justify) |
699 | 700 | (save-excursion |
@@ -979,14 +980,6 @@ To be added to `flymake-init-create-temp-buffer-copy'." |
979 | 980 |
|
980 | 981 | (add-to-list 'flymake-allowed-file-name-masks '("\\.l?hs\\'" haskell-flymake-init)) |
981 | 982 |
|
982 | | -(defun haskell-mode-suggest-indent-choice () |
983 | | - "Ran when the user tries to indent in the buffer but no indentation mode has been selected. |
984 | | -Explains what has happened and suggests reading docs for `haskell-mode-hook'." |
985 | | - (interactive) |
986 | | - (error "You tried to do an indentation command, but an indentation mode has not been enabled yet. |
987 | | -
|
988 | | -Run M-x describe-variable haskell-mode-hook for a list of such modes.")) |
989 | | - |
990 | 983 | (defun haskell-mode-format-imports () |
991 | 984 | "Format the imports by aligning and sorting them." |
992 | 985 | (interactive) |
|
0 commit comments