" 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-finalizers call-super-fun call-super-method call-update-expander
syn keyword txl_keyword contained callf car caseq caseql
syn keyword txl_keyword contained casequal cat-str cat-streams cat-vec
syn keyword txl_keyword contained catch catenated-stream-p catenated-stream-push cdaaaar
syn keyword txl_keyword contained cdaaadr cdaaar cdaadar cdaaddr
syn keyword txl_keyword contained cdaadr cdaar cdadaar cdadadr
syn keyword txl_keyword contained cdadar cdaddar cdadddr cdaddr
syn keyword txl_keyword contained cdadr cdar cddaaar cddaadr
syn keyword txl_keyword contained cddaar cddadar cddaddr cddadr
syn keyword txl_keyword contained cddar cdddaar cdddadr cdddar
syn keyword txl_keyword contained cddddar cdddddr cddddr cdddr
syn keyword txl_keyword contained cddr cdr ceil chain
syn keyword txl_keyword contained chand chdir chmod chr-int
syn keyword txl_keyword contained chr-isalnum chr-isalpha chr-isascii chr-isblank
syn keyword txl_keyword contained chr-iscntrl chr-isdigit chr-isgraph chr-islower
syn keyword txl_keyword contained chr-isprint chr-ispunct chr-isspace chr-isunisp
syn keyword txl_keyword contained chr-isupper chr-isxdigit chr-num chr-str
syn keyword txl_keyword contained chr-str-set chr-tolower chr-toupper chrp
syn keyword txl_keyword contained clamp clear-error clear-struct close-stream
syn keyword txl_keyword contained closelog cmp-str collect-each collect-each*
syn keyword txl_keyword contained comb compl-span-str cond conda
syn keyword txl_keyword contained cons conses conses* consp
syn keyword txl_keyword contained constantp copy copy-alist copy-cons
syn keyword txl_keyword contained copy-hash copy-list copy-str copy-struct
syn keyword txl_keyword contained copy-vec cos count-if countq
syn keyword txl_keyword contained countql countqual cum-norm-dist daemon
syn keyword txl_keyword contained dec defex define-modify-macro define-place-macro
syn keyword txl_keyword contained defmacro defmeth defparm defparml
syn keyword txl_keyword contained defplace defstruct defsymacro defun
syn keyword txl_keyword contained defvar defvarl del delay
syn keyword txl_keyword contained delete-package display-width do dohash
syn keyword txl_keyword contained dotimes downcase-str drop drop-until
syn keyword txl_keyword contained drop-while 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 exception-subtype-p exec
syn keyword txl_keyword contained exit exit* exp expand-right
syn keyword txl_keyword contained expt exptmod false fboundp
syn keyword txl_keyword contained fifth fileno filter-equal filter-string-tree
syn keyword txl_keyword contained finalize find find-frame find-if
syn keyword txl_keyword contained find-max find-min find-package find-struct-type
syn keyword txl_keyword contained first fixnump flatcar flatcar*
syn keyword txl_keyword contained flatten flatten* flet flip
syn keyword txl_keyword contained flipargs flo-dig flo-epsilon flo-int
syn keyword txl_keyword contained flo-max flo-min flo-str floatp
syn keyword txl_keyword contained floor flush-stream fmakunbound for
syn keyword txl_keyword contained for* force fork format
syn keyword txl_keyword contained fourth fstat fun func-get-env
syn keyword txl_keyword contained func-get-form func-get-name func-set-env functionp
syn keyword txl_keyword contained gcd gen generate gensym
syn keyword txl_keyword contained gequal get-byte get-char get-clobber-expander
syn keyword txl_keyword contained get-delete-expander get-error get-error-str get-frames
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 ginterate giterate
syn keyword txl_keyword contained glob glob-altdirfunc glob-brace glob-err
syn keyword txl_keyword contained glob-mark glob-nocheck glob-noescape glob-nomagic
syn keyword txl_keyword contained glob-nosort glob-onlydir glob-period glob-tilde
syn keyword txl_keyword contained glob-tilde-check greater group-by gun
syn keyword txl_keyword contained handle handler-bind hash hash-alist
syn keyword txl_keyword contained hash-begin 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-next hash-pairs
syn keyword txl_keyword contained hash-proper-subset hash-revget hash-subset hash-uni
syn keyword txl_keyword contained hash-update hash-update-1 hash-values hashp
syn keyword txl_keyword contained have html-decode html-encode iapply
syn keyword txl_keyword contained identity ido if ifa
syn keyword txl_keyword contained iff iffi iflet ignerr
syn keyword txl_keyword contained in inc inc-indent indent-code
syn keyword txl_keyword contained indent-data indent-off inhash int-chr
syn keyword txl_keyword contained int-flo int-str integerp intern
syn keyword txl_keyword contained interp-fun-p interpose invoke-catch ip
syn keyword txl_keyword contained ipf isqrt itimer-prov itimer-real
syn keyword txl_keyword contained itimer-virtual juxt keep-if keep-if*
syn keyword txl_keyword contained keyword-package keywordp kill labels
syn keyword txl_keyword contained lambda last lazy-str lazy-str-force
syn keyword txl_keyword contained lazy-str-force-upto lazy-str-get-trailing-list lazy-stream-cons lazy-stringp
syn keyword txl_keyword contained lcm lcons lcons-fun lconsp
syn keyword txl_keyword contained ldiff length length-list length-str
syn keyword txl_keyword contained length-str-< length-str-<= length-str-> length-str->=
syn keyword txl_keyword contained length-vec lequal less let
syn keyword txl_keyword contained let* lexical-fun-p lexical-lisp1-binding lexical-var-p
syn keyword txl_keyword contained lib-version link lisp-parse list
syn keyword txl_keyword contained list* list-str list-vec 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 promisep prop proper-listp pset
syn keyword txl_keyword contained push pushhash pushnew put-byte
syn keyword txl_keyword contained put-char put-line put-lines put-string
syn keyword txl_keyword contained put-strings pwd qquote qref
syn keyword txl_keyword contained quote raise rand random
syn keyword txl_keyword contained random-fixnum random-state-p range range*
syn keyword txl_keyword contained range-regex rcomb read readlink
syn keyword txl_keyword contained real-time-stream-p reduce-left reduce-right ref
syn keyword txl_keyword contained refset regex-compile regex-parse regexp
syn keyword txl_keyword contained register-exception-subtypes regsub rehome-sym remhash
syn keyword txl_keyword contained remove-if remove-if* remove-path remq
syn keyword txl_keyword contained remq* remql remql* remqual
syn keyword txl_keyword contained remqual* rename-path repeat replace
syn keyword txl_keyword contained replace-list replace-str replace-struct replace-vec
syn keyword txl_keyword contained reset-struct 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 slotp 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-ensure static-slot-p static-slot-set
syn keyword txl_keyword contained stdlib str< str<= str=
syn keyword txl_keyword contained str> str>= stream-get-prop stream-set-prop
syn keyword txl_keyword contained streamp string-extend string-lt stringp
syn keyword txl_keyword contained struct-type struct-type-p structp sub
syn keyword txl_keyword contained sub-list sub-str sub-vec subtypep
syn keyword txl_keyword contained succ super super-method swap
syn keyword txl_keyword contained symacrolet symbol-function symbol-name symbol-package
syn keyword txl_keyword contained symbol-value symbolp symlink sys:*lisp1*
syn keyword txl_keyword contained sys:bad-slot-syntax sys:do-path-test sys:dwim-del sys:dwim-set
syn keyword txl_keyword contained sys:eval-err sys:expand sys:expr sys:fbind
syn keyword txl_keyword contained sys:gc sys:gc-set-delta sys:get-fb sys:get-vb
syn keyword txl_keyword contained sys:handle-bad-syntax sys:l1-setq sys:l1-val sys:lbind
syn keyword txl_keyword contained sys:lisp1-setq sys:lisp1-value sys:load sys:make-struct-type
syn keyword txl_keyword contained sys:mark-special sys:path-access sys:path-examine sys:path-test
syn keyword txl_keyword contained sys:path-test-mode sys:pl-expand sys:placelet-1 sys:prune-nil-inits
syn keyword txl_keyword contained sys:qquote sys:quasi sys:quasilist sys:reg-expand-nongreedy
syn keyword txl_keyword contained sys:reg-optimize sys:rplaca sys:rplacd sys:setq
syn keyword txl_keyword contained sys:setqf sys:splice sys:struct-lit sys:sym-clobber-expander
syn keyword txl_keyword contained sys:sym-delete-expander sys:sym-update-expander sys:top-fb sys:top-vb
syn keyword txl_keyword contained sys:trigger-load sys:unquote sys:var sys:with-saved-vars
syn keyword txl_keyword contained syslog system-package t take
syn keyword txl_keyword contained take-until take-while tan tb
syn keyword txl_keyword contained tc tenth test-set-indent-mode tf
syn keyword txl_keyword contained third throw throwf time
syn keyword txl_keyword contained time-fields-local time-fields-utc time-string-local time-string-utc
syn keyword txl_keyword contained time-struct-local time-struct-utc time-usec tofloat
syn keyword txl_keyword contained toint tok-str tok-where tostring
syn keyword txl_keyword contained tostringp tprint transpose tree-bind
syn keyword txl_keyword contained tree-case tree-find trie-add trie-compress
syn keyword txl_keyword contained trie-lookup-begin trie-lookup-feed-char trie-value-at trim-str
syn keyword txl_keyword contained true trunc trunc-rem tuples
syn keyword txl_keyword contained txr-case txr-case-impl txr-if txr-version
syn keyword txl_keyword contained txr-when typecase typeof typep
syn keyword txl_keyword contained umeth umethod unget-byte unget-char
syn keyword txl_keyword contained uniq unique unless unquote
syn keyword txl_keyword contained unsetenv until until* unwind-protect
syn keyword txl_keyword contained upcase-str update url-decode url-encode
syn keyword txl_keyword contained user-package usleep vec vec-list
syn keyword txl_keyword contained vec-push vec-set-length vecref vector
syn keyword txl_keyword contained vector-list vectorp w-continued w-coredump
syn keyword txl_keyword contained w-exitstatus w-ifcontinued w-ifexited w-ifsignaled
syn keyword txl_keyword contained w-ifstopped w-nohang w-stopsig w-termsig
syn keyword txl_keyword contained w-untraced wait weave when
syn keyword txl_keyword contained whenlet where while while*
syn keyword txl_keyword contained whilet width width-check with-clobber-expander
syn keyword txl_keyword contained with-delete-expander with-gensyms with-hash-iter with-in-string-byte-stream
syn keyword txl_keyword contained with-in-string-stream with-objects with-out-string-stream with-out-strlist-stream
syn keyword txl_keyword contained with-resources with-stream with-update-expander wrap
syn keyword txl_keyword contained wrap* zap zerop zip
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]\+"
syn match txr_chr "#\\o[0-7]\+"
syn match txr_chr "#\\[^ \t\nA-Za-z_0-9]"
syn match txr_chr "#\\[A-Za-z_0-9]\+"
syn match txr_ncomment ";.*"

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

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_list 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 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 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 start=+#\?\*\?"+ end=+["\n]+ contains=txr_stresc,txr_numesc,txr_badesc
syn region txr_quasilit 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 start="/" end="[/\n]" contains=txr_regesc,txr_numesc,txr_badesc
syn region txl_regex 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"

