From 82be34f4eeb9936641f4e475d28707da56e6ecf2 Mon Sep 17 00:00:00 2001 From: ncaq Date: Thu, 3 Sep 2015 19:34:36 +0900 Subject: [PATCH] added: use haskell-mode function --- profile/90_haskell.el | 31 +++++++++++++++++-------------- profile/90_haskell.elc | Bin 1759 -> 1877 bytes 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/profile/90_haskell.el b/profile/90_haskell.el index a267f5a80..1c13b13ea 100644 --- a/profile/90_haskell.el +++ b/profile/90_haskell.el @@ -2,35 +2,38 @@ (custom-set-variables '(ac-modes (append '(haskell-mode inferior-haskell-mode haskell-interactive-mode) ac-modes)) - '(haskell-stylish-on-save t) + '(hamlet/basic-offset 4) '(haskell-indentation-ifte-offset 4) '(haskell-indentation-layout-offset 4) '(haskell-indentation-left-offset 4) '(haskell-indentation-starter-offset 4) '(haskell-indentation-where-post-offset 2) '(haskell-indentation-where-pre-offset 2) - '(hamlet/basic-offset 4) + '(haskell-process-suggest-language-pragmas nil) + '(haskell-stylish-on-save t) ) (with-eval-after-load 'haskell-mode (add-hook 'haskell-mode-hook 'haskell-indentation-mode) - - (with-eval-after-load 'auto-complete - (add-hook 'inferior-haskell-mode-hook 'ac-haskell-process-setup)) - - (with-eval-after-load 'flycheck - (add-hook 'flycheck-mode-hook 'flycheck-haskell-setup)) - - (with-eval-after-load 'haskell-interactive-mode - (ncaq-set-key haskell-interactive-mode-map)) + (add-hook 'haskell-mode-hook 'interactive-haskell-mode) + (add-hook 'haskell-mode-hook 'haskell-doc-mode) + (add-hook 'haskell-mode-hook 'ac-haskell-process-setup) + (add-hook 'inferior-haskell-mode-hook 'ac-haskell-process-setup) + (add-hook 'flycheck-mode-hook 'flycheck-haskell-setup) (defun haskell-mode-stylish-buffer-and-save-buffer () (interactive) (save-buffer) (haskell-mode-stylish-buffer)) - (define-key haskell-mode-map [remap indent-whole-buffer] 'haskell-mode-stylish-buffer-and-save-buffer) + (defun haskell-process-load-or-reload-and-switch () + (interactive) + (haskell-process-load-or-reload) + (switch-to-buffer (haskell-process))) + + (with-eval-after-load 'haskell-interactive-mode (ncaq-set-key haskell-interactive-mode-map)) + (define-key haskell-mode-map (kbd "C-c C-d") 'hayoo) - (define-key haskell-mode-map (kbd "C-c C-l") 'inferior-haskell-load-file) - (define-key haskell-mode-map (kbd "C-c C-r") 'haskell-process-load-or-reload) + (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-or-reload-and-switch) + (define-key haskell-mode-map [remap indent-whole-buffer] 'haskell-mode-stylish-buffer-and-save-buffer) ) diff --git a/profile/90_haskell.elc b/profile/90_haskell.elc index cea168f95a8d513efcf2b8c96ebf56706b4e030d..3b7868b232b81f89c3f590703e6fff7f89a42f9d 100644 GIT binary patch delta 572 zcmZXR&q~8E9LI56hYS=iqQa2afviZdP1_Amf(LKn11uG?F73*?bS&v)2leK~V@|$< zhrNIgum{kK2Vcc>UCV}tA0(fAzrTO^-TT^KEO(BuZJ~3_FtSW_v{g7NT=}!})ELK9 zT=of%e7UFq`C9qD@{di7#q+e9iHtmoCug1G-kXNz=|Ym2OUw+fA=vaTmtXI>Fk(b8pgud$8P z$f&d-w5zUa1ITIR4do>Bxm%=@<(Fpd?j~Y_PKhs~8HL5P<77ZVaTz2&Tmj;jf^vIQ zq!amBYf7jYa;d$^kNW8aBy0frVt6@#Bxgl_dk=fNjFVj09*FurNei{UH zTGn3I@c>du7-sE&8G80Lo}5%q+OU%ZGaN&;!nf K+4F#98I3=eva0X^ delta 467 zcmaKnyH3L}7=_iV00{);qOySHN{9|tol9FW!NQ0b8JY}k@>_}G#wble9hh0zys`2E zyZ{ft)`b~%UVxE5g`s6&IFj}0oc|oZZM?5Pzm^(DtDbFf&#`QjgL2JB>CQY<_Dxp) z+#V^&J3}#!1E!@MLrz@tR5|Imp2NGSo=1Q3ydZtd^F?A=^UKuCN;~KCn%)YM!soVr ziwk1o0^3?5xW{&u2sYSV^H{w&gBzikkU3;bX%P}J$u$e~=o;4oX$?4`xCU=>?B{l| zi1#TOh%jW4)`>YN@0rtD-E7sGJ)byePrdY5rfupIsir{$LGu3{jCVHwM$N3=G%xi_ zlhy98LXdF^EP*K*WH1ufBu+y}b9NhP1#CEx5;C9AN|lmGOtr?RCn>s+$2wz?7$>0A a{EJM+3eeD?=BswN>l1fzvrjDEUi$_P5{7sH