File tree 3 files changed +31
-1
lines changed 3 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 7
7
* Add ` .cljc ` to ` auto-mode-alist ` .
8
8
* [ #281 ] ( https://github.com/clojure-emacs/clojure-mode/pull/281 ) : Add support for namespace-prefixed definition forms.
9
9
* 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+.
11
12
12
13
### Bugs fixed
13
14
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:
73
73
(put-clojure-indent '->> 1)
74
74
```
75
75
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
+
76
84
This means that the body of the ` ->/->> ` is after the first argument.
77
85
78
86
A 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."
133
133
|\" some doc string
134
134
- some note\" " )
135
135
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
+
136
157
(provide 'clojure-mode-indentation-test )
137
158
138
159
; ; Local Variables:
You can’t perform that action at this time.
0 commit comments