File tree Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Expand file tree Collapse file tree 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 77* Add ` .cljc ` to ` auto-mode-alist ` .
88* [ #281 ] ( https://github.com/clojure-emacs/clojure-mode/pull/281 ) : Add support for namespace-prefixed definition forms.
99* Remove ` clojure-mark-string ` .
10- * Require Emacs 24.3+.
10+ * [ #283 ] ( https://github.com/clojure-emacs/clojure-mode/pull/283 ) : You can now specify different indentation settings for ns-prefixed symbols.
11+ * [ #285 ] ( https://github.com/clojure-emacs/clojure-mode/issues/285 ) : Require Emacs 24.3+.
1112
1213### Bugs fixed
1314
Original file line number Diff line number Diff line change @@ -73,6 +73,14 @@ You can do so by putting the following in your config:
7373(put-clojure-indent '->> 1)
7474```
7575
76+ You can also specify different indentation settings for symbols
77+ prefixed with some ns (or ns alias):
78+
79+ ``` el
80+ (put-clojure-indent 'do 0)
81+ (put-clojure-indent 'my-ns/do 1)
82+ ```
83+
7684This means that the body of the ` ->/->> ` is after the first argument.
7785
7886A more compact way to do the same thing is:
Original file line number Diff line number Diff line change @@ -133,6 +133,27 @@ values of customisable variables."
133133 |\" some doc string
134134 - some note\" " )
135135
136+ ; ; we can specify different indentation for symbol with some ns prefix
137+ (put-clojure-indent 'bala 0 )
138+ (put-clojure-indent 'ala/bala 1 )
139+
140+ (check-indentation symbol-without-ns
141+ "
142+ (bala
143+ |one)"
144+ "
145+ (bala
146+ |one)" )
147+
148+ (check-indentation symbol-with-ns
149+ "
150+ (ala/bala top
151+ |one)"
152+ "
153+ (ala/bala top
154+ |one)" )
155+
156+
136157(provide 'clojure-mode-indentation-test )
137158
138159; ; Local Variables:
You can’t perform that action at this time.
0 commit comments