README
1 Haskell Mode for Emacs 2 ---------------------- 3 Version number: v2_3. 4 5 This is the Haskell mode package for Emacs. Its use should be mostly 6 self-explanatory if you're accustomed to Emacs. 7 8 When Emacs is started up, it normally runs a file called ~/.emacs located in 9 your home directory. This file should contain all of your personal 10 customisations written as a series of Elisp commands. In order to install 11 the Haskell mode, you have to tell Emacs where to find it. This is done by 12 adding some commands to the init file. 13 14 Installation 15 ------------ 16 17 - If you are using XEmacs, the haskell-mode package may be available for 18 installation through the XEmacs package UI. 19 20 - If you are using Debian, you may be able to install the package 21 haskell-mode with a command like "apt-get install haskell-mode". 22 23 Otherwise: 24 25 - Download and unpack the basic mode and modules into a suitable directory, 26 e.g. ~/lib/emacs/haskell-mode/ where ~ stands for your home directory. 27 28 - Assuming you have placed the basic mode haskell-mode.el and the modules 29 you want to use in the directory ~/lib/emacs/haskell-mode/, add the 30 following command to your init file (~/.emacs): 31 32 (load "~/lib/emacs/haskell-mode/haskell-site-file") 33 34 adding the following lines according to which modules you want to use: 35 36 (add-hook 'haskell-mode-hook 'turn-on-haskell-doc-mode) 37 (add-hook 'haskell-mode-hook 'turn-on-haskell-indent) 38 ;;(add-hook 'haskell-mode-hook 'turn-on-haskell-simple-indent) 39 40 Note that the two indentation modules are mutually exclusive - add at 41 most one. Note that the line of code for simple indentation is commented 42 out (using a preceeding ;) in preference for the more advanced 43 indentation module. Installation is now complete! 44 45 The other modules are automatically loaded when needed in the following way: 46 47 - Font locking: just turn it on via `global-font-lock-mode' or do 48 (add-hook 'haskell-mode-hook 'font-lock-mode) 49 50 - Declaration scanning: just use M-x imenu or bind `imenu' to a key. E.g. 51 (global-set-key [(control meta down-mouse-3)] 'imenu) or you can also add 52 it to the menubar with (add-hook 'haskell-mode-hook 'imenu-add-menubar-index) 53 54 - Interaction with inferior Haskell interpreter: just hit C-c C-z or C-c C-l. 55 56 57 Customization 58 ------------- 59 60 Most customizations are on the functionality of a particular module. 61 See the documentation of that module for information on its 62 customisation. 63 64 65 Known problems 66 -------------- 67 68 It seems that some version of XEmacs come without the fsf-compat package 69 (which provides functions such as `line-end-position') and it seems that 70 even if your XEmacs does have the fsf-compat package installed it does not 71 autoload its part. Thus you may have to install the fsf-compat package and 72 add (require 'goto-addr) in your .emacs. 73 74 75 Support 76 ------- 77 78 Any problems, do mail me <monnier@iro.umontreal.ca> and I will try my best 79 to help you! 80 81 82 83 <!-- arch-tag: 25fc8494-611d-459f-9919-579c97f6313e -->