Skip to content

Commit a34ccdc

Browse files
authored
Merge pull request #1793 from blucoat/master
Define haskell-mode-hook before haskell-mode
2 parents 53d2626 + 0997b0e commit a34ccdc

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

haskell-mode.el

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,26 @@ Prefix ARG is handled as per `delete-indentation'."
743743
(funcall #'electric-pair-default-inhibit ch)))
744744

745745
;; The main mode functions
746+
(defcustom haskell-mode-hook '(haskell-indentation-mode interactive-haskell-mode)
747+
"List of functions to run after `haskell-mode' is enabled.
748+
749+
Use to enable minor modes coming with `haskell-mode' or run an
750+
arbitrary function.
751+
752+
Note that `haskell-indentation-mode' and `haskell-indent-mode' should not be
753+
run at the same time."
754+
:group 'haskell
755+
:type 'hook
756+
:options '(capitalized-words-mode
757+
flyspell-prog-mode
758+
haskell-decl-scan-mode
759+
haskell-indent-mode
760+
haskell-indentation-mode
761+
highlight-uses-mode
762+
imenu-add-menubar-index
763+
interactive-haskell-mode
764+
turn-on-haskell-unicode-input-method))
765+
746766
;;;###autoload
747767
(define-derived-mode haskell-mode prog-mode "Haskell"
748768
"Major mode for editing Haskell programs.
@@ -859,26 +879,6 @@ Minor modes that work well with `haskell-mode':
859879

860880
(haskell-indentation-mode))
861881

862-
(defcustom haskell-mode-hook '(haskell-indentation-mode interactive-haskell-mode)
863-
"List of functions to run after `haskell-mode' is enabled.
864-
865-
Use to enable minor modes coming with `haskell-mode' or run an
866-
arbitrary function.
867-
868-
Note that `haskell-indentation-mode' and `haskell-indent-mode' should not be
869-
run at the same time."
870-
:group 'haskell
871-
:type 'hook
872-
:options '(capitalized-words-mode
873-
flyspell-prog-mode
874-
haskell-decl-scan-mode
875-
haskell-indent-mode
876-
haskell-indentation-mode
877-
highlight-uses-mode
878-
imenu-add-menubar-index
879-
interactive-haskell-mode
880-
turn-on-haskell-unicode-input-method))
881-
882882
(defun haskell-fill-paragraph (justify)
883883
(save-excursion
884884
;; Fill paragraph should only work in comments.

0 commit comments

Comments
 (0)