File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 22
22
(instance? clojure.lang.MultiFn f)) :fn
23
23
:else :def )))
24
24
25
+ (def ^:private syntax-reserved-words
26
+ #{" contains" " oneline" " fold" " display" " extend" " concealends" " conceal"
27
+ " cchar" " contained" " containedin" " nextgroup" " transparent" " skipwhite"
28
+ " skipnl" " skipempty" })
29
+
30
+ ; ; Wrap the last characte[r] to get around Vim's errors re. reserved words
31
+ (defn- fix-reserved-words [w]
32
+ (if (syntax-reserved-words w)
33
+ (string/replace w #"(.)$" " [$1]" )
34
+ w))
35
+
25
36
(defn- syntax-keyword-statements [seq-name->var]
26
37
(mapv
27
38
(fn [[type sks]]
28
- (let [names (string/join \space (mapv first sks))]
39
+ (let [names (string/join \space (mapv ( comp fix-reserved-words str first) sks))]
29
40
(case type
30
41
:macro (str " syntax keyword clojureMacro " names)
31
42
:fn (str " syntax keyword clojureFunc " names)
You can’t perform that action at this time.
0 commit comments