summaryrefslogtreecommitdiffstats
path: root/txr.vim
blob: 40ff1ee739befb5a05360efd8a6b2b11a78e1bdf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
" VIM Syntax file for txr
" Kaz Kylheku <kaz@kylheku.com>

" INSTALL-HOWTO:
"
" 1. Create the directory .vim/syntax in your home directory and
"    put the files txr.vim and txl.vim into this directory.
" 2. In your .vimrc, add this command to associate *.txr and *.tl
"    files with the txr and txl filetypes:
"    :au BufRead,BufNewFile *.txr set filetype=txr | set lisp
"    :au BufRead,BufNewFile *.tl set filetype=txl | set lisp
"
" If you want syntax highlighting to be on automatically (for any language)
" you need to add ":syntax on" in your .vimrc also. But you knew that already!
"
" This file is generated by the genvim.txr script in the TXR source tree.

syn case match
syn spell toplevel

setlocal iskeyword=a-z,A-Z,48-57,!,$,&,*,+,-,:,<,=,>,?,\\,_,~,/

syn keyword txl_keyword contained %e% %pi% * *args*
syn keyword txl_keyword contained *args-full* *e* *flo-dig* *flo-epsilon*
syn keyword txl_keyword contained *flo-max* *flo-min* *full-args* *gensym-counter*
syn keyword txl_keyword contained *keyword-package* *lib-version* *listener-hist-len* *listener-multi-line-p*
syn keyword txl_keyword contained *pi* *place-clobber-expander* *place-delete-expander* *place-macro*
syn keyword txl_keyword contained *place-update-expander* *random-state* *self-path* *stddebug*
syn keyword txl_keyword contained *stderr* *stdin* *stdlog* *stdnull*
syn keyword txl_keyword contained *stdout* *system-package* *txr-version* *unhandled-hook*
syn keyword txl_keyword contained *user-package* + - /
syn keyword txl_keyword contained /= : :append :args
syn keyword txl_keyword contained :atime :auto :blksize :blocks
syn keyword txl_keyword contained :cdigit :chars :continue :counter
syn keyword txl_keyword contained :cspace :ctime :cword-char :decline
syn keyword txl_keyword contained :dev :digit :downcase :env
syn keyword txl_keyword contained :equal-based :fd :filter :fini
syn keyword txl_keyword contained :finish :from-current :from-end :from-start
syn keyword txl_keyword contained :from_html :frompercent :fromurl :fun
syn keyword txl_keyword contained :function :gap :gid :greedy
syn keyword txl_keyword contained :hextoint :init :ino :instance
syn keyword txl_keyword contained :into :lfilt :lines :list
syn keyword txl_keyword contained :longest :maxgap :maxtimes :method
syn keyword txl_keyword contained :mingap :mintimes :mode :mtime
syn keyword txl_keyword contained :name :named :next-spec :nlink
syn keyword txl_keyword contained :nothrow :prio :rdev :real-time
syn keyword txl_keyword contained :repeat-spec :resolve :rfilt :shortest
syn keyword txl_keyword contained :size :space :static :string
syn keyword txl_keyword contained :symacro :times :to_html :tofloat
syn keyword txl_keyword contained :toint :tonumber :topercent :tourl
syn keyword txl_keyword contained :uid :upcase :var :vars
syn keyword txl_keyword contained :weak-keys :weak-vals :whole :word-char
syn keyword txl_keyword contained < <= = >
syn keyword txl_keyword contained >= abort abs abs-path-p
syn keyword txl_keyword contained acons acons-new aconsql-new acos
syn keyword txl_keyword contained ado alist-nremove alist-remove all
syn keyword txl_keyword contained and andf ap apf
syn keyword txl_keyword contained append append* append-each append-each*
syn keyword txl_keyword contained apply aret ash asin
syn keyword txl_keyword contained assoc assql atan atan2
syn keyword txl_keyword contained atom bignump bindable bit
syn keyword txl_keyword contained block boundp break-str caaaaar
syn keyword txl_keyword contained caaaadr caaaar caaadar caaaddr
syn keyword txl_keyword contained caaadr caaar caadaar caadadr
syn keyword txl_keyword contained caadar caaddar caadddr caaddr
syn keyword txl_keyword contained caadr caar cadaaar cadaadr
syn keyword txl_keyword contained cadaar cadadar cadaddr cadadr
syn keyword txl_keyword contained cadar caddaar caddadr caddar
syn keyword txl_keyword contained cadddar caddddr cadddr caddr
syn keyword txl_keyword contained cadr call call-clobber-expander call-delete-expander
syn keyword txl_keyword contained call-super-fun call-super-method call-update-expander callf
syn keyword txl_keyword contained car caseq caseql casequal
syn keyword txl_keyword contained cat-str cat-streams cat-vec catch
syn keyword txl_keyword contained catenated-stream-p catenated-stream-push cdaaaar cdaaadr
syn keyword txl_keyword contained cdaaar cdaadar cdaaddr cdaadr
syn keyword txl_keyword contained cdaar cdadaar cdadadr cdadar
syn keyword txl_keyword contained cdaddar cdadddr cdaddr cdadr
syn keyword txl_keyword contained cdar cddaaar cddaadr cddaar
syn keyword txl_keyword contained cddadar cddaddr cddadr cddar
syn keyword txl_keyword contained cdddaar cdddadr cdddar cddddar
syn keyword txl_keyword contained cdddddr cddddr cdddr cddr
syn keyword txl_keyword contained cdr ceil chain chand
syn keyword txl_keyword contained chdir chmod chr-isalnum chr-isalpha
syn keyword txl_keyword contained chr-isascii chr-isblank chr-iscntrl chr-isdigit
syn keyword txl_keyword contained chr-isgraph chr-islower chr-isprint chr-ispunct
syn keyword txl_keyword contained chr-isspace chr-isunisp chr-isupper chr-isxdigit
syn keyword txl_keyword contained chr-num chr-str chr-str-set chr-tolower
syn keyword txl_keyword contained chr-toupper chrp clamp clear-error
syn keyword txl_keyword contained close-stream closelog cmp-str collect-each
syn keyword txl_keyword contained collect-each* comb compl-span-str cond
syn keyword txl_keyword contained conda cons conses conses*
syn keyword txl_keyword contained consp constantp copy copy-alist
syn keyword txl_keyword contained copy-cons copy-hash copy-list copy-str
syn keyword txl_keyword contained copy-struct copy-vec cos count-if
syn keyword txl_keyword contained countq countql countqual cum-norm-dist
syn keyword txl_keyword contained daemon dec define-modify-macro define-place-macro
syn keyword txl_keyword contained defmacro defparm defparml defplace
syn keyword txl_keyword contained defstruct defsymacro defun defvar
syn keyword txl_keyword contained defvarl del delay delete-package
syn keyword txl_keyword contained display-width do dohash dotimes
syn keyword txl_keyword contained downcase-str dup dupfd dwim
syn keyword txl_keyword contained each each* eighth empty
syn keyword txl_keyword contained endgrent endpwent ensure-dir env
syn keyword txl_keyword contained env-fbind env-hash env-vbind eq
syn keyword txl_keyword contained eql equal errno error
syn keyword txl_keyword contained eval evenp exec exit
syn keyword txl_keyword contained exit* exp expt exptmod
syn keyword txl_keyword contained false fboundp fifth fileno
syn keyword txl_keyword contained filter-equal filter-string-tree finalize find
syn keyword txl_keyword contained find-if find-max find-min find-package
syn keyword txl_keyword contained find-struct-type first fixnump flatcar
syn keyword txl_keyword contained flatcar* flatten flatten* flet
syn keyword txl_keyword contained flip flipargs flo-dig flo-epsilon
syn keyword txl_keyword contained flo-int flo-max flo-min flo-str
syn keyword txl_keyword contained floatp floor flush-stream fmakunbound
syn keyword txl_keyword contained for for* force fork
syn keyword txl_keyword contained format fourth fstat fun
syn keyword txl_keyword contained func-get-env func-get-form func-get-name func-set-env
syn keyword txl_keyword contained functionp gcd gen generate
syn keyword txl_keyword contained gensym gequal get-byte get-char
syn keyword txl_keyword contained get-clobber-expander get-delete-expander get-error get-error-str
syn keyword txl_keyword contained get-hash-userdata get-indent get-indent-mode get-line
syn keyword txl_keyword contained get-lines get-list-from-stream get-sig-handler get-string
syn keyword txl_keyword contained get-string-from-stream get-update-expander getegid getenv
syn keyword txl_keyword contained geteuid getgid getgrent getgrgid
syn keyword txl_keyword contained getgrnam getgroups gethash getitimer
syn keyword txl_keyword contained getpid getppid getpwent getpwnam
syn keyword txl_keyword contained getpwuid getuid giterate glob
syn keyword txl_keyword contained glob-altdirfunc glob-brace glob-err glob-mark
syn keyword txl_keyword contained glob-nocheck glob-noescape glob-nomagic glob-nosort
syn keyword txl_keyword contained glob-onlydir glob-period glob-tilde glob-tilde-check
syn keyword txl_keyword contained greater group-by gun hash
syn keyword txl_keyword contained hash-alist hash-construct hash-count hash-diff
syn keyword txl_keyword contained hash-eql hash-equal hash-from-pairs hash-isec
syn keyword txl_keyword contained hash-keys hash-list hash-pairs hash-proper-subset
syn keyword txl_keyword contained hash-revget hash-subset hash-uni hash-update
syn keyword txl_keyword contained hash-update-1 hash-values hashp have
syn keyword txl_keyword contained html-decode html-encode iapply identity
syn keyword txl_keyword contained ido if ifa iff
syn keyword txl_keyword contained iffi iflet ignerr in
syn keyword txl_keyword contained inc inc-indent indent-code indent-data
syn keyword txl_keyword contained indent-off inhash int-flo int-str
syn keyword txl_keyword contained integerp intern interp-fun-p interpose
syn keyword txl_keyword contained ip ipf isqrt itimer-prov
syn keyword txl_keyword contained itimer-real itimer-virtual juxt keep-if
syn keyword txl_keyword contained keep-if* keyword-package keywordp kill
syn keyword txl_keyword contained labels lambda last lazy-str
syn keyword txl_keyword contained lazy-str-force lazy-str-force-upto lazy-str-get-trailing-list lazy-stream-cons
syn keyword txl_keyword contained lazy-stringp lcm lcons lcons-fun
syn keyword txl_keyword contained lconsp ldiff length length-list
syn keyword txl_keyword contained length-str length-str-< length-str-<= length-str->
syn keyword txl_keyword contained length-str->= length-vec lequal less
syn keyword txl_keyword contained let let* lexical-fun-p lexical-lisp1-binding
syn keyword txl_keyword contained lexical-var-p lib-version link lisp-parse
syn keyword txl_keyword contained list list* list-str list-vector
syn keyword txl_keyword contained listp load log log-alert
syn keyword txl_keyword contained log-auth log-authpriv log-cons log-crit
syn keyword txl_keyword contained log-daemon log-debug log-emerg log-err
syn keyword txl_keyword contained log-info log-ndelay log-notice log-nowait
syn keyword txl_keyword contained log-odelay log-perror log-pid log-user
syn keyword txl_keyword contained log-warning log10 log2 logand
syn keyword txl_keyword contained logior lognot logtest logtrunc
syn keyword txl_keyword contained logxor lstat mac-param-bind macro-form-p
syn keyword txl_keyword contained macro-time macroexpand macroexpand-1 macrolet
syn keyword txl_keyword contained major make-catenated-stream make-env make-hash
syn keyword txl_keyword contained make-lazy-cons make-like make-package make-random-state
syn keyword txl_keyword contained make-similar-hash make-string-byte-input-stream make-string-input-stream make-string-output-stream
syn keyword txl_keyword contained make-strlist-output-stream make-struct make-struct-type make-sym
syn keyword txl_keyword contained make-time make-time-utc make-trie makedev
syn keyword txl_keyword contained makunbound mapcar mapcar* mapdo
syn keyword txl_keyword contained mapf maphash mappend mappend*
syn keyword txl_keyword contained mask match-fun match-regex match-regex-right
syn keyword txl_keyword contained match-regst match-regst-right match-str match-str-tree
syn keyword txl_keyword contained max member member-if memq
syn keyword txl_keyword contained memql memqual merge meth
syn keyword txl_keyword contained method min minor minusp
syn keyword txl_keyword contained mkdir mknod mkstring mlet
syn keyword txl_keyword contained mod multi multi-sort n-choose-k
syn keyword txl_keyword contained n-perm-k nconc new nil
syn keyword txl_keyword contained nilf ninth none not
syn keyword txl_keyword contained notf nreverse nthcdr null
syn keyword txl_keyword contained nullify num-chr num-str numberp
syn keyword txl_keyword contained oand oddp op open-command
syn keyword txl_keyword contained open-directory open-file open-fileno open-files
syn keyword txl_keyword contained open-files* open-pipe open-process open-tail
syn keyword txl_keyword contained openlog opip or orf
syn keyword txl_keyword contained package-alist package-name package-symbols packagep
syn keyword txl_keyword contained pad partition partition* partition-by
syn keyword txl_keyword contained path-blkdev-p path-chrdev-p path-dir-p path-executable-to-me-p
syn keyword txl_keyword contained path-exists-p path-file-p path-mine-p path-my-group-p
syn keyword txl_keyword contained path-newer path-older path-pipe-p path-private-to-me-p
syn keyword txl_keyword contained path-same-object path-setgid-p path-setuid-p path-sock-p
syn keyword txl_keyword contained path-sticky-p path-symlink-p path-writable-to-me-p perm
syn keyword txl_keyword contained pipe place-form-p placelet placelet*
syn keyword txl_keyword contained plusp poll poll-err poll-in
syn keyword txl_keyword contained poll-nval poll-out poll-pri poll-rdband
syn keyword txl_keyword contained poll-wrband pop pos pos-if
syn keyword txl_keyword contained pos-max pos-min posq posql
syn keyword txl_keyword contained posqual pppred ppred pprinl
syn keyword txl_keyword contained pprint pprof pred prinl
syn keyword txl_keyword contained print prof prog1 progn
syn keyword txl_keyword contained prop proper-listp pset push
syn keyword txl_keyword contained pushhash pushnew put-byte put-char
syn keyword txl_keyword contained put-line put-lines put-string put-strings
syn keyword txl_keyword contained pwd qquote qref quote
syn keyword txl_keyword contained raise rand random random-fixnum
syn keyword txl_keyword contained random-state-p range range* range-regex
syn keyword txl_keyword contained rcomb read readlink real-time-stream-p
syn keyword txl_keyword contained reduce-left reduce-right ref refset
syn keyword txl_keyword contained regex-compile regex-parse regexp regsub
syn keyword txl_keyword contained rehome-sym remhash remove-if remove-if*
syn keyword txl_keyword contained remove-path remq remq* remql
syn keyword txl_keyword contained remql* remqual remqual* rename-path
syn keyword txl_keyword contained repeat replace replace-list replace-str
syn keyword txl_keyword contained replace-vec rest ret retf
syn keyword txl_keyword contained return return-from reverse rlcp
syn keyword txl_keyword contained rlet rotate rperm rplaca
syn keyword txl_keyword contained rplacd run s-ifblk s-ifchr
syn keyword txl_keyword contained s-ifdir s-ififo s-iflnk s-ifmt
syn keyword txl_keyword contained s-ifreg s-ifsock s-irgrp s-iroth
syn keyword txl_keyword contained s-irusr s-irwxg s-irwxo s-irwxu
syn keyword txl_keyword contained s-isgid s-isuid s-isvtx s-iwgrp
syn keyword txl_keyword contained s-iwoth s-iwusr s-ixgrp s-ixoth
syn keyword txl_keyword contained s-ixusr search search-regex search-regst
syn keyword txl_keyword contained search-str search-str-tree second seek-stream
syn keyword txl_keyword contained select self-path seqp set
syn keyword txl_keyword contained set-diff set-hash-userdata set-indent set-indent-mode
syn keyword txl_keyword contained set-sig-handler setegid setenv seteuid
syn keyword txl_keyword contained setgid setgrent sethash setitimer
syn keyword txl_keyword contained setlogmask setpwent setuid seventh
syn keyword txl_keyword contained sh shift shuffle sig-abrt
syn keyword txl_keyword contained sig-alrm sig-bus sig-check sig-chld
syn keyword txl_keyword contained sig-cont sig-fpe sig-hup sig-ill
syn keyword txl_keyword contained sig-int sig-io sig-iot sig-kill
syn keyword txl_keyword contained sig-pipe sig-poll sig-prof sig-pwr
syn keyword txl_keyword contained sig-quit sig-segv sig-stkflt sig-stop
syn keyword txl_keyword contained sig-sys sig-term sig-trap sig-tstp
syn keyword txl_keyword contained sig-ttin sig-ttou sig-urg sig-usr1
syn keyword txl_keyword contained sig-usr2 sig-vtalrm sig-winch sig-xcpu
syn keyword txl_keyword contained sig-xfsz sign-extend sin sixth
syn keyword txl_keyword contained size-vec slot slot-p slotset
syn keyword txl_keyword contained some sort sort-group source-loc
syn keyword txl_keyword contained source-loc-str span-str special-operator-p special-var-p
syn keyword txl_keyword contained splice split split-str split-str-set
syn keyword txl_keyword contained sqrt sssucc ssucc stat
syn keyword txl_keyword contained static-slot static-slot-p static-slot-set stdlib
syn keyword txl_keyword contained str< str<= str= str>
syn keyword txl_keyword contained str>= stream-get-prop stream-set-prop streamp
syn keyword txl_keyword contained string-extend string-lt stringp struct-type
syn keyword txl_keyword contained struct-type-p structp sub sub-list
syn keyword txl_keyword contained sub-str sub-vec subtypep succ
syn keyword txl_keyword contained super super-method swap symacrolet
syn keyword txl_keyword contained symbol-function symbol-name symbol-package symbol-value
syn keyword txl_keyword contained symbolp symlink sys:*lisp1* sys:bad-slot-syntax
syn keyword txl_keyword contained sys:do-path-test sys:dwim-del sys:dwim-set sys:eval-err
syn keyword txl_keyword contained sys:expand sys:expr sys:fbind sys:gc
syn keyword txl_keyword contained sys:gc-set-delta sys:get-fb sys:get-vb sys:l1-setq
syn keyword txl_keyword contained sys:l1-val sys:lbind sys:lisp1-setq sys:lisp1-value
syn keyword txl_keyword contained sys:load sys:make-struct-type sys:mark-special sys:path-access
syn keyword txl_keyword contained sys:path-examine sys:path-test sys:path-test-mode sys:pl-expand
syn keyword txl_keyword contained sys:placelet-1 sys:qquote sys:quasi sys:quasilist
syn keyword txl_keyword contained sys:reg-expand-nongreedy sys:reg-optimize sys:rplaca sys:rplacd
syn keyword txl_keyword contained sys:setq sys:setqf sys:splice sys:struct-lit
syn keyword txl_keyword contained sys:sym-clobber-expander sys:sym-delete-expander sys:sym-update-expander sys:top-fb
syn keyword txl_keyword contained sys:top-vb sys:trigger-load sys:unquote sys:var
syn keyword txl_keyword contained sys:with-saved-vars syslog system-package t
syn keyword txl_keyword contained tan tb tc tenth
syn keyword txl_keyword contained test-set-indent-mode tf third throw
syn keyword txl_keyword contained throwf time time-fields-local time-fields-utc
syn keyword txl_keyword contained time-string-local time-string-utc time-struct-local time-struct-utc
syn keyword txl_keyword contained time-usec tofloat toint tok-str
syn keyword txl_keyword contained tok-where tostring tostringp tprint
syn keyword txl_keyword contained transpose tree-bind tree-case tree-find
syn keyword txl_keyword contained trie-add trie-compress trie-lookup-begin trie-lookup-feed-char
syn keyword txl_keyword contained trie-value-at trim-str true trunc
syn keyword txl_keyword contained trunc-rem tuples txr-case txr-case-impl
syn keyword txl_keyword contained txr-if txr-version txr-when typeof
syn keyword txl_keyword contained typep unget-byte unget-char uniq
syn keyword txl_keyword contained unique unless unquote unsetenv
syn keyword txl_keyword contained until until* unwind-protect upcase-str
syn keyword txl_keyword contained update url-decode url-encode user-package
syn keyword txl_keyword contained usleep vec vec-push vec-set-length
syn keyword txl_keyword contained vecref vector vector-list vectorp
syn keyword txl_keyword contained w-continued w-coredump w-exitstatus w-ifcontinued
syn keyword txl_keyword contained w-ifexited w-ifsignaled w-ifstopped w-nohang
syn keyword txl_keyword contained w-stopsig w-termsig w-untraced wait
syn keyword txl_keyword contained weave when whenlet where
syn keyword txl_keyword contained while while* whilet width
syn keyword txl_keyword contained width-check with-clobber-expander with-delete-expander with-gensyms
syn keyword txl_keyword contained with-resources with-update-expander wrap wrap*
syn keyword txl_keyword contained zap zerop zip

