codemirror-rails 3.02 → 3.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (109) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +1 -1
  3. data/LICENSE +1 -1
  4. data/codemirror-rails.gemspec +1 -0
  5. data/doc/CodeMirror-LICENSE +5 -1
  6. data/lib/codemirror/rails/version.rb +2 -2
  7. data/vendor/assets/javascripts/codemirror/{utils → addons/dialog}/dialog.js +4 -0
  8. data/vendor/assets/javascripts/codemirror/addons/display/placeholder.js +54 -0
  9. data/vendor/assets/javascripts/codemirror/addons/edit/closebrackets.js +54 -0
  10. data/vendor/assets/javascripts/codemirror/{utils → addons/edit}/closetag.js +9 -8
  11. data/vendor/assets/javascripts/codemirror/{utils → addons/edit}/continuecomment.js +12 -4
  12. data/vendor/assets/javascripts/codemirror/addons/edit/continuelist.js +25 -0
  13. data/vendor/assets/javascripts/codemirror/{utils → addons/edit}/matchbrackets.js +30 -11
  14. data/vendor/assets/javascripts/codemirror/addons/fold/brace-fold.js +31 -0
  15. data/vendor/assets/javascripts/codemirror/addons/fold/foldcode.js +32 -0
  16. data/vendor/assets/javascripts/codemirror/addons/fold/indent-fold.js +11 -0
  17. data/vendor/assets/javascripts/codemirror/addons/fold/xml-fold.js +64 -0
  18. data/vendor/assets/javascripts/codemirror/addons/hint/html-hint.js +582 -0
  19. data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/javascript-hint.js +15 -11
  20. data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/pig-hint.js +19 -19
  21. data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/python-hint.js +2 -2
  22. data/vendor/assets/javascripts/codemirror/addons/hint/show-hint.js +180 -0
  23. data/vendor/assets/javascripts/codemirror/{utils → addons/hint}/xml-hint.js +5 -18
  24. data/vendor/assets/javascripts/codemirror/addons/lint/javascript-lint.js +127 -0
  25. data/vendor/assets/javascripts/codemirror/addons/lint/json-lint.js +14 -0
  26. data/vendor/assets/javascripts/codemirror/addons/lint/lint.js +197 -0
  27. data/vendor/assets/javascripts/codemirror/{utils → addons/mode}/loadmode.js +0 -0
  28. data/vendor/assets/javascripts/codemirror/{utils → addons/mode}/multiplex.js +2 -2
  29. data/vendor/assets/javascripts/codemirror/{utils → addons/mode}/overlay.js +2 -2
  30. data/vendor/assets/javascripts/codemirror/{utils → addons/runmode}/colorize.js +0 -0
  31. data/vendor/assets/javascripts/codemirror/{utils → addons/runmode}/runmode-standalone.js +2 -3
  32. data/vendor/assets/javascripts/codemirror/{utils → addons/runmode}/runmode.js +0 -0
  33. data/vendor/assets/javascripts/codemirror/addons/runmode/runmode.node.js +89 -0
  34. data/vendor/assets/javascripts/codemirror/addons/search/match-highlighter.js +60 -0
  35. data/vendor/assets/javascripts/codemirror/{utils → addons/search}/search.js +5 -5
  36. data/vendor/assets/javascripts/codemirror/{utils → addons/search}/searchcursor.js +37 -30
  37. data/vendor/assets/javascripts/codemirror/addons/selection/active-line.js +39 -0
  38. data/vendor/assets/javascripts/codemirror/addons/selection/mark-selection.js +34 -0
  39. data/vendor/assets/javascripts/codemirror/keymaps/vim.js +721 -188
  40. data/vendor/assets/javascripts/codemirror/modes/asterisk.js +6 -6
  41. data/vendor/assets/javascripts/codemirror/modes/clike.js +14 -14
  42. data/vendor/assets/javascripts/codemirror/modes/clojure.js +23 -7
  43. data/vendor/assets/javascripts/codemirror/modes/coffeescript.js +2 -2
  44. data/vendor/assets/javascripts/codemirror/modes/css.js +337 -235
  45. data/vendor/assets/javascripts/codemirror/modes/ecl.js +12 -12
  46. data/vendor/assets/javascripts/codemirror/modes/erlang.js +1 -1
  47. data/vendor/assets/javascripts/codemirror/modes/gas.js +326 -0
  48. data/vendor/assets/javascripts/codemirror/modes/gfm.js +1 -0
  49. data/vendor/assets/javascripts/codemirror/modes/haskell.js +26 -26
  50. data/vendor/assets/javascripts/codemirror/modes/haxe.js +17 -17
  51. data/vendor/assets/javascripts/codemirror/modes/htmlembedded.js +6 -6
  52. data/vendor/assets/javascripts/codemirror/modes/htmlmixed.js +43 -23
  53. data/vendor/assets/javascripts/codemirror/modes/javascript.js +78 -33
  54. data/vendor/assets/javascripts/codemirror/modes/jinja2.js +2 -2
  55. data/vendor/assets/javascripts/codemirror/modes/less.js +38 -38
  56. data/vendor/assets/javascripts/codemirror/modes/livescript.js +267 -0
  57. data/vendor/assets/javascripts/codemirror/modes/lua.js +7 -7
  58. data/vendor/assets/javascripts/codemirror/modes/markdown.js +108 -57
  59. data/vendor/assets/javascripts/codemirror/modes/mirc.js +177 -0
  60. data/vendor/assets/javascripts/codemirror/modes/ntriples.js +22 -22
  61. data/vendor/assets/javascripts/codemirror/modes/ocaml.js +1 -1
  62. data/vendor/assets/javascripts/codemirror/modes/perl.js +791 -791
  63. data/vendor/assets/javascripts/codemirror/modes/php.js +1 -1
  64. data/vendor/assets/javascripts/codemirror/modes/pig.js +163 -163
  65. data/vendor/assets/javascripts/codemirror/modes/python.js +31 -31
  66. data/vendor/assets/javascripts/codemirror/modes/q.js +124 -0
  67. data/vendor/assets/javascripts/codemirror/modes/rst.js +486 -250
  68. data/vendor/assets/javascripts/codemirror/modes/sass.js +3 -3
  69. data/vendor/assets/javascripts/codemirror/modes/scss_test.js +80 -0
  70. data/vendor/assets/javascripts/codemirror/modes/shell.js +2 -2
  71. data/vendor/assets/javascripts/codemirror/modes/sieve.js +10 -10
  72. data/vendor/assets/javascripts/codemirror/modes/smalltalk.js +129 -129
  73. data/vendor/assets/javascripts/codemirror/modes/smarty.js +3 -3
  74. data/vendor/assets/javascripts/codemirror/modes/sparql.js +1 -1
  75. data/vendor/assets/javascripts/codemirror/modes/sql.js +23 -23
  76. data/vendor/assets/javascripts/codemirror/modes/stex.js +192 -121
  77. data/vendor/assets/javascripts/codemirror/modes/tcl.js +131 -0
  78. data/vendor/assets/javascripts/codemirror/modes/test.js +64 -0
  79. data/vendor/assets/javascripts/codemirror/modes/tiddlywiki.js +345 -345
  80. data/vendor/assets/javascripts/codemirror/modes/tiki.js +297 -298
  81. data/vendor/assets/javascripts/codemirror/modes/turtle.js +145 -0
  82. data/vendor/assets/javascripts/codemirror/modes/vb.js +31 -32
  83. data/vendor/assets/javascripts/codemirror/modes/vbscript.js +4 -4
  84. data/vendor/assets/javascripts/codemirror/modes/xml.js +10 -6
  85. data/vendor/assets/javascripts/codemirror/modes/xquery.js +55 -55
  86. data/vendor/assets/javascripts/codemirror/modes/yaml.js +90 -90
  87. data/vendor/assets/javascripts/codemirror/modes/z80.js +82 -110
  88. data/vendor/assets/javascripts/codemirror.js +1914 -1115
  89. data/vendor/assets/stylesheets/codemirror/{utils → addons/dialog}/dialog.css +0 -0
  90. data/vendor/assets/stylesheets/codemirror/addons/hint/show-hint.css +38 -0
  91. data/vendor/assets/stylesheets/codemirror/addons/lint/lint.css +96 -0
  92. data/vendor/assets/stylesheets/codemirror/modes/tiki.css +2 -2
  93. data/vendor/assets/stylesheets/codemirror/themes/ambiance-mobile.css +0 -1
  94. data/vendor/assets/stylesheets/codemirror/themes/ambiance.css +0 -1
  95. data/vendor/assets/stylesheets/codemirror/themes/eclipse.css +2 -2
  96. data/vendor/assets/stylesheets/codemirror/themes/erlang-dark.css +5 -5
  97. data/vendor/assets/stylesheets/codemirror/themes/midnight.css +52 -0
  98. data/vendor/assets/stylesheets/codemirror/themes/xq-light.css +43 -0
  99. data/vendor/assets/stylesheets/codemirror.css +16 -10
  100. metadata +60 -52
  101. data/vendor/assets/javascripts/codemirror/modes/mysql.js +0 -203
  102. data/vendor/assets/javascripts/codemirror/modes/plsql.js +0 -216
  103. data/vendor/assets/javascripts/codemirror/utils/collapserange.js +0 -68
  104. data/vendor/assets/javascripts/codemirror/utils/continuelist.js +0 -28
  105. data/vendor/assets/javascripts/codemirror/utils/foldcode.js +0 -183
  106. data/vendor/assets/javascripts/codemirror/utils/formatting.js +0 -114
  107. data/vendor/assets/javascripts/codemirror/utils/match-highlighter.js +0 -46
  108. data/vendor/assets/javascripts/codemirror/utils/simple-hint.js +0 -102
  109. data/vendor/assets/stylesheets/codemirror/utils/simple-hint.css +0 -16
