Instantly share code, notes, and snippets.

Embed
What would you like to do?
haskell-flymake
(autoload 'ghc-init "ghc" nil t)
(add-hook 'haskell-mode-hook '(lambda ()
(ghc-init)
(local-set-key "\C-j" (lambda () (interactive)(insert " -> ")))
(local-set-key "\M-j" (lambda () (interactive)(insert " => ")))
(local-set-key "\C-l" (lambda ()(interactive)(insert " <- ")))
))
(defadvice inferior-haskell-load-file (after change-focus-after-load)
"Change focus to GHCi window after C-c C-l command"
(other-window 1))
(ad-activate 'inferior-haskell-load-file)
;; auto-complete
(require 'auto-complete)
(global-auto-complete-mode t)
(define-key ac-complete-mode-map "\C-n" 'ac-next)
(define-key ac-complete-mode-map "\C-p" 'ac-previous)
;; http://d.hatena.ne.jp/TakashiHattori/20120629/1340942555
(add-hook 'emacs-startup-hook
(function (lambda ()
(require 'auto-complete-config)
(ac-config-default))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment