# $Id: Portfile 64021 2010-02-20 10:17:22Z ryandesign@macports.org $

PortSystem 1.0
name		haskell-mode.el
version		2.4
categories	lang editors
maintainers	nomaintainer
platforms	darwin

description	An emacs major mode for editing haskell programs.
long_description	\
		Haskell-mode is a major Emacs mode for editing		\
		Haskell source code. It provides syntax highlighting	\
		and automatic indentation and comes with inf-haskell	\
		which allows interaction with an inferior Haskell	\
		interactive loop such as the one of Hugs  or GHCi.

distname	haskell-mode-${version}

homepage	http://www.iro.umontreal.ca/~monnier/elisp/
master_sites	${homepage}

checksums	md5 de5ff32478154a39bea3adb3b7ce0e94

depends_lib	port:emacs
depends_run	port:ghc

worksrcdir	${distname}

post-patch	{ reinplace s|ghci-program-path|${prefix}/bin/ghci|g ${worksrcpath}/inf-haskell.el }

use_configure	no
build		{}
destroot	{ file mkdir ${destroot}${prefix}/share/emacs/site-lisp
		  file copy  ${workpath}/${worksrcdir}	\
			     ${destroot}${prefix}/share/emacs/site-lisp
		}

post-activate	{ ui_msg "To use this, put the following into your ~/.emacs:"
		  ui_msg "(load \"${prefix}/share/emacs/site-lisp/${distname}/haskell-site-file\")"
		  ui_msg "(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)"
		  ui_msg "(add-hook 'haskell-mode-hook 'turn-on-haskell-indent)"
		  ui_msg "(add-hook 'haskell-mode-hook 'font-lock-mode)"
		  ui_msg "(add-hook 'haskell-mode-hook 'imenu-add-menubar-index)"
		  ui_msg " "
}