@@ -8,7 +8,7 @@
8
8
  * Created: 05/17/2012 09:20:25 PM
9
9
  * Revision: none
10
10
  *
11
- * Author: Stas Kobzar (stas@modulis.ca),
11
+ * Author: Stas Kobzar (stas@modulis.ca),
12
12
  * Company: Modulis.ca Inc.
13
13
  *
14
14
  * =====================================================================================
@@ -99,9 +99,9 @@ CodeMirror.defineMode("asterisk", function() {
99
99
  state.extenStart = true;
100
100
  switch(cur) {
101
101
  case 'same': state.extenSame = true; break;
102
- case 'include':
103
- case 'switch':
104
- case 'ignorepat':
102
+ case 'include':
103
+ case 'switch':
104
+ case 'ignorepat':
105
105
  state.extenInclude = true;break;
106
106
  default:break;
107
107
  }
@@ -121,7 +121,7 @@ CodeMirror.defineMode("asterisk", function() {
121
121
  };
122
122
  },
123
123
  token: function(stream, state) {
124
-
124
+
125
125
  var cur = '';
126
126
  var ch = '';
127
127
  if(stream.eatSpace()) return null;
@@ -174,7 +174,7 @@ CodeMirror.defineMode("asterisk", function() {
174
174
  } else{
175
175
  return basicToken(stream,state);
176
176
  }
177
-
177
+
178
178
  return null;
179
179
  }
180
180
  };
@@ -222,7 +222,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
222
222
  });
