Skip to content

Commit af3bd43

Browse files
Abdussalam Abdurrahmanmarijnh
Abdussalam Abdurrahman
authored andcommitted
[clojure mode] Add other friends with body parameter to indentation list.
1 parent 069fa57 commit af3bd43

File tree

2 files changed

+17
-13
lines changed

2 files changed

+17
-13
lines changed

mode/clojure/clojure.js

+10-8
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,16 @@ CodeMirror.defineMode("clojure", function (options) {
138138
"with-precision", "with-redefs", "with-redefs-fn", "xml-seq", "zero?",
139139
"zipmap"];
140140
var haveBodyParameter = [
141-
"binding", "bound-fn", "case", "catch", "comment", "cond", "cond->",
142-
"cond->>", "condp", "def", "definterface", "defmethod", "defn",
143-
"defmacro", "defprotocol", "defrecord", "defstruct", "deftype", "do",
144-
"doseq", "dotimes", "doto", "extend", "extend-protocol", "extend-type",
145-
"fn", "for", "future", "if", "if-let", "if-not", "if-some", "let",
146-
"letfn", "locking", "loop", "ns", "proxy", "reify", "struct-map", "try",
147-
"when", "when-first", "when-let", "when-not", "when-some", "while",
148-
"with-open", "with-precision"];
141+
"->", "->>", "as->", "binding", "bound-fn", "case", "catch", "comment",
142+
"cond", "cond->", "cond->>", "condp", "def", "definterface", "defmethod",
143+
"defn", "defmacro", "defprotocol", "defrecord", "defstruct", "deftype",
144+
"do", "doseq", "dotimes", "doto", "extend", "extend-protocol",
145+
"extend-type", "fn", "for", "future", "if", "if-let", "if-not", "if-some",
146+
"let", "letfn", "locking", "loop", "ns", "proxy", "reify", "struct-map",
147+
"some->", "some->>", "try", "when", "when-first", "when-let", "when-not",
148+
"when-some", "while", "with-bindings", "with-bindings*", "with-in-str",
149+
"with-loading-context", "with-local-vars", "with-meta", "with-open",
150+
"with-out-str", "with-precision", "with-redefs", "with-redefs-fn"];
149151

150152
CodeMirror.registerHelper("hintWords", "clojure",
151153
[].concat(atoms, specialForms, coreSymbols));

mode/clojure/test.js

+7-5
Original file line numberDiff line numberDiff line change
@@ -277,14 +277,16 @@
277277
);
278278

279279
var haveBodyParameter = [
280-
"binding", "bound-fn", "case", "catch", "cond", "cond->",
281-
"cond->>", "condp", "def", "definterface", "defmethod", "defn",
280+
"->", "->>", "as->", "binding", "bound-fn", "case", "catch", "cond",
281+
"cond->", "cond->>", "condp", "def", "definterface", "defmethod", "defn",
282282
"defmacro", "defprotocol", "defrecord", "defstruct", "deftype", "do",
283283
"doseq", "dotimes", "doto", "extend", "extend-protocol", "extend-type",
284284
"fn", "for", "future", "if", "if-let", "if-not", "if-some", "let",
285-
"letfn", "locking", "loop", "ns", "proxy", "reify", "struct-map", "try",
286-
"when", "when-first", "when-let", "when-not", "when-some", "while",
287-
"with-open", "with-precision"];
285+
"letfn", "locking", "loop", "ns", "proxy", "reify", "some->", "some->>",
286+
"struct-map", "try", "when", "when-first", "when-let", "when-not",
287+
"when-some", "while", "with-bindings", "with-bindings*", "with-in-str",
288+
"with-loading-context", "with-local-vars", "with-meta", "with-open",
289+
"with-out-str", "with-precision", "with-redefs", "with-redefs-fn"];
288290

289291
function testFormsThatHaveBodyParameter(forms) {
290292
for (var i = 0; i < forms.length; i++) {

0 commit comments

Comments
 (0)