Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 76 lines (53 sloc) 2.276 kB
6d35bcf @technomancy Add README.
technomancy authored
1 # Clojure Mode
2
174c8c3 @technomancy Clarify a couple things in the readme.
technomancy authored
3 Provides Emacs font-lock, indentation, and navigation for the
6d35bcf @technomancy Add README.
technomancy authored
4 [Clojure language](http://clojure.org).
5
6 ## Installation
7
8 It's easiest to install and keep Clojure Mode updated using
174c8c3 @technomancy Clarify a couple things in the readme.
technomancy authored
9 [package.el](http://bit.ly/pkg-el23).
6d35bcf @technomancy Add README.
technomancy authored
10
6d9a7e7 @technomancy Use github language-aware markdown in readme.
technomancy authored
11 ```lisp
12 ;; add to ~/.emacs.d/init.el if you aren't already using Marmalade.
13 (require 'package)
14 (add-to-list 'package-archives
15 '("marmalade" . "http://marmalade-repo.org/packages/"))
16 (package-initialize)
17 ```
18
19 * <kbd>M-x eval-buffer</kbd>
20 * <kbd>M-x package-refresh-contents</kbd>
21 * <kbd>M-x package-install clojure-mode</kbd>
6d35bcf @technomancy Add README.
technomancy authored
22
23 If you use a version of Emacs prior to 24 that doesn't include
24 package.el, you can get it from http://bit.ly/pkg-el23. If you have an
25 older package.el installed from tromey.com, you should upgrade in
26 order to support installation from multiple sources.
27
9ddf26d @technomancy Add manual install instructions.
technomancy authored
28 Of course, it's possible to install from source if you don't mind
29 missing out on automated updates, byte-compilation, and autoloads.
30 Download `clojure-mode.el` and place it in the `~/.emacs.d/`
31 directory, creating it if it doesn't exist. Then add this to the file
32 `~/.emacs.d/init.el`:
33
6d9a7e7 @technomancy Use github language-aware markdown in readme.
technomancy authored
34 ```lisp
35 (add-to-list 'load-path "~/.emacs.d/")
36 (require 'clojure-mode)
37 ```
6d35bcf @technomancy Add README.
technomancy authored
38
39 ## Paredit
40
41 Using clojure-mode with paredit is highly recommended. It is also
42 available using package.el from the above archive.
43
44 Use paredit as you normally would with any other mode; for instance:
45
6d9a7e7 @technomancy Use github language-aware markdown in readme.
technomancy authored
46 ```lisp
47 ;; (require 'paredit) if you didn't install via package.el
48 (defun turn-on-paredit () (paredit-mode 1))
49 (add-hook 'clojure-mode-hook 'turn-on-paredit)
50 ```
6d35bcf @technomancy Add README.
technomancy authored
51
593b65c @technomancy Explain inferior-lisp in the readme.
technomancy authored
52 ## Basic REPL
53
54 Use <kbd>M-x run-lisp</kbd> to open a simple REPL subprocess using
55 [Leiningen](http://github.com/technomancy/leiningen). Once that has
56 opened, you can use <kbd>C-c C-r</kbd> to evaluate the region or
57 <kbd>C-c C-l</kbd> to load the whole file.
58
59 If you don't use Leiningen, you can set `inferior-lisp-program` to
60 a different REPL command.
61
6d35bcf @technomancy Add README.
technomancy authored
62 ## SLIME
63
593b65c @technomancy Explain inferior-lisp in the readme.
technomancy authored
64 You can also use [Leiningen](http://github.com/technomancy/leiningen)
65 to start an enhanced REPL via SLIME:
6d35bcf @technomancy Add README.
technomancy authored
66
8eaffe7 @technomancy Bump swank version in readme.
technomancy authored
67 $ lein plugin install swank-clojure 1.3.3
6d35bcf @technomancy Add README.
technomancy authored
68
69 M-x clojure-jack-in # from inside a project
70
71 ## License
72
73 Copyright © 2007-2011 Jeffrey Chu, Lennart Staflin, Phil Hagelberg
74
75 Distributed under the GNU General Public License; see C-h t to view.
Something went wrong with that request. Please try again.