set lispwords=ado,ap,append-each,append-each*,aret,block,caseq,caseql,casequal,catch,collect-each,collect-each*,cond,conda,dec,defex,define-modify-macro,define-place-macro,defmacro,defmeth,defparm,defparml,defplace,defstruct,defsymacro,defun,defvar,defvarl,del,delay,do,dohash,dotimes,each,each*,flet,flip,for,for*,fun,gen,gun,handle,handler-bind,ido,if,ifa,iflet,ignerr,ip,labels,lambda,lcons,let,let*,load,mac-param-bind,macro-time,macrolet,meth,mlet,new,op,placelet,placelet*,pop,pprof,prof,prog1,progn,push,pushnew,ret,return,return-from,rlet,splice,symacrolet,sys:expr,sys:fbind,sys:l1-val,sys:lbind,sys:lisp1-value,sys:path-examine,sys:path-test,sys:placelet-1,sys:splice,sys:struct-lit,sys:unquote,sys:var,sys:with-saved-vars,tb,tc,tree-bind,tree-case,txr-case,txr-case-impl,txr-if,txr-when,typecase,umeth,unless,unquote,until,until*,unwind-protect,when,whenlet,while,while*,whilet,with-clobber-expander,with-delete-expander,with-gensyms,with-hash-iter,with-in-string-byte-stream,with-in-string-stream,with-objects,with-out-string-stream,with-out-strlist-stream,with-resources,with-stream,with-update-expander,zap,:method,:function,:init,:fini