223
223
  CodeMirror.defineMIME("text/x-java", {
224
224
  name: "clike",
225
- keywords: words("abstract assert boolean break byte case catch char class const continue default " +
225
+ keywords: words("abstract assert boolean break byte case catch char class const continue default " +
226
226
  "do double else enum extends final finally float for goto if implements import " +
227
227
  "instanceof int interface long native new package private protected public " +
228
228
  "return short static strictfp super switch synchronized this throw throws transient " +
@@ -238,12 +238,12 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
238
238
  });
239
239
  CodeMirror.defineMIME("text/x-csharp", {
240
240
  name: "clike",
241
- keywords: words("abstract as base break case catch checked class const continue" +
242
- " default delegate do else enum event explicit extern finally fixed for" +
243
- " foreach goto if implicit in interface internal is lock namespace new" +
244
- " operator out override params private protected public readonly ref return sealed" +
245
- " sizeof stackalloc static struct switch this throw try typeof unchecked" +
246
- " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
241
+ keywords: words("abstract as base break case catch checked class const continue" +
242
+ " default delegate do else enum event explicit extern finally fixed for" +
243
+ " foreach goto if implicit in interface internal is lock namespace new" +
244
+ " operator out override params private protected public readonly ref return sealed" +
245
+ " sizeof stackalloc static struct switch this throw try typeof unchecked" +
246
+ " unsafe using virtual void volatile while add alias ascending descending dynamic from get" +
247
247
  " global group into join let orderby partial remove select set value var yield"),
248
248
  blockKeywords: words("catch class do else finally for foreach if struct switch try while"),
249
249
  builtin: words("Boolean Byte Char DateTime DateTimeOffset Decimal Double" +
@@ -265,30 +265,30 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
265
265
  CodeMirror.defineMIME("text/x-scala", {
266
266
  name: "clike",
267
267
  keywords: words(
268
-
268
+
269
269
  /* scala */
270
270
  "abstract case catch class def do else extends false final finally for forSome if " +
271
271
  "implicit import lazy match new null object override package private protected return " +
272
272
  "sealed super this throw trait try trye type val var while with yield _ : = => <- <: " +
273
273
  "<% >: # @ " +
274
-
274
+
275
275
  /* package scala */
276
276
  "assert assume require print println printf readLine readBoolean readByte readShort " +
277
277
  "readChar readInt readLong readFloat readDouble " +
278
-
278
+
279
279
  "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " +
280
280
  "Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " +
281
281
  "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " +
282
282
  "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " +
283
283
  "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " +
284
-
285
- /* package java.lang */
284
+
285
+ /* package java.lang */
286
286
  "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " +
287
287
  "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " +
288
288
  "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " +
289
289
  "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void"
290
-
291
-
290
+
291
+
292
292
  ),
293
293
  blockKeywords: words("catch class do else finally for forSome if match switch try while"),
294
294
  atoms: words("true false null"),
@@ -3,7 +3,7 @@
3
3
  * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)
4
4
  */
5
5
  CodeMirror.defineMode("clojure", function () {
6
- var BUILTIN = "builtin", COMMENT = "comment", STRING = "string",
6
+ var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", CHARACTER = "string-2",
7
7
  ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD = "keyword";
8
8
  var INDENT_WORD_SKIP = 2;
9
9
 
@@ -14,12 +14,12 @@ CodeMirror.defineMode("clojure", function () {
14
14
  }
15
15
 
16
16
  var atoms = makeKeywords("true false nil");
17
-
17
+
18
18
  var keywords = makeKeywords(
19
19
  "defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle");
20
20
 
21
21
  var builtins = makeKeywords(
22
- "* *1 *2 *3 *agent* *allow-unresolved-vars* *assert *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - / < <= = == > >= accessor aclone agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? extend extend-protocol extend-type extends? extenders false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reify reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq");
22
+ "* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>");
23
23
 
24
24
  var indentKeys = makeKeywords(
25
25
  // Built-ins
@@ -44,8 +44,7 @@ CodeMirror.defineMode("clojure", function () {
44
44
  sign: /[+-]/,
45
45
  exponent: /e/i,
46
46
  keyword_char: /[^\s\(\[\;\)\]]/,
47
- basic: /[\w\$_\-]/,
48
- lang_keyword: /[\w*+!\-_?:\/]/
47
+ symbol: /[\w*+!\-\._?:\/]/
49
48
  };
50
49
 
51
50
  function stateStack(indent, type, prev) { // represents a state stack object
@@ -95,6 +94,20 @@ CodeMirror.defineMode("clojure", function () {
95
94
  return false;
96
95
  }
97
96
 
97
+ // Eat character that starts after backslash \
98
+ function eatCharacter(stream) {
99
+ var first = stream.next();
100
+ // Read special literals: backspace, newline, space, return.
101
+ // Just read all lowercase letters.
102
+ if (first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) {
103
+ return;
104
+ }
105
+ // Read unicode character: \u1000 \uA0a1
106
+ if (first === "u") {
107
+ stream.match(/[0-9a-z]{4}/i, true);
108
+ }
109
+ }
110
+
98
111
  return {
99
112
  startState: function () {
100
113
  return {
@@ -135,6 +148,9 @@ CodeMirror.defineMode("clojure", function () {
135
148
  if (ch == "\"") {
136
149
  state.mode = "string";
137
150
  returnType = STRING;
151
+ } else if (ch == "\\") {
152
+ eatCharacter(stream);
153
+ returnType = CHARACTER;
138
154
  } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) {
139
155
  returnType = ATOM;
140
156
  } else if (ch == ";") { // comment
@@ -178,10 +194,10 @@ CodeMirror.defineMode("clojure", function () {
178
194
  popStack(state);
179
195
  }
180
196
  } else if ( ch == ":" ) {
181
- stream.eatWhile(tests.lang_keyword);
197
+ stream.eatWhile(tests.symbol);
182
198
  return ATOM;
183
199
  } else {
184
- stream.eatWhile(tests.basic);
200
+ stream.eatWhile(tests.symbol);
185
201
 
186
202
  if (keywords && keywords.propertyIsEnumerable(stream.current())) {
187
203
  returnType = KEYWORD;
@@ -158,7 +158,7 @@ CodeMirror.defineMode('coffeescript', function(conf) {
158
158
  if (stream.match(identifiers)) {
159
159
  return 'variable';
160
160
  }
161
-
161
+
162
162
  if (stream.match(properties)) {
163
163
  return 'property';
164
164
  }
@@ -170,7 +170,7 @@ CodeMirror.defineMode('coffeescript', function(conf) {
170
170
 
171
171
  function tokenFactory(delimiter, outclass) {
172
172
  var singleline = delimiter.length == 1;
173
- return function tokenString(stream, state) {
173
+ return function(stream, state) {
174
174
  while (!stream.eol()) {
175
175
  stream.eatWhile(/[^'"\/\\]/);
176
176
  if (stream.eat('\\')) {