Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install new modes in emacs 23 on OS X?

I just downloaded the Haskell and J modes off of SourceForge, and I'm having trouble figuring out how to make them interface with emacs 23. Google searches yield detailed instructions for emacs 22, but it looks like changes have been made that make it hard to figure out where I'm supposed to stick the source files. The internal documentation seems to assume more experience with emacs internals than I currently have, and the problem has resisted solution for several days. Does anyone know how to get these modes up and running?

EDIT: Thanks to Untwisted for supplying the answer. Ultimately, my real problems were these:

1) I didn't know that .emacs was invisible to the OSX finder but was visible through the terminal.

2) It never occurred to me that I could modify .emacs while an instance of emacs was running.

Once I realized that those were my problems, I used C-x C-f to open ~/.emacs, copied the text of Untwisted's fix, and modified it to reflect my personal file paths. After that, everything worked.

like image 240
estanford Avatar asked May 15 '10 09:05

estanford


1 Answers

Basically you need to put the .el files somewhere (I keep mine in ~/.emacs_extras/haskell-mode/ ), and edit your ~/.emacs file to load Haskell mode when appropriate. Example of a ~/.emacs file:

(load "~/.emacs_addons/haskell-mode/haskell-site-file")
(add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode)
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)

That should make Haskell mode work. For more details, other options, etc: http://www.haskell.org/haskellwiki/Haskell_mode_for_Emacs

like image 63
untwisted Avatar answered Sep 23 '22 17:09

untwisted