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

1

5

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.

Brower answered 15/5, 2010 at 9:40 Comment(2)
What binaries? modes are .el files which are sourceCorpulence
I was referring to .el files -- I saw someone refer to one of the modes as a binary somewhere, so I called it a binary without thinking. It's been fixed in the question statement.Brower
O
7

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

Outworn answered 15/5, 2010 at 10:31 Comment(2)
So is the .emacs file inside the emacs23 package, or does it go into an external file path during installation? Figuring out (where the .emacs file is/what it's called/how to change it) has been a significant part of my problem.Brower
Found it. (It's hidden in the OS X finder, but not to ls -al in the Terminal.) Now all I have to do is figure out how to convince the file that I have read/write permissions...Brower

© 2022 - 2024 — McMap. All rights reserved.