Merged from the latest developing branch.
[MacVim/jjgod.git] / runtime / syntax / lisp.vim
blobcd800e7203e346f62fa48e50a94e538ae9d5c1b8
1 " Vim syntax file
2 " Language:    Lisp
3 " Maintainer:  Dr. Charles E. Campbell, Jr. <NdrOchipS@PcampbellAfamily.Mbiz>
4 " Last Change: Apr 12, 2007
5 " Version:     19
6 " URL:         http://mysite.verizon.net/astronaut/vim/index.html#vimlinks_syntax
8 "  Thanks to F Xavier Noria for a list of 978 Common Lisp symbols
9 "  taken from the HyperSpec
11 " ---------------------------------------------------------------------
12 "  Load Once: {{{1
13 " For vim-version 5.x: Clear all syntax items
14 " For vim-version 6.x: Quit when a syntax file was already loaded
15 if version < 600
16   syntax clear
17 elseif exists("b:current_syntax")
18   finish
19 endif
21 if version >= 600
22  setlocal iskeyword=42,43,45,47-58,60-62,64-90,97-122,_
23 else
24  set iskeyword=42,43,45,47-58,60-62,64-90,97-122,_
25 endif
27 " ---------------------------------------------------------------------
28 " Clusters: {{{1
29 syn cluster                      lispAtomCluster                  contains=lispAtomBarSymbol,lispAtomList,lispAtomNmbr0,lispComment,lispDecl,lispFunc,lispLeadWhite
30 syn cluster                      lispBaseListCluster              contains=lispAtom,lispAtomBarSymbol,lispAtomMark,lispBQList,lispBarSymbol,lispComment,lispConcat,lispDecl,lispFunc,lispKey,lispList,lispNumber,lispSpecial,lispSymbol,lispVar,lispLeadWhite
31 if exists("g:lisp_instring")
32  syn cluster                     lispListCluster                  contains=@lispBaseListCluster,lispString,lispInString,lispInStringString
33 else
34  syn cluster                     lispListCluster                  contains=@lispBaseListCluster,lispString
35 endif
37 syn case ignore
39 " ---------------------------------------------------------------------
40 " Lists: {{{1
41 syn match                        lispSymbol                       contained                        ![^()'`,"; \t]\+!
42 syn match                        lispBarSymbol                    contained                        !|..\{-}|!
43 if exists("g:lisp_rainbow") && g:lisp_rainbow != 0
44  syn region lispParen0           matchgroup=hlLevel0 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen1 
45  syn region lispParen1 contained matchgroup=hlLevel1 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen2 
46  syn region lispParen2 contained matchgroup=hlLevel2 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen3 
47  syn region lispParen3 contained matchgroup=hlLevel3 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen4 
48  syn region lispParen4 contained matchgroup=hlLevel4 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen5 
49  syn region lispParen5 contained matchgroup=hlLevel5 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen6 
50  syn region lispParen6 contained matchgroup=hlLevel6 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen7 
51  syn region lispParen7 contained matchgroup=hlLevel7 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen8 
52  syn region lispParen8 contained matchgroup=hlLevel8 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen9 
53  syn region lispParen9 contained matchgroup=hlLevel9 start="`\=(" end=")" skip="|.\{-}|" contains=@lispListCluster,lispParen0
54 else
55  syn region                      lispList                         matchgroup=Delimiter start="("   skip="|.\{-}|"                           matchgroup=Delimiter end=")"        contains=@lispListCluster
56  syn region                      lispBQList                       matchgroup=PreProc   start="`("  skip="|.\{-}|"                   matchgroup=PreProc   end=")"                contains=@lispListCluster
57 endif
59 " ---------------------------------------------------------------------
60 " Atoms: {{{1
61 syn match                        lispAtomMark                     "'"
62 syn match                        lispAtom                         "'("me=e-1                       contains=lispAtomMark            nextgroup=lispAtomList
63 syn match                        lispAtom                         "'[^ \t()]\+"                    contains=lispAtomMark
64 syn match                        lispAtomBarSymbol                !'|..\{-}|!                      contains=lispAtomMark
65 syn region                       lispAtom                         start=+'"+                       skip=+\\"+ end=+"+
66 syn region                       lispAtomList                     contained                        matchgroup=Special start="("     skip="|.\{-}|" matchgroup=Special end=")"                         contains=@lispAtomCluster,lispString
67 syn match                        lispAtomNmbr                     contained                        "\<\d\+"
68 syn match                        lispLeadWhite                    contained                        "^\s\+"
70 " ---------------------------------------------------------------------
71 " Standard Lisp Functions and Macros: {{{1
72 syn keyword lispFunc             *                                find-method                      pprint-indent
73 syn keyword lispFunc             **                               find-package                     pprint-linear
74 syn keyword lispFunc             ***                              find-restart                     pprint-logical-block
75 syn keyword lispFunc             +                                find-symbol                      pprint-newline
76 syn keyword lispFunc             ++                               finish-output                    pprint-pop
77 syn keyword lispFunc             +++                              first                            pprint-tab
78 syn keyword lispFunc             -                                fixnum                           pprint-tabular
79 syn keyword lispFunc             /                                flet                             prin1
80 syn keyword lispFunc             //                               float                            prin1-to-string
81 syn keyword lispFunc             ///                              float-digits                     princ
82 syn keyword lispFunc             /=                               float-precision                  princ-to-string
83 syn keyword lispFunc             1+                               float-radix                      print
84 syn keyword lispFunc             1-                               float-sign                       print-not-readable
85 syn keyword lispFunc             <                                floating-point-inexact           print-not-readable-object
86 syn keyword lispFunc             <=                               floating-point-invalid-operation print-object
87 syn keyword lispFunc             =                                floating-point-overflow          print-unreadable-object
88 syn keyword lispFunc             >                                floating-point-underflow         probe-file
89 syn keyword lispFunc             >=                               floatp                           proclaim
90 syn keyword lispFunc             abort                            floor                            prog
91 syn keyword lispFunc             abs                              fmakunbound                      prog*
92 syn keyword lispFunc             access                           force-output                     prog1
93 syn keyword lispFunc             acons                            format                           prog2
94 syn keyword lispFunc             acos                             formatter                        progn
95 syn keyword lispFunc             acosh                            fourth                           program-error
96 syn keyword lispFunc             add-method                       fresh-line                       progv
97 syn keyword lispFunc             adjoin                           fround                           provide
98 syn keyword lispFunc             adjust-array                     ftruncate                        psetf
99 syn keyword lispFunc             adjustable-array-p               ftype                            psetq
100 syn keyword lispFunc             allocate-instance                funcall                          push
101 syn keyword lispFunc             alpha-char-p                     function                         pushnew
102 syn keyword lispFunc             alphanumericp                    function-keywords                putprop
103 syn keyword lispFunc             and                              function-lambda-expression       quote
104 syn keyword lispFunc             append                           functionp                        random
105 syn keyword lispFunc             apply                            gbitp                            random-state
106 syn keyword lispFunc             applyhook                        gcd                              random-state-p
107 syn keyword lispFunc             apropos                          generic-function                 rassoc
108 syn keyword lispFunc             apropos-list                     gensym                           rassoc-if
109 syn keyword lispFunc             aref                             gentemp                          rassoc-if-not
110 syn keyword lispFunc             arithmetic-error                 get                              ratio
111 syn keyword lispFunc             arithmetic-error-operands        get-decoded-time                 rational
112 syn keyword lispFunc             arithmetic-error-operation       get-dispatch-macro-character     rationalize
113 syn keyword lispFunc             array                            get-internal-real-time           rationalp
114 syn keyword lispFunc             array-dimension                  get-internal-run-time            read
115 syn keyword lispFunc             array-dimension-limit            get-macro-character              read-byte
116 syn keyword lispFunc             array-dimensions                 get-output-stream-string         read-char
117 syn keyword lispFunc             array-displacement               get-properties                   read-char-no-hang
118 syn keyword lispFunc             array-element-type               get-setf-expansion               read-delimited-list
119 syn keyword lispFunc             array-has-fill-pointer-p         get-setf-method                  read-eval-print
120 syn keyword lispFunc             array-in-bounds-p                get-universal-time               read-from-string
121 syn keyword lispFunc             array-rank                       getf                             read-line
122 syn keyword lispFunc             array-rank-limit                 gethash                          read-preserving-whitespace
123 syn keyword lispFunc             array-row-major-index            go                               read-sequence
124 syn keyword lispFunc             array-total-size                 graphic-char-p                   reader-error
125 syn keyword lispFunc             array-total-size-limit           handler-bind                     readtable
126 syn keyword lispFunc             arrayp                           handler-case                     readtable-case
127 syn keyword lispFunc             ash                              hash-table                       readtablep
128 syn keyword lispFunc             asin                             hash-table-count                 real
129 syn keyword lispFunc             asinh                            hash-table-p                     realp
130 syn keyword lispFunc             assert                           hash-table-rehash-size           realpart
131 syn keyword lispFunc             assoc                            hash-table-rehash-threshold      reduce
132 syn keyword lispFunc             assoc-if                         hash-table-size                  reinitialize-instance
133 syn keyword lispFunc             assoc-if-not                     hash-table-test                  rem
134 syn keyword lispFunc             atan                             host-namestring                  remf
135 syn keyword lispFunc             atanh                            identity                         remhash
136 syn keyword lispFunc             atom                             if                               remove
137 syn keyword lispFunc             base-char                        if-exists                        remove-duplicates
138 syn keyword lispFunc             base-string                      ignorable                        remove-if
139 syn keyword lispFunc             bignum                           ignore                           remove-if-not
140 syn keyword lispFunc             bit                              ignore-errors                    remove-method
141 syn keyword lispFunc             bit-and                          imagpart                         remprop
142 syn keyword lispFunc             bit-andc1                        import                           rename-file
143 syn keyword lispFunc             bit-andc2                        in-package                       rename-package
144 syn keyword lispFunc             bit-eqv                          in-package                       replace
145 syn keyword lispFunc             bit-ior                          incf                             require
146 syn keyword lispFunc             bit-nand                         initialize-instance              rest
147 syn keyword lispFunc             bit-nor                          inline                           restart
148 syn keyword lispFunc             bit-not                          input-stream-p                   restart-bind
149 syn keyword lispFunc             bit-orc1                         inspect                          restart-case
150 syn keyword lispFunc             bit-orc2                         int-char                         restart-name
151 syn keyword lispFunc             bit-vector                       integer                          return
152 syn keyword lispFunc             bit-vector-p                     integer-decode-float             return-from
153 syn keyword lispFunc             bit-xor                          integer-length                   revappend
154 syn keyword lispFunc             block                            integerp                         reverse
155 syn keyword lispFunc             boole                            interactive-stream-p             room
156 syn keyword lispFunc             boole-1                          intern                           rotatef
157 syn keyword lispFunc             boole-2                          internal-time-units-per-second   round
158 syn keyword lispFunc             boole-and                        intersection                     row-major-aref
159 syn keyword lispFunc             boole-andc1                      invalid-method-error             rplaca
160 syn keyword lispFunc             boole-andc2                      invoke-debugger                  rplacd
161 syn keyword lispFunc             boole-c1                         invoke-restart                   safety
162 syn keyword lispFunc             boole-c2                         invoke-restart-interactively     satisfies
163 syn keyword lispFunc             boole-clr                        isqrt                            sbit
164 syn keyword lispFunc             boole-eqv                        keyword                          scale-float
165 syn keyword lispFunc             boole-ior                        keywordp                         schar
166 syn keyword lispFunc             boole-nand                       labels                           search
167 syn keyword lispFunc             boole-nor                        lambda                           second
168 syn keyword lispFunc             boole-orc1                       lambda-list-keywords             sequence
169 syn keyword lispFunc             boole-orc2                       lambda-parameters-limit          serious-condition
170 syn keyword lispFunc             boole-set                        last                             set
171 syn keyword lispFunc             boole-xor                        lcm                              set-char-bit
172 syn keyword lispFunc             boolean                          ldb                              set-difference
173 syn keyword lispFunc             both-case-p                      ldb-test                         set-dispatch-macro-character
174 syn keyword lispFunc             boundp                           ldiff                            set-exclusive-or
175 syn keyword lispFunc             break                            least-negative-double-float      set-macro-character
176 syn keyword lispFunc             broadcast-stream                 least-negative-long-float        set-pprint-dispatch
177 syn keyword lispFunc             broadcast-stream-streams         least-negative-normalized-double-float                            set-syntax-from-char
178 syn keyword lispFunc             built-in-class                   least-negative-normalized-long-float                              setf
179 syn keyword lispFunc             butlast                          least-negative-normalized-short-float                             setq
180 syn keyword lispFunc             byte                             least-negative-normalized-single-float                            seventh
181 syn keyword lispFunc             byte-position                    least-negative-short-float       shadow
182 syn keyword lispFunc             byte-size                        least-negative-single-float      shadowing-import
183 syn keyword lispFunc             call-arguments-limit             least-positive-double-float      shared-initialize
184 syn keyword lispFunc             call-method                      least-positive-long-float        shiftf
185 syn keyword lispFunc             call-next-method                 least-positive-normalized-double-float                            short-float
186 syn keyword lispFunc             capitalize                       least-positive-normalized-long-float                              short-float-epsilon
187 syn keyword lispFunc             car                              least-positive-normalized-short-float                             short-float-negative-epsilon
188 syn keyword lispFunc             case                             least-positive-normalized-single-float                            short-site-name
189 syn keyword lispFunc             catch                            least-positive-short-float       signal
190 syn keyword lispFunc             ccase                            least-positive-single-float      signed-byte
191 syn keyword lispFunc             cdr                              length                           signum
192 syn keyword lispFunc             ceiling                          let                              simle-condition
193 syn keyword lispFunc             cell-error                       let*                             simple-array
194 syn keyword lispFunc             cell-error-name                  lisp                             simple-base-string
195 syn keyword lispFunc             cerror                           lisp-implementation-type         simple-bit-vector
196 syn keyword lispFunc             change-class                     lisp-implementation-version      simple-bit-vector-p
197 syn keyword lispFunc             char                             list                             simple-condition-format-arguments
198 syn keyword lispFunc             char-bit                         list*                            simple-condition-format-control
199 syn keyword lispFunc             char-bits                        list-all-packages                simple-error
200 syn keyword lispFunc             char-bits-limit                  list-length                      simple-string
201 syn keyword lispFunc             char-code                        listen                           simple-string-p
202 syn keyword lispFunc             char-code-limit                  listp                            simple-type-error
203 syn keyword lispFunc             char-control-bit                 load                             simple-vector
204 syn keyword lispFunc             char-downcase                    load-logical-pathname-translations                                simple-vector-p
205 syn keyword lispFunc             char-equal                       load-time-value                  simple-warning
206 syn keyword lispFunc             char-font                        locally                          sin
207 syn keyword lispFunc             char-font-limit                  log                              single-flaot-epsilon
208 syn keyword lispFunc             char-greaterp                    logand                           single-float
209 syn keyword lispFunc             char-hyper-bit                   logandc1                         single-float-epsilon
210 syn keyword lispFunc             char-int                         logandc2                         single-float-negative-epsilon
211 syn keyword lispFunc             char-lessp                       logbitp                          sinh
212 syn keyword lispFunc             char-meta-bit                    logcount                         sixth
213 syn keyword lispFunc             char-name                        logeqv                           sleep
214 syn keyword lispFunc             char-not-equal                   logical-pathname                 slot-boundp
215 syn keyword lispFunc             char-not-greaterp                logical-pathname-translations    slot-exists-p
216 syn keyword lispFunc             char-not-lessp                   logior                           slot-makunbound
217 syn keyword lispFunc             char-super-bit                   lognand                          slot-missing
218 syn keyword lispFunc             char-upcase                      lognor                           slot-unbound
219 syn keyword lispFunc             char/=                           lognot                           slot-value
220 syn keyword lispFunc             char<                            logorc1                          software-type
221 syn keyword lispFunc             char<=                           logorc2                          software-version
222 syn keyword lispFunc             char=                            logtest                          some
223 syn keyword lispFunc             char>                            logxor                           sort
224 syn keyword lispFunc             char>=                           long-float                       space
225 syn keyword lispFunc             character                        long-float-epsilon               special
226 syn keyword lispFunc             characterp                       long-float-negative-epsilon      special-form-p
227 syn keyword lispFunc             check-type                       long-site-name                   special-operator-p
228 syn keyword lispFunc             cis                              loop                             speed
229 syn keyword lispFunc             class                            loop-finish                      sqrt
230 syn keyword lispFunc             class-name                       lower-case-p                     stable-sort
231 syn keyword lispFunc             class-of                         machine-instance                 standard
232 syn keyword lispFunc             clear-input                      machine-type                     standard-char
233 syn keyword lispFunc             clear-output                     machine-version                  standard-char-p
234 syn keyword lispFunc             close                            macro-function                   standard-class
235 syn keyword lispFunc             clrhash                          macroexpand                      standard-generic-function
236 syn keyword lispFunc             code-char                        macroexpand-1                    standard-method
237 syn keyword lispFunc             coerce                           macroexpand-l                    standard-object
238 syn keyword lispFunc             commonp                          macrolet                         step
239 syn keyword lispFunc             compilation-speed                make-array                       storage-condition
240 syn keyword lispFunc             compile                          make-array                       store-value
241 syn keyword lispFunc             compile-file                     make-broadcast-stream            stream
242 syn keyword lispFunc             compile-file-pathname            make-char                        stream-element-type
243 syn keyword lispFunc             compiled-function                make-concatenated-stream         stream-error
244 syn keyword lispFunc             compiled-function-p              make-condition                   stream-error-stream
245 syn keyword lispFunc             compiler-let                     make-dispatch-macro-character    stream-external-format
246 syn keyword lispFunc             compiler-macro                   make-echo-stream                 streamp
247 syn keyword lispFunc             compiler-macro-function          make-hash-table                  streamup
248 syn keyword lispFunc             complement                       make-instance                    string
249 syn keyword lispFunc             complex                          make-instances-obsolete          string-capitalize
250 syn keyword lispFunc             complexp                         make-list                        string-char
251 syn keyword lispFunc             compute-applicable-methods       make-load-form                   string-char-p
252 syn keyword lispFunc             compute-restarts                 make-load-form-saving-slots      string-downcase
253 syn keyword lispFunc             concatenate                      make-method                      string-equal
254 syn keyword lispFunc             concatenated-stream              make-package                     string-greaterp
255 syn keyword lispFunc             concatenated-stream-streams      make-pathname                    string-left-trim
256 syn keyword lispFunc             cond                             make-random-state                string-lessp
257 syn keyword lispFunc             condition                        make-sequence                    string-not-equal
258 syn keyword lispFunc             conjugate                        make-string                      string-not-greaterp
259 syn keyword lispFunc             cons                             make-string-input-stream         string-not-lessp
260 syn keyword lispFunc             consp                            make-string-output-stream        string-right-strim
261 syn keyword lispFunc             constantly                       make-symbol                      string-right-trim
262 syn keyword lispFunc             constantp                        make-synonym-stream              string-stream
263 syn keyword lispFunc             continue                         make-two-way-stream              string-trim
264 syn keyword lispFunc             control-error                    makunbound                       string-upcase
265 syn keyword lispFunc             copy-alist                       map                              string/=
266 syn keyword lispFunc             copy-list                        map-into                         string<
267 syn keyword lispFunc             copy-pprint-dispatch             mapc                             string<=
268 syn keyword lispFunc             copy-readtable                   mapcan                           string=
269 syn keyword lispFunc             copy-seq                         mapcar                           string>
270 syn keyword lispFunc             copy-structure                   mapcon                           string>=
271 syn keyword lispFunc             copy-symbol                      maphash                          stringp
272 syn keyword lispFunc             copy-tree                        mapl                             structure
273 syn keyword lispFunc             cos                              maplist                          structure-class
274 syn keyword lispFunc             cosh                             mask-field                       structure-object
275 syn keyword lispFunc             count                            max                              style-warning
276 syn keyword lispFunc             count-if                         member                           sublim
277 syn keyword lispFunc             count-if-not                     member-if                        sublis
278 syn keyword lispFunc             ctypecase                        member-if-not                    subseq
279 syn keyword lispFunc             debug                            merge                            subsetp
280 syn keyword lispFunc             decf                             merge-pathname                   subst
281 syn keyword lispFunc             declaim                          merge-pathnames                  subst-if
282 syn keyword lispFunc             declaration                      method                           subst-if-not
283 syn keyword lispFunc             declare                          method-combination               substitute
284 syn keyword lispFunc             decode-float                     method-combination-error         substitute-if
285 syn keyword lispFunc             decode-universal-time            method-qualifiers                substitute-if-not
286 syn keyword lispFunc             defclass                         min                              subtypep
287 syn keyword lispFunc             defconstant                      minusp                           svref
288 syn keyword lispFunc             defgeneric                       mismatch                         sxhash
289 syn keyword lispFunc             define-compiler-macro            mod                              symbol
290 syn keyword lispFunc             define-condition                 most-negative-double-float       symbol-function
291 syn keyword lispFunc             define-method-combination        most-negative-fixnum             symbol-macrolet
292 syn keyword lispFunc             define-modify-macro              most-negative-long-float         symbol-name
293 syn keyword lispFunc             define-setf-expander             most-negative-short-float        symbol-package
294 syn keyword lispFunc             define-setf-method               most-negative-single-float       symbol-plist
295 syn keyword lispFunc             define-symbol-macro              most-positive-double-float       symbol-value
296 syn keyword lispFunc             defmacro                         most-positive-fixnum             symbolp
297 syn keyword lispFunc             defmethod                        most-positive-long-float         synonym-stream
298 syn keyword lispFunc             defpackage                       most-positive-short-float        synonym-stream-symbol
299 syn keyword lispFunc             defparameter                     most-positive-single-float       sys
300 syn keyword lispFunc             defsetf                          muffle-warning                   system
301 syn keyword lispFunc             defstruct                        multiple-value-bind              t
302 syn keyword lispFunc             deftype                          multiple-value-call              tagbody
303 syn keyword lispFunc             defun                            multiple-value-list              tailp
304 syn keyword lispFunc             defvar                           multiple-value-prog1             tan
305 syn keyword lispFunc             delete                           multiple-value-seteq             tanh
306 syn keyword lispFunc             delete-duplicates                multiple-value-setq              tenth
307 syn keyword lispFunc             delete-file                      multiple-values-limit            terpri
308 syn keyword lispFunc             delete-if                        name-char                        the
309 syn keyword lispFunc             delete-if-not                    namestring                       third
310 syn keyword lispFunc             delete-package                   nbutlast                         throw
311 syn keyword lispFunc             denominator                      nconc                            time
312 syn keyword lispFunc             deposit-field                    next-method-p                    trace
313 syn keyword lispFunc             describe                         nil                              translate-logical-pathname
314 syn keyword lispFunc             describe-object                  nintersection                    translate-pathname
315 syn keyword lispFunc             destructuring-bind               ninth                            tree-equal
316 syn keyword lispFunc             digit-char                       no-applicable-method             truename
317 syn keyword lispFunc             digit-char-p                     no-next-method                   truncase
318 syn keyword lispFunc             directory                        not                              truncate
319 syn keyword lispFunc             directory-namestring             notany                           two-way-stream
320 syn keyword lispFunc             disassemble                      notevery                         two-way-stream-input-stream
321 syn keyword lispFunc             division-by-zero                 notinline                        two-way-stream-output-stream
322 syn keyword lispFunc             do                               nreconc                          type
323 syn keyword lispFunc             do*                              nreverse                         type-error
324 syn keyword lispFunc             do-all-symbols                   nset-difference                  type-error-datum
325 syn keyword lispFunc             do-exeternal-symbols             nset-exclusive-or                type-error-expected-type
326 syn keyword lispFunc             do-external-symbols              nstring                          type-of
327 syn keyword lispFunc             do-symbols                       nstring-capitalize               typecase
328 syn keyword lispFunc             documentation                    nstring-downcase                 typep
329 syn keyword lispFunc             dolist                           nstring-upcase                   unbound-slot
330 syn keyword lispFunc             dotimes                          nsublis                          unbound-slot-instance
331 syn keyword lispFunc             double-float                     nsubst                           unbound-variable
332 syn keyword lispFunc             double-float-epsilon             nsubst-if                        undefined-function
333 syn keyword lispFunc             double-float-negative-epsilon    nsubst-if-not                    unexport
334 syn keyword lispFunc             dpb                              nsubstitute                      unintern
335 syn keyword lispFunc             dribble                          nsubstitute-if                   union
336 syn keyword lispFunc             dynamic-extent                   nsubstitute-if-not               unless
337 syn keyword lispFunc             ecase                            nth                              unread
338 syn keyword lispFunc             echo-stream                      nth-value                        unread-char
339 syn keyword lispFunc             echo-stream-input-stream         nthcdr                           unsigned-byte
340 syn keyword lispFunc             echo-stream-output-stream        null                             untrace
341 syn keyword lispFunc             ed                               number                           unuse-package
342 syn keyword lispFunc             eighth                           numberp                          unwind-protect
343 syn keyword lispFunc             elt                              numerator                        update-instance-for-different-class
344 syn keyword lispFunc             encode-universal-time            nunion                           update-instance-for-redefined-class
345 syn keyword lispFunc             end-of-file                      oddp                             upgraded-array-element-type
346 syn keyword lispFunc             endp                             open                             upgraded-complex-part-type
347 syn keyword lispFunc             enough-namestring                open-stream-p                    upper-case-p
348 syn keyword lispFunc             ensure-directories-exist         optimize                         use-package
349 syn keyword lispFunc             ensure-generic-function          or                               use-value
350 syn keyword lispFunc             eq                               otherwise                        user
351 syn keyword lispFunc             eql                              output-stream-p                  user-homedir-pathname
352 syn keyword lispFunc             equal                            package                          values
353 syn keyword lispFunc             equalp                           package-error                    values-list
354 syn keyword lispFunc             error                            package-error-package            vector
355 syn keyword lispFunc             etypecase                        package-name                     vector-pop
356 syn keyword lispFunc             eval                             package-nicknames                vector-push
357 syn keyword lispFunc             eval-when                        package-shadowing-symbols        vector-push-extend
358 syn keyword lispFunc             evalhook                         package-use-list                 vectorp
359 syn keyword lispFunc             evenp                            package-used-by-list             warn
360 syn keyword lispFunc             every                            packagep                         warning
361 syn keyword lispFunc             exp                              pairlis                          when
362 syn keyword lispFunc             export                           parse-error                      wild-pathname-p
363 syn keyword lispFunc             expt                             parse-integer                    with-accessors
364 syn keyword lispFunc             extended-char                    parse-namestring                 with-compilation-unit
365 syn keyword lispFunc             fboundp                          pathname                         with-condition-restarts
366 syn keyword lispFunc             fceiling                         pathname-device                  with-hash-table-iterator
367 syn keyword lispFunc             fdefinition                      pathname-directory               with-input-from-string
368 syn keyword lispFunc             ffloor                           pathname-host                    with-open-file
369 syn keyword lispFunc             fifth                            pathname-match-p                 with-open-stream
370 syn keyword lispFunc             file-author                      pathname-name                    with-output-to-string
371 syn keyword lispFunc             file-error                       pathname-type                    with-package-iterator
372 syn keyword lispFunc             file-error-pathname              pathname-version                 with-simple-restart
373 syn keyword lispFunc             file-length                      pathnamep                        with-slots
374 syn keyword lispFunc             file-namestring                  peek-char                        with-standard-io-syntax
375 syn keyword lispFunc             file-position                    phase                            write
376 syn keyword lispFunc             file-stream                      pi                               write-byte
377 syn keyword lispFunc             file-string-length               plusp                            write-char
378 syn keyword lispFunc             file-write-date                  pop                              write-line
379 syn keyword lispFunc             fill                             position                         write-sequence
380 syn keyword lispFunc             fill-pointer                     position-if                      write-string
381 syn keyword lispFunc             find                             position-if-not                  write-to-string
382 syn keyword lispFunc             find-all-symbols                 pprint                           y-or-n-p
383 syn keyword lispFunc             find-class                       pprint-dispatch                  yes-or-no-p
384 syn keyword lispFunc             find-if                          pprint-exit-if-list-exhausted    zerop
385 syn keyword lispFunc             find-if-not                      pprint-fill
387 syn match   lispFunc             "\<c[ad]\+r\>"
389 " ---------------------------------------------------------------------
390 " Lisp Keywords (modifiers): {{{1
391 syn keyword lispKey              :abort                           :from-end                        :overwrite
392 syn keyword lispKey              :adjustable                      :gensym                          :predicate
393 syn keyword lispKey              :append                          :host                            :preserve-whitespace
394 syn keyword lispKey              :array                           :if-does-not-exist               :pretty
395 syn keyword lispKey              :base                            :if-exists                       :print
396 syn keyword lispKey              :case                            :include                         :print-function
397 syn keyword lispKey              :circle                          :index                           :probe
398 syn keyword lispKey              :conc-name                       :inherited                       :radix
399 syn keyword lispKey              :constructor                     :initial-contents                :read-only
400 syn keyword lispKey              :copier                          :initial-element                 :rehash-size
401 syn keyword lispKey              :count                           :initial-offset                  :rehash-threshold
402 syn keyword lispKey              :create                          :initial-value                   :rename
403 syn keyword lispKey              :default                         :input                           :rename-and-delete
404 syn keyword lispKey              :defaults                        :internal                        :size
405 syn keyword lispKey              :device                          :io                              :start
406 syn keyword lispKey              :direction                       :junk-allowed                    :start1
407 syn keyword lispKey              :directory                       :key                             :start2
408 syn keyword lispKey              :displaced-index-offset          :length                          :stream
409 syn keyword lispKey              :displaced-to                    :level                           :supersede
410 syn keyword lispKey              :element-type                    :name                            :test
411 syn keyword lispKey              :end                             :named                           :test-not
412 syn keyword lispKey              :end1                            :new-version                     :type
413 syn keyword lispKey              :end2                            :nicknames                       :use
414 syn keyword lispKey              :error                           :output                          :verbose
415 syn keyword lispKey              :escape                          :output-file                     :version
416 syn keyword lispKey              :external
418 " ---------------------------------------------------------------------
419 " Standard Lisp Variables: {{{1
420 syn keyword lispVar              *applyhook*                      *load-pathname*                  *print-pprint-dispatch*
421 syn keyword lispVar              *break-on-signals*               *load-print*                     *print-pprint-dispatch*
422 syn keyword lispVar              *break-on-signals*               *load-truename*                  *print-pretty*
423 syn keyword lispVar              *break-on-warnings*              *load-verbose*                   *print-radix*
424 syn keyword lispVar              *compile-file-pathname*          *macroexpand-hook*               *print-readably*
425 syn keyword lispVar              *compile-file-pathname*          *modules*                        *print-right-margin*
426 syn keyword lispVar              *compile-file-truename*          *package*                        *print-right-margin*
427 syn keyword lispVar              *compile-file-truename*          *print-array*                    *query-io*
428 syn keyword lispVar              *compile-print*                  *print-base*                     *random-state*
429 syn keyword lispVar              *compile-verbose*                *print-case*                     *read-base*
430 syn keyword lispVar              *compile-verbose*                *print-circle*                   *read-default-float-format*
431 syn keyword lispVar              *debug-io*                       *print-escape*                   *read-eval*
432 syn keyword lispVar              *debugger-hook*                  *print-gensym*                   *read-suppress*
433 syn keyword lispVar              *default-pathname-defaults*      *print-length*                   *readtable*
434 syn keyword lispVar              *error-output*                   *print-level*                    *standard-input*
435 syn keyword lispVar              *evalhook*                       *print-lines*                    *standard-output*
436 syn keyword lispVar              *features*                       *print-miser-width*              *terminal-io*
437 syn keyword lispVar              *gensym-counter*                 *print-miser-width*              *trace-output*
439 " ---------------------------------------------------------------------
440 " Strings: {{{1
441 syn region                       lispString                       start=+"+ skip=+\\\\\|\\"+ end=+"+    contains=@Spell
442 if exists("g:lisp_instring")
443  syn region                      lispInString                     keepend matchgroup=Delimiter start=+"(+rs=s+1 skip=+|.\{-}|+ matchgroup=Delimiter end=+)"+ contains=@lispBaseListCluster,lispInStringString
444  syn region                      lispInStringString               start=+\\"+ skip=+\\\\+ end=+\\"+ contained
445 endif
447 " ---------------------------------------------------------------------
448 " Shared with Xlisp, Declarations, Macros, Functions: {{{1
449 syn keyword lispDecl             defmacro                         do-all-symbols                   labels
450 syn keyword lispDecl             defsetf                          do-external-symbols              let
451 syn keyword lispDecl             deftype                          do-symbols                       locally
452 syn keyword lispDecl             defun                            dotimes                          macrolet
453 syn keyword lispDecl             do*                              flet                             multiple-value-bind
455 " ---------------------------------------------------------------------
456 " Numbers: supporting integers and floating point numbers {{{1
457 syn match lispNumber             "-\=\(\.\d\+\|\d\+\(\.\d*\)\=\)\(e[-+]\=\d\+\)\="
459 syn match lispSpecial            "\*\w[a-z_0-9-]*\*"
460 syn match lispSpecial            !#|[^()'`,"; \t]\+|#!
461 syn match lispSpecial            !#x\x\+!
462 syn match lispSpecial            !#o\o\+!
463 syn match lispSpecial            !#b[01]\+!
464 syn match lispSpecial            !#\\[ -}\~]!
465 syn match lispSpecial            !#[':][^()'`,"; \t]\+!
466 syn match lispSpecial            !#([^()'`,"; \t]\+)!
467 syn match lispSpecial            !#\\\%(Space\|Newline\|Tab\|Page\|Rubout\|Linefeed\|Return\|Backspace\)!
469 syn match lispConcat             "\s\.\s"
470 syn match lispParenError         ")"
472 " ---------------------------------------------------------------------
473 " Comments: {{{1
474 syn cluster lispCommentGroup     contains=lispTodo,@Spell
475 syn match   lispComment          ";.*$"                           contains=@lispCommentGroup
476 syn region  lispCommentRegion    start="#|" end="|#"              contains=lispCommentRegion,@lispCommentGroup
477 syn keyword lispTodo             contained                        combak                           combak:                          todo                             todo:
479 " ---------------------------------------------------------------------
480 " Synchronization: {{{1
481 syn sync lines=100
483 " ---------------------------------------------------------------------
484 " Define Highlighting: {{{1
485 " For version 5.7 and earlier: only when not done already
486 " For version 5.8 and later: only when an item doesn't have highlighting yet
487 if version >= 508
488   command -nargs=+ HiLink hi def link <args>
490   HiLink lispCommentRegion       lispComment
491   HiLink lispAtomNmbr            lispNumber
492   HiLink lispAtomMark            lispMark
493   HiLink lispInStringString      lispString
495   HiLink lispAtom                Identifier
496   HiLink lispAtomBarSymbol       Special
497   HiLink lispBarSymbol           Special
498   HiLink lispComment             Comment
499   HiLink lispConcat              Statement
500   HiLink lispDecl                Statement
501   HiLink lispFunc                Statement
502   HiLink lispKey                 Type
503   HiLink lispMark                Delimiter
504   HiLink lispNumber              Number
505   HiLink lispParenError          Error
506   HiLink lispSpecial             Type
507   HiLink lispString              String
508   HiLink lispTodo                Todo
509   HiLink lispVar                 Statement
511   if exists("g:lisp_rainbow") && g:lisp_rainbow != 0
512    if &bg == "dark"
513     hi def hlLevel0 ctermfg=red         guifg=red1
514     hi def hlLevel1 ctermfg=yellow      guifg=orange1      
515     hi def hlLevel2 ctermfg=green       guifg=yellow1      
516     hi def hlLevel3 ctermfg=cyan        guifg=greenyellow  
517     hi def hlLevel4 ctermfg=magenta     guifg=green1       
518     hi def hlLevel5 ctermfg=red         guifg=springgreen1 
519     hi def hlLevel6 ctermfg=yellow      guifg=cyan1        
520     hi def hlLevel7 ctermfg=green       guifg=slateblue1   
521     hi def hlLevel8 ctermfg=cyan        guifg=magenta1     
522     hi def hlLevel9 ctermfg=magenta     guifg=purple1
523    else
524     hi def hlLevel0 ctermfg=red         guifg=red3
525     hi def hlLevel1 ctermfg=darkyellow  guifg=orangered3
526     hi def hlLevel2 ctermfg=darkgreen   guifg=orange2
527     hi def hlLevel3 ctermfg=blue        guifg=yellow3
528     hi def hlLevel4 ctermfg=darkmagenta guifg=olivedrab4
529     hi def hlLevel5 ctermfg=red         guifg=green4
530     hi def hlLevel6 ctermfg=darkyellow  guifg=paleturquoise3
531     hi def hlLevel7 ctermfg=darkgreen   guifg=deepskyblue4
532     hi def hlLevel8 ctermfg=blue        guifg=darkslateblue
533     hi def hlLevel9 ctermfg=darkmagenta guifg=darkviolet
534    endif
535   endif
537   delcommand HiLink
538 endif
540 let b:current_syntax = "lisp"
542 " ---------------------------------------------------------------------
543 " vim: ts=8 nowrap fdm=marker