- (let* ((keywords '( ; need special order due to over[lapping] of words
-
-;; all letters are lowercase
-"accepts" "accompany" "addlyrics" "aeolian" "alias" "alternative"
-"apply" "arpeggio" "autochange" "bar" "break" "breathe" "breve"
-"beamintervals" "broken" "blend" "bcincipit" "char" "ch" "cg"
-"chord\\(s\\|stest\\|chordmodifiers\\)?"
-"clef \\(bass\\|treble\\|violin\\|tenor\\)?"
-"clipping" "cm" "coda" "complex" "commandspanrequest" "consists\\(end\\)?"
-"context" "contrabasso" "decr" "default" "denies" "different" "dirs"
-"down\\(bow\\|prall\\)?" "dorian" "duration" "dynamicscript"
-"eccentric" "eg" "embeddedps" "endincipit" "elementdescriptions"
-"ex\\(treme\\)?" "fermata" "f+" "font" "flageolet" "fp" "fragment" "fz"
-"gliss\\(ando\\)?" "global" "gg" "gmsus" "grace" "gr\\(and\\)?staff"
-"header" "hsize" "in\\(clude\\|versions\\|visible\\)?" "ionian"
-"key\\(s\\(ignature\\)?\\)?" "lag" "lheel" "line\\(break\\|prall\\)"
-"locrian" "longa" "lower" "ltoe" "lydian" "lyrics"
-"maintainer" "mark" "maxima" "mel\\(isma\\|ody\\)?" "midi" "major"
-"minor" "mixolydian" "mordent" "monstrous" "multipart" "music"
-"musicalpitch" "m\\(p\\|f\\|m\\)?" "name" "newpage" "noise\\(beat\\)?"
-"normal\\(key\\|size\\)" "note\\(name\\)?s" "nt?"
-"one\\(staff\\)?" "open" "outputproperty" "over\\(ride\\)?"
-"paper" "partcombine" "partial" "penalty" "phrygian" "pitch" "p+"
-"property" "pt" "prall\\(mordent\\|prall\\|up\\)?" "quickmeasure"
-"relative" "remove" "repeat" "rever\\(t\\|seturn\\)" "rf" "rheel" "rhythm"
-"right" "rtoe" "scales?" "scheme" "score" "scpaper" "script" "scscore" "sd"
-"segno" "sequential" "set\\(tings\\)?" "sf\\(f\\|z\\)?" "shortlong"
-"simultaneous" "singlepart" "skip" "small" "smarttranspose" "spanrequest"
-"staccato" "staff\\(height\\|space\\)" "start" "stop\\(ped\\)?"
-"st\\(paper\\|score\\)" "stuff" "stylesheet" "su" "tab" "tempo" "tenuto"
-"textscript" "thenotes" "thrd" "threevoice" "thumb" "tilt\\(down\\|up\\)"
-"timb" "times?" "timpani" "tiny" "toeters" "touch" "trans\\(lator\\|pose\\)"
-"trill" "trombe" "turn" "type" "t\\(wo\\(voice\\(steminvert\\)?\\)?\\)?"
-"un\\(der\\|set\\)" "up\\(bow\\|per\\|prall\\)?" "version"
-"viol\\(a\\|in\\(incipit\\)?\\|oncello\\)" "visible" "voicedefault" "vsize"
-"x" "zagers?" "z\\(eu\\|o\\)ger"
-
- ))
-
- (identifiers '(
-
-;; in principle, have one or more uppercase letters
-"\\(\\(BarNumbering\\|Choir\\|Grand\\|HaraKiri\\|OrchestralPart\\|Piano\\|Rhythmic\\)Staff\\|\\(Cue\\|Lyrics\\)?Voice\\|\\(Orchestral\\)?Score\\|ChordNames\\|Grace\\|Lyrics\\|StaffGroup\\|Thread\\)Context" ; *Context
-"\\(script\\|dots\\|dynamic\\|slur\\|stem\\|sustain\\|sostenuto\\|unaCorda\\|treCorde\\|tie\\|tuplet\\)\\(Both\\|Down\\|Up\\)" ; *(Both/Down/Up)
-"\\(slur\\|tie\\)\\(Dotted\\|Solid\\)" ; *(Dotted/Solid)
-"\\(autoBeam\\|cadenza\\|impro\\|turn\\)\\(Off\\|On\\)" ; *(On/Off)
-"\\(empty\\|fat\\)Text" ; *Text
-"shift\\(On+\\|Off\\|I\\|II\\|III\\|IV\\|V\\)" ; shift*
-"EasyNotation"
-"\\(hide\\|show\\)StaffSwitch"
-"\\(lower\\|upper\\)Voice"
-"voice\\(One\\|Two\\|Three\\|Four\\|B\\|C\\|D\\|E\\)" ; voice*
-"paper\\(Eleven\\|Sixteen\\|Thirteen\\|TwentySix\\)" ; paper*
-"\\(lower\\|upper\\)\\(Octave\\|One\\)" ; (lower/upper)*
-"hairyChord"
-"\\(Piano\\|Rhythmic\\)\\(Staff\\)?"
-"\\(clarinetti\\|fagotti\\|flauti\\|melodic\\|oboi\\|\\(quite\\|rather\\|somewhat\\)LongLyrics\\|violinoII?\\)?\\(Staff\\)?" ; *Staff
-"\\(archi\\|bassi\\|legni\\|ottoni\\|timpani\\|viole\\|violini\\)\\(Group\\)" ; *Group
-"melisma\\(End\\)?" "staff\\(One\\|Two\\)?" "rests\\(II\\)?" "specialKey"
-"noBreak" "paperTwentysix" "endHorizScript" "FontBody" "text(I)+"
-
- ))
-
- (reservedwords '(
-
-;; Other words which look nicer when colored
-"Accidentals" "autoBeamSettings" "BarLine" "Beam"
-"ChordName\\([s]?\\|s.[a-zA-Z]*\\)" "Grace\\(.[a-zA-Z]*\\)?"
-"\\(Grand\\|Piano\\)Staff" "Lyrics\\(.[a-zA-Z]*\\)?" "NoteHead"
-"Score\\(.[a-zA-Z]*\\)" "Stem" "Staff\\(Symbol\\)?" "TextScript"
-"TimeSignature" "Voice\\(.[a-zA-Z]*\\)?"
-
- ))
-
- (kwregex (mapconcat (lambda (x) (concat "\\\\" x)) keywords "\\|"))
- (iregex (mapconcat (lambda (x) (concat "\\\\" x)) identifiers "\\|"))
- (rwregex (mapconcat (lambda (x) (concat "" x)) reservedwords "\\|"))