@@ -152,10 +152,10 @@ CodeMirror.defineMode("clojure", function (options) {
152152 var atom = createLookupMap ( commonAtoms ) ;
153153 var specialForm = createLookupMap ( commonSpecialForms ) ;
154154 var coreSymbol = createLookupMap ( commonCoreSymbols ) ;
155- var indentSymbol = createLookupMap ( commonIndentSymbols ) ; ;
155+ var indentSymbol = createLookupMap ( commonIndentSymbols ) ;
156156 var assumeBody = / ^ (?: d e f | w i t h ) [ ^ \/ ] + $ | \/ (?: d e f | w i t h ) / ;
157157 var numberLiteral = / ^ [ + \- ] ? \d + (?: (?: N | (?: [ e E ] [ + \- ] ? \d + ) ) | (?: \. ? \d * (?: M | (?: [ e E ] [ + \- ] ? \d + ) ) ? ) | \/ \d + | [ x X ] [ 0 - 9 a - f A - F ] + | r [ 0 - 9 a - z A - Z ] + ) ? / ;
158- var symbol = / [ \w * + ! \- . _ ? : < > \/ ' \xa1 - \uffff ] / ;
158+ var symbol = / [ ! # ' * + \- . \/ : < > ? _ \w \xa1 - \uffff ] / ;
159159
160160 var tokenType ;
161161
@@ -170,16 +170,15 @@ CodeMirror.defineMode("clojure", function (options) {
170170 if ( ch === "(" || ch === "[" || ch === "{" ) { tokenType = "open" ; return "bracket" ; }
171171 if ( ch === ")" || ch === "]" || ch === "}" ) { tokenType = "close" ; return "bracket" ; }
172172 if ( ch === ";" ) { stream . skipToEnd ( ) ; tokenType = "space" ; return "comment" ; }
173- if ( / [ ' ` ~ @ ] / . test ( ch ) ) return "atom" ;
174- if ( / [ # ^ ] / . test ( ch ) ) return "meta"
173+ if ( / [ # ' @ ^ ` ~ ] / . test ( ch ) ) return "meta" ;
175174
176175 var name = readSymbol ( stream ) ;
177176 tokenType = "symbol" ;
178177
179178 if ( atom . propertyIsEnumerable ( name ) || name . charAt ( 0 ) === ":" ) return "atom" ;
180179 if ( specialForm . propertyIsEnumerable ( name ) ||
181180 coreSymbol . propertyIsEnumerable ( name ) ) return "keyword" ;
182- if ( state . lastToken === "(" ) return "builtin" ;
181+ if ( state . lastToken === "(" ) return "builtin" ; // head symbol
183182
184183 return "variable" ;
185184 }
@@ -230,7 +229,7 @@ CodeMirror.defineMode("clojure", function (options) {
230229 tokenType = null ;
231230 var style = state . tokenize ( stream , state ) ;
232231
233- if ( tokenType != "space" ) {
232+ if ( tokenType !== "space" ) {
234233 if ( state . lastToken === "(" && state . ctx . indentTo === null ) {
235234 if ( tokenType === "symbol" &&
236235 ( indentSymbol . propertyIsEnumerable ( stream . current ( ) ) ||
@@ -251,7 +250,7 @@ CodeMirror.defineMode("clojure", function (options) {
251250 return style ;
252251 } ,
253252
254- indent : function ( state , _textAfter ) {
253+ indent : function ( state ) {
255254 var i = state . ctx . indentTo ;
256255
257256 return ( typeof i === "number" ) ?
0 commit comments