Skip to content

Commit 473b49b

Browse files
committed
Mention the various major modes in the README
1 parent c27550f commit 473b49b

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,26 @@ If the installation doesn't work try refreshing the package list:
3636

3737
<kbd>M-x package-refresh-contents</kbd>
3838

39+
## Bundled major modes
40+
41+
The `clojure-mode` package actually bundles together several major modes:
42+
43+
* `clojure-mode` is a major mode for editing Clojure code
44+
* `clojurescript-mode` is a major mode for editing ClojureScript code
45+
* `clojurec-mode` is a major mode for editing `.cljc` source files
46+
* `clojurex-mode` is a major mode for editing `.cljx` source files
47+
48+
All the major modes derive from `clojure-mode` and provide more or less the same
49+
functionality. Differences can be found mostly in the font-locking -
50+
e.g. ClojureScript has some built-in constructs that are not present in Clojure.
51+
52+
The proper major mode is selected automatically based on the extension of the
53+
file you're editing.
54+
55+
Having separate major modes gives you the flexibility to attach different hooks
56+
to them and to alter their behavior individually (e.g. add extra font-locking
57+
just to `clojurescript-mode`) .
58+
3959
## Configuration
4060

4161
To see a list of available configuration options do `M-x customize-group RET clojure`.

0 commit comments

Comments
 (0)