syn keyword txr_keyword contained accept all and assert
syn keyword txr_keyword contained bind block cases cat
syn keyword txr_keyword contained catch choose chr close
syn keyword txr_keyword contained coll collect defex deffilter
syn keyword txr_keyword contained define do elif else
syn keyword txr_keyword contained end eof eol fail
syn keyword txr_keyword contained filter finally flatten forget
syn keyword txr_keyword contained freeform fuzz gather if
syn keyword txr_keyword contained include last line load
syn keyword txr_keyword contained local maybe merge next
syn keyword txr_keyword contained none or output rebind
syn keyword txr_keyword contained rep repeat require set
syn keyword txr_keyword contained skip some text throw
syn keyword txr_keyword contained trailer try until var
syn match txr_error "\(@[ \t]*\)[*]\?[\t ]*."
syn match txr_atat "\(@[ \t]*\)@"
syn match txr_comment "\(@[ \t]*\)[#;].*"
syn match txr_contin "\(@[ \t]*\)\\$"
syn match txr_char "\(@[ \t]*\)\\."
syn match txr_error "\(@[ \t]*\)\\[xo]"
syn match txr_char "\(@[ \t]*\)\\x[0-9A-Fa-f]\+;\?"
syn match txr_char "\(@[ \t]*\)\\[0-7]\+;\?"
syn match txr_regdir "\(@[ \t]*\)/\(\\/\|[^/]\|\\\n\)*/"
syn match txr_hashbang "^#!.*"
syn match txr_nested_error "[^\t ]\+" contained
syn match txr_variable "\(@[ \t]*\)[*]\?[ \t]*[A-Za-z_][A-Za-z_0-9]*"
syn match txr_splicevar "@[ \t,*@]*[A-Za-z_][A-Za-z_0-9]*"
syn match txr_metanum "@\+[0-9]\+"
syn match txr_badesc "\\." contained
syn match txr_escat "\\@" contained
syn match txr_stresc "\\[abtnvfre\\ \n"`']" contained
syn match txr_numesc "\\x[0-9A-Fa-f]\+;\?" contained
syn match txr_numesc "\\[0-7]\+;\?" contained
syn match txr_regesc "\\[abtnvfre\\ \n/sSdDwW()\|.*?+~&%\[\]\-]" contained

syn match txr_chr "#\\x[0-9A-Fa-f]\+" contained
syn match txr_chr "#\\o[0-7]\+" contained
syn match txr_chr "#\\[^ \t\nA-Za-z_0-9]" contained
syn match txr_chr "#\\[A-Za-z_0-9]\+" contained
syn match txr_ncomment ";.*" contained

syn match txr_dot "\." contained
syn match txr_num "#x[+\-]\?[0-9A-Fa-f]\+" contained
syn match txr_num "#o[+\-]\?[0-7]\+" contained
syn match txr_num "#b[+\-]\?[01]\+" contained
syn match txr_ident "[A-Za-z_0-9!$%&*+\-<=>?\\_~]*[A-Za-z_!$%&*+\-<=>?\\_~^][A-Za-z_0-9!$%&*+\-<=>?\\_~^]*" contained
syn match txl_ident "[:@][A-Za-z_0-9!$%&*+\-<=>?\\_~^/]\+" contained
syn match txr_braced_ident "[:][A-Za-z_0-9!$%&*+\-<=>?\\_~^/]\+" contained
syn match txl_ident "[A-Za-z_0-9!$%&*+\-<=>?\\_~/]*[A-Za-z_!$%&*+\-<=>?\\_~^/#][A-Za-z_0-9!$%&*+\-<=>?\\_~^/#]*" contained
syn match txr_num "[+\-]\?[0-9]\+\([^A-Za-z_0-9!$%&*+\-<=>?\\_~^/#]\|\n\)"me=e-1 contained
syn match txr_badnum "[+\-]\?[0-9]*[.][0-9]\+\([eE][+\-]\?[0-9]\+\)\?[A-Za-z_!$%&*+\-<=>?\\_~^/#]\+" contained
syn match txr_num "[+\-]\?[0-9]*[.][0-9]\+\([eE][+\-]\?[0-9]\+\)\?\([^A-Za-z_0-9!$%&*+\-<=>?\\_~^/#]\|\n\)"me=e-1 contained
syn match txr_num "[+\-]\?[0-9]\+\([eE][+\-]\?[0-9]\+\)\([^A-Za-z_0-9!$%&*+\-<=>?\\_~^/#]\|\n\)"me=e-1 contained
syn match txl_ident ":" contained
syn match txl_splice "[ \t,]\|,[*]" contained

syn match txr_unquote "," contained
syn match txr_splice ",\*" contained
syn match txr_quote "'" contained
syn match txr_quote "\^" contained
syn match txr_dotdot "\.\." contained
syn match txr_metaat "@" contained

syn region txr_bracevar matchgroup=Delimiter start="@[ \t]*[*]\?{" matchgroup=Delimiter end="}" contains=txr_num,txl_ident,txl_splice,txl_metanum,txr_metaat,txr_braced_ident,txr_dot,txr_dotdot,txr_string,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_regex,txr_quasilit,txr_chr,txl_splice,txr_nested_error
syn region txr_directive matchgroup=Delimiter start="@[ \t]*(" matchgroup=Delimiter end=")" contains=txr_keyword,txr_string,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_num,txr_badnum,txl_ident,txl_regex,txr_string,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_metaat,txr_ncomment,txr_nested_error
syn region txr_list contained matchgroup=Delimiter start="#\?H\?(" matchgroup=Delimiter end=")" contains=txl_keyword,txr_string,txl_regex,txr_num,txr_badnum,txl_ident,txr_metanum,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_metaat,txr_ncomment,txr_nested_error
syn region txr_bracket contained matchgroup=Delimiter start="\[" matchgroup=Delimiter end="\]" contains=txl_keyword,txr_string,txl_regex,txr_num,txr_badnum,txl_ident,txr_metanum,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_metaat,txr_ncomment,txr_nested_error
syn region txr_mlist contained matchgroup=Delimiter start="@[ \t^',]*(" matchgroup=Delimiter end=")" contains=txl_keyword,txr_string,txl_regex,txr_num,txr_badnum,txl_ident,txr_metanum,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_metaat,txr_ncomment,txr_nested_error
syn region txr_mbracket matchgroup=Delimiter start="@[ \t^',]*\[" matchgroup=Delimiter end="\]" contains=txl_keyword,txr_string,txl_regex,txr_num,txr_badnum,txl_ident,txr_metanum,txr_list,txr_bracket,txr_mlist,txr_mbracket,txr_quasilit,txr_chr,txr_quote,txr_unquote,txr_splice,txr_dot,txr_dotdot,txr_metaat,txr_ncomment,txr_nested_error
syn region txr_string contained start=+#\?\*\?"+ end=+["\n]+ contains=txr_stresc,txr_numesc,txr_badesc
syn region txr_quasilit contained start=+#\?\*\?`+ end=+[`\n]+ contains=txr_splicevar,txr_metanum,txr_bracevar,txr_mlist,txr_mbracket,txr_escat,txr_stresc,txr_numesc,txr_badesc
syn region txr_regex contained start="/" end="[/\n]" contains=txr_regesc,txr_numesc,txr_badesc
syn region txl_regex contained start="#/" end="[/\n]" contains=txr_regesc,txr_numesc,txr_badesc

hi def link txr_at Special
hi def link txr_atstar Special
hi def link txr_atat Special
hi def link txr_comment Comment
hi def link txr_ncomment Comment
hi def link txr_hashbang Preproc
hi def link txr_contin Preproc
hi def link txr_char String
hi def link txr_keyword Keyword
hi def link txl_keyword Type
hi def link txr_string String
hi def link txr_chr String
hi def link txr_quasilit String
hi def link txr_regex String
hi def link txl_regex String
hi def link txr_regdir String
hi def link txr_variable Identifier
hi def link txr_splicevar Identifier
hi def link txr_metanum Identifier
hi def link txr_escat Special
hi def link txr_stresc Special
hi def link txr_numesc Special
hi def link txr_regesc Special
hi def link txr_badesc Error
hi def link txr_ident Identifier
hi def link txl_ident Identifier
hi def link txr_num Number
hi def link txr_badnum Error
hi def link txr_quote Special
hi def link txr_unquote Special
hi def link txr_splice Special
hi def link txr_dot Special
hi def link txr_dotdot Special
hi def link txr_metaat Special
hi def link txr_munqspl Special
hi def link txl_splice Special
hi def link txr_error Error
hi def link txr_nested_error Error

let b:current_syntax = "lisp"