[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Emacs-mode, fontifying
From: |
Heikki Johannes Junes |
Subject: |
[PATCH] Emacs-mode, fontifying |
Date: |
Mon, 15 Apr 2002 03:26:42 +0300 (EET DST) |
The patch helps to proof-read the source by using colors (for example,
erronous "a,." now easier to see by an eye). Further comments within.
This patch is against latest CVS. I consider my earlier patch (-hjj2),
which was sent to HWN, not merged.
Index: VERSION
===================================================================
RCS file: /home/lilypond/lilypond/VERSION,v
retrieving revision 1.382
diff -p -u -r1.382 VERSION
--- VERSION 13 Apr 2002 11:26:14 -0000 1.382
+++ VERSION 15 Apr 2002 00:06:43 -0000
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=5
PATCH_LEVEL=52
-MY_PATCH_LEVEL=hjj1
+MY_PATCH_LEVEL=hjj3
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
Index: ChangeLog
===================================================================
RCS file: /home/lilypond/lilypond/ChangeLog,v
retrieving revision 1.80
diff -p -u -r1.80 ChangeLog
--- ChangeLog 13 Apr 2002 11:57:25 -0000 1.80
+++ ChangeLog 15 Apr 2002 00:06:45 -0000
@@ -1,3 +1,8 @@
+2002-04-15 Heikki Junes <address@hidden>
+
+ * lilypond-font-lock.el: Handle scheme-slurs up to seventh level.
+ Fontify notes more strictly.
+
2002-04-13 Heikki Junes <address@hidden>
* lilypond-mode.el: Prevent recoloring strings and comments.
Index: lilypond-font-lock.el
===================================================================
RCS file: /home/lilypond/lilypond/lilypond-font-lock.el,v
retrieving revision 1.14
diff -p -u -r1.14 lilypond-font-lock.el
--- lilypond-font-lock.el 13 Apr 2002 11:26:14 -0000 1.14
+++ lilypond-font-lock.el 15 Apr 2002 00:06:45 -0000
@@ -40,7 +40,7 @@
"\\(command\\)?spanrequest" "consists\\(end\\)?"
"context" "contrabasso" "\\(de\\)?cr" "default" "denies" "different" "dirs"
"down\\(bow\\|prall\\)?" "duration" "\\(dynamic\\|text\\)?script"
-"eccentric" "eg" "embeddedps" "elementdescriptions"
+"eccentric" "eg" "embeddedps" "elementdescriptions" "\\(end\\)?cresc"
"ex\\(treme\\)?" "fermata" "f+" "figures" "font" "flageolet" "fp" "fragment"
"s?fz" "gliss\\(ando\\)?" "gg" "gmsus" "grace" "gr\\(and\\)?staff"
"header" "\\(h\\|v\\)size" "in\\(clude\\|versions\\|visible\\)?"
@@ -126,8 +126,8 @@
(cons (concat "\\(" rwregex "\\)") 'font-lock-variable-name-face)
;; highlight note names; separate notes from (other than ')'-type) brackets
- '("\\([sR]\\(128\\|64\\|32\\|16\\|8\\|4\\|2\\|1\\)?[ ]*[*][0-9]+\\)"1
font-lock-type-face)
- '("[
<\{[~()\t\\\|]\\(\\(\\(\\(do\\|re\\|mi\\|fa\\|sol\\|la\\|si\\)\\(bb?\\|dd?\\|ss?\\)?\\)\\|\\([a-hsrR]\\(flat\\(flat\\)?\\|sharp\\(sharp\\)?\\|ff?\\|ss?\\|is\\(siss\\|s\\|is\\)?\\|es\\(sess\\|s\\|es\\)?\\)?\\)\\|\\(as\\(as\\|es\\)?\\)\\|\\(es\\(es\\)?\\)\\|\\(bb\\)\\)[,']*[?!]?\\(128\\|64\\|32\\|16\\|8\\|4\\|2\\|1\\)?[.]*\\)"
1 font-lock-type-face)
+ '("\\([sR]\\(\\(128\\|6?4\\|3?2\\|16?\\|8\\)[.]*\\)?[ \t]*[*][
\t]*[0-9]+\\)"1 font-lock-type-face)
+ '("[
<\{[~(!)\t\\\|]\\(\\(\\(do\\|re\\|[ms]i\\|[fl]a\\|sol\\)\\(bb?\\|dd?\\|ss?\\)?\\|asas\\|[ae]s\\(es\\)?\\|bb\\|[a-h]\\(flat\\(flat\\)?\\|sharp\\(sharp\\)?\\|ff?\\|ss?\\|is\\(siss\\|i?s\\)?\\|es\\(sess\\|e?s\\)?\\)?\\|[rsR]\\)[,']*[?!]?\\(\\(128\\|6?4\\|3?2\\|16?\\|8\\)[.]*\\)?\\)"
1 font-lock-type-face)
;; highlight identifiers
(cons (concat "\\([_^-]?\\(" iregex "\\)\\)+\\($\\|[]
\t(~{}>\\\\_-()^]\\)") '(0 font-lock-function-name-face t))
@@ -147,11 +147,11 @@
;; ties ~, slurs \( () \), hairpins \<, \>, end-of-hairpin \!,
'("\\(\\\\[(<!>)]\\|[(~)]\\)" 0 font-lock-builtin-face t)
-;; highlight scheme; Urgh. should count '(':s, then continue up to last ')'
-
'("[_^-]?#\\(#[ft]\\|['`](lines[^)]*))\\|['`][a-zA-Z-:]+\\|['`]?([^)]*)\\|-?[0-9.]+\\|\"[^\"]*\"\\)"
0 font-lock-string-face t)
+;; highlight scheme: handle slurs up to seventh level
+
'("[_^-]?#\\(#[ft]\\|-?[0-9.]+\\|\"[^\"]*\"\\|['`]?[a-zA-Z-:]+\\|['`]?([^()]*\\(([^()]*\\(([^()]*\\(([^()]*\\(([^()]*\\(([^()]*\\(([^)]*)[^()]*\\)*)[^()]*\\)*)[^()]*\\)*)[^()]*\\)*)[^()]*\\)*)[^()]*\\)*[^)]*)\\)"
0 font-lock-string-face t)
-;; highlight strings
- '("[_^-]?\"[^\"]*\"" 0 font-lock-string-face t)
+;; highlight strings: urgh. should hangle strings in strings, i.e., \\\"
+ '("\\([_^-]?\"[^\"]*\"\\)" 0 font-lock-string-face t)
;; highlight (block) comments; urgh. block comments should be updatable
'("\\(%\\({[^%]*%\\(}\\|\\([^}][^%]*%\\)+}\\)\\|.*\\)\\)" 0
font-lock-comment-face t)
--
Heikki Junes
- [PATCH] Emacs-mode, fontifying,
Heikki Johannes Junes <=