]> git.donarmstrong.com Git - lilypond.git/blobdiff - lilypond-font-lock.el
* stepmake/stepmake/omf-targets.make (local-install): add
[lilypond.git] / lilypond-font-lock.el
index f6baa5c4a9783a990cae6124a0ab8a2bdd21f250..f8518df97c77309d750eea0714d51d29c46d680f 100644 (file)
@@ -11,7 +11,7 @@
 ;;         1992-1994 Tim Peters
 ;; Created:       Feb 1992
 ;; Version:       1.7.12
-;; Last Modified: 13DEC2003
+;; Last Modified: 26DEC2003
 ;; Keywords: lilypond languages music notation
 
 ;; This software is provided as-is, without express or implied
 ;; ... (v) the right and the left side of '='-marks.
 ;; ... (v) reserved words, e.g., FiguredBass.
 ;; ... (t) notes and rests
+;; "on top", ... (s) lyrics-mode
 ;; "on top", ... (w) horizontal grouping
 ;; "on top", ... (f) vertical grouping
 ;; "on top", ... (b) expressional grouping
-;; "on top", ... (s) lyrics-mode
 ;; "on top", ... (s) (multiline-)scheme; urgh. one should count the slurs
 ;; "on top", ... (s) strings
 ;; "on top", ... (c) (multiline-)comments
       (cons (concat "\\(" rwregex "\\)") 'font-lock-variable-name-face)
 
 ;; ... note or rest with (an accidental and) a duration (multiplied), e.g., b,?16.*3/4
-      '("\\(^\\|[ <\{[~(!)\t\\\|]\\)\\(\\(\\(\\(bb\\|as[ae]s\\|eses\\|\\(do\\|re\\|[ms]i\\|[fl]a\\|sol\\)\\(bb?\\|dd?\\|ss?\\)?\\)\\|\\([a-h]\\(\\(flat\\)+\\|\\(sharp\\)+\\|is\\(siss\\|i?s\\)?\\|es\\(sess\\|e?s\\)?\\|ff?\\|ss?\\)?\\)\\)[,']*[?!]?\\|[srR]\\)\\([ \t]*\\(128\\|6?4\\|3?2\\|16?\\|8\\|\\\\\\(breve\\|longa\\)\\)[.]*\\([ \t]*[*][ \t]*[0-9]+\\(/[1-9][0-9]*\\)?\\)?\\)\\)" 2 font-lock-type-face)
+      '("\\(^\\|[ <\{[/~(!)\t\\\|]\\)\\(\\(\\(\\(bb\\|as[ae]s\\|eses\\|\\(do\\|re\\|[ms]i\\|[fl]a\\|sol\\)\\(bb?\\|dd?\\|ss?\\)?\\)\\|\\([a-h]\\(\\(flat\\)+\\|\\(sharp\\)+\\|is\\(siss\\|i?s\\)?\\|es\\(sess\\|e?s\\)?\\|ff?\\|ss?\\)?\\)\\)[,']*[?!]?\\|[srR]\\)\\([ \t]*\\(128\\|6?4\\|3?2\\|16?\\|8\\|\\\\\\(breve\\|longa\\)\\)[.]*\\([ \t]*[*][ \t]*[0-9]+\\(/[1-9][0-9]*\\)?\\)?\\)\\)" 2 font-lock-type-face)
 ;; ... note or rest (with an accidental), e.g., b,? -- allows cis\longaX
-      '("\\(^\\|[ <\{[~(!)\t\\\|]\\)\\(\\(\\(bb\\|as[ae]s\\|eses\\|\\(do\\|re\\|[ms]i\\|[fl]a\\|sol\\)\\(bb?\\|dd?\\|ss?\\)?\\)\\|\\([a-h]\\(\\(flat\\)+\\|\\(sharp\\)+\\|is\\(siss\\|i?s\\)?\\|es\\(sess\\|e?s\\)?\\|ff?\\|ss?\\)?\\)\\)[,']*[?!]?\\|[srR]\\)" 2 font-lock-type-face)
+      '("\\(^\\|[ <\{[/~(!)\t\\\|]\\)\\(\\(\\(bb\\|as[ae]s\\|eses\\|\\(do\\|re\\|[ms]i\\|[fl]a\\|sol\\)\\(bb?\\|dd?\\|ss?\\)?\\)\\|\\([a-h]\\(\\(flat\\)+\\|\\(sharp\\)+\\|is\\(siss\\|i?s\\)?\\|es\\(sess\\|e?s\\)?\\|ff?\\|ss?\\)?\\)\\)[,']*[?!]?\\|[srR]\\)" 2 font-lock-type-face)
+
+;; "on top", ... lyrics-mode: fontify everything between '<'...'>' or '{'...'}'
+;            URGH, does not know anything about inner brackets.
+;            Multiple lines may need refontifying (C-c f).
+      '("\\(\\\\lyrics[^{<]*\\)\\({[^}]*\\|<[^>]*\\)" 2 font-lock-string-face t)
 
 ;; "on top", ... horizontal grouping:
 ;;               - brackets '{[]}'
 ;;               - hairpins \<, \>, \! 
       '("\\(\\\\[(<!>)]\\|[-^_]?[()]\\)" 0 font-lock-builtin-face t)
 
-;; "on top", ... lyrics-mode: fontify everything between '{' and '}'
-      '("\\(\\\\lyrics[^{]*{\\)\\([^}]*\\)" 2 font-lock-string-face t)
-
 ;; "on top", ... (multiline-)scheme: try find slurs up to 7th
       '("[_^-]?#\\(#[ft]\\|-?[0-9.]+\\|\"[^\"]*\"\\|['`]?[a-zA-Z-:]+\\|['`]?([^()]*\\(([^()]*\\(([^()]*\\(([^()]*\\(([^()]*\\(([^()]*\\(([^)]*)[^()]*\\)*)[^()]*\\)*)[^()]*\\)*)[^()]*\\)*)[^()]*\\)*)[^()]*\\)*[^)]*)\\)" 0 font-lock-string-face t)