A problem with haskell-mode

Jorge Adriano jadrian@mat.uc.pt
Fri, 6 Sep 2002 11:50:04 +0100

> Hi, all, I installed the latest version of Haskell mode for emacs.
> Whenever I load haskell major mode by opening a haskell file, Xemacs gi=
> me the following error message:
> (1) (error/warning) Error in `post-command-hook' (setting hook to nil):
> (void-variable imenu--index-alist)
> My Xemacs version is 21.4.8. It works well under GNU emacs though. Anyb=
> has an idea how to get around it? Thanks.
> Deling

I had the same problem, and I found a fix somewhere.=20
Don't reember what exactly I had to change so I'll just send you my Haske=
section of xemacs init.el.

By the way I get an error whenever I type "undefined". Anyone else notice=
d it?
(1) (error/warning) Error in `post-command-hook' (setting hook to nil):=20
(wrong-type-argument listp a )


(setq load-path (cons "/usr/share/emacs/site-lisp/haskell-mode-1.41"=20

(setq auto-mode-alist
      (append auto-mode-alist
              '(("\\.[hg]s$"  . haskell-mode)
                ("\\.hi$"     . haskell-mode)
                ("\\.l[hg]s$" . literate-haskell-mode))))

(autoload 'haskell-mode "haskell-mode"
  "Major mode for editing Haskell scripts." t)
(autoload 'literate-haskell-mode "haskell-mode"
  "Major mode for editing literate Haskell scripts." t)

;(add-hook 'haskell-mode-hook 'turn-on-haskell-ghc)
(add-hook 'haskell-mode-hook 'turn-on-haskell-font-lock)
(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)

(require 'imenu)
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)

;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent)
;(add-hook 'haskell-mode-hook 'turn-on-haskell-hugs)