felix-eku
felix-eku

Reputation: 2213

haskell-mode-hook does only work on a single function

I'm trying to configure haskell-mode by adding functions to the hook:

(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)

The problem is that it only works if I comment one statement out, if I use the above code it tells my what the haskell-mode-hook was and what it now is and shows me the help text.

I'm using Emacs24 on Ubuntu 13.10.

Can someone please tell my why it doesn't work? Thanks

Upvotes: 1

Views: 112

Answers (2)

sanityinc
sanityinc

Reputation: 15212

Could this be a simple typo? I think turn-on-haskell-docs-mode should be turn-on-haskell-doc-mode.

Upvotes: 4

Steve
Steve

Reputation: 26

Not sure why this isn't working as you'd expect, but as a solution, can you just use a lambda function in the add-hook function? For example

  (add-hook 'haskell-mode-hook (lambda()
                                     (turn-on-haskell-indentation)
                                     (turn-on-haskell-docs-mode)))

Upvotes: 1

Related Questions