Skip to content

Commit c9b6712

Browse files
committed
Merge pull request #859 from k-bx/patch-2
Quick Installation
2 parents 6a65bd9 + cc88528 commit c9b6712

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

README.md

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,25 @@ This is an Emacs mode for editing, debugging and developing Haskell programs.
99
[![Melpa Status](http://melpa.org/packages/haskell-mode-badge.svg)](http://melpa.org/#/haskell-mode)
1010
[![Melpa Stable Status](http://stable.melpa.org/packages/haskell-mode-badge.svg)](http://stable.melpa.org/#/haskell-mode)
1111

12-
## Installation
12+
## Quick Installation
1313

14-
`haskell-mode` is best installed as a package.
14+
Make sure you have this in your [init file](http://www.gnu.org/software/emacs/manual/html_node/emacs/Init-File.html) (usually `~/.emacs`). If you already have `custom-set-variables`, merge its contents:
1515

16-
To install `haskell-mode` you need to add a package archive repository that distributes
17-
`haskell-mode`. Execute
18-
19-
```
20-
M-x customize-option RET package-archives
21-
```
22-
23-
and add
24-
25-
Archive name: melpa-stable
26-
URL or directory name: http://stable.melpa.org/packages/
27-
28-
Fetch list of packages with
16+
```elisp
17+
(require 'package)
18+
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)
19+
(custom-set-variables
20+
;; custom-set-variables was added by Custom.
21+
;; If you edit it by hand, you could mess it up, so be careful.
22+
;; Your init file should contain only one such instance.
23+
;; If there is more than one, they won't work right.
24+
'(package-archives
25+
(quote
26+
(("gnu" . "http://elpa.gnu.org/packages/")
27+
("melpa-stable" . "http://stable.melpa.org/packages/")))))
28+
```
29+
30+
Then run emacs, and evaluate:
2931

3032
M-x package-refresh-contents
3133

@@ -36,14 +38,6 @@ and then follow by
3638
Voila! `haskell-mode` is installed! You should be able to edit Haskell
3739
source code in color now.
3840

39-
You need to enable indentation as this does not happen automatically
40-
currently. Add this line to your ~/.emacs file:
41-
42-
```el
43-
(add-hook 'haskell-mode-hook 'haskell-indentation-mode)
44-
45-
```
46-
4741
`Haskell-mode` has much much much more to offer but the above should get you
4842
going!
4943

0 commit comments

Comments
 (0)