;; Haskell mode ;; ############ (setq load-path (cons "/afs/informatik.uni-tuebingen.de/pu/fp-2003/lib/lisp" load-path)) (defun my-haskell-constants () (let ((systype (getenv "SYSTYPE")) (std-switches '("+." "-h4096k")) (fp2003-lib-path "/afs/wsi/pu/fp-2003/lib/hugs")) (if (not (and systype (member systype '("i386_fbsd46" "sun4x_58" "ppc_macx66")))) (progn (setq haskell-prog-switches std-switches) (message (concat "Could not determine SYSTYPE / unsupported SYSTYPE. " "Will not load Hugs Graphics library"))) (setq haskell-prog-switches (cons (concat "-P" fp2003-lib-path "/" systype "/x11:") std-switches)))) (setq haskell-prog-name (executable-find "hugs") haskell-use-left-delim "" haskell-use-right-delim "" comint-prompt-pattern "^[A-Za-z0-9\-_]+> ") (set-face-background haskell-indentation-face (make-color-specifier "yellow")) (set-face-background haskell-indentation-face-2 (make-color-specifier "yellow")) (define-key haskell-mode-map [delete] 'delete-char)) (add-hook 'haskell-mode-hook 'my-haskell-constants) (setq auto-mode-alist (cons '("\\.hs$" . haskell-mode) (cons '("\\.lhs$" . haskell-mode) auto-mode-alist))) (autoload 'haskell-mode "haskell-mode" "Major mode for editing Haskell." t)