]> git.donarmstrong.com Git - lilypond.git/blobdiff - mudela-mode.el
release: 1.1.26
[lilypond.git] / mudela-mode.el
index f6ea3233e75b1e5b6da49d000e9ae8021a0cdbeb..6565db77fdb5334e8b363e6b31c34718ec1926fe 100644 (file)
 ;; 
 
 (defconst mudela-font-lock-keywords
-  (let* ((keywords '(
+  (let* ((keywords '("alternative" "repeat"
                     "accepts" "accidentals" "break" "bar" "cadenza" 
-                    "clef" "cm" "consists" "contains" "duration" "absdynamic" 
-                    "in" "translator" "type" "lyric" "key" "maininput" "notes"
-                    "musical_pitch" "meter" "midi" "mm" "header"
-                    "notenames" "octave" "output" "partial" "paper" "plet"
+                    "clef" "cm" "consists" "contains" "duration" 
+                    "absdynamic" "scmfile" "lyrics"
+                    "in" "translator" "type" "key" "maininput" "notes"
+                    "musical_pitch" "time" "midi" "mm" "header"
+                    "notenames" "octave" "output" "partial" "paper" "plet" "name"
                     "property" "pt" "shape" "relative" "include" "score"
-                    "script" "skip"  "table" "spandynamic" "symboltables"
+                    "scm" "scmfile"
+                    "script" "skip"  "table" "times" "spandynamic" "symboltables"
                     "tempo" "texid" "textstyle" "transpose" "version" "grouping"
                     ))
        (kwregex (mapconcat (lambda (x) (concat "\\\\" x))  keywords "\\|")))
 
     (list 
-     (cons (concat ".\\(" kwregex "\\)[^a-zA-Z]") 1)
-     (cons (concat "^\\(" kwregex "\\)[^a-zA-Z]") 1)
-     '(".\\(\\\\[a-zA-Z][a-zA-Z]*\\)" 1 font-lock-variable-name-face)
-     '("^[\t ]*\\([a-zA-Z][_a-zA-Z]*\\) *=" 1 font-lock-variable-name-face)     
+      (concat ".\\(" kwregex "\\)[^a-zA-Z]")
+      (concat "^\\(" kwregex "\\)[^a-zA-Z]")
+      '(".\\(\\\\[a-zA-Z][a-zA-Z]*\\)" 1 font-lock-variable-name-face)
+      '("^[\t ]*\\([a-zA-Z][_a-zA-Z]*\\) *=" 1 font-lock-variable-name-face)     
     ))
   "Additional expressions to highlight in Mudela mode.")
 
@@ -97,8 +99,8 @@
   (mapcar (function
           (lambda (x) (modify-syntax-entry
                        (car x) (cdr x) mu-mode-syntax-table)))
-         '(( ?\( . "()" ) ( ?\) . ")(" )
-           ( ?\[ . "(]" ) ( ?\] . ")[" )
+         '(( ?\( . "." ) ( ?\) . "." )
+           ( ?\[ . "." ) ( ?\] . "." )
            ( ?\{ . "(}" ) ( ?\} . "){" )
            ( ?\< . "(>" )( ?\> . ")>") 
            ( ?\$ . "." ) ( ?\% . "." ) ( ?\& . "." )
            ( ?\_ . "." )       
            ( ?\' . "w")        
            ( ?\" . "\"" )
-           ( ?\% . "<")        
+           ( ?\% . "<")
            ( ?\n . ">")
 
 ; FIXME
 
   )    
 
-(defconst mu-stringlit-re
-   "\"\\([^\"\n\\]\\|\\\\.\\)*\""      ; double-quoted
-  "Regexp matching a Mudela string literal.")
-
-
 (defconst mu-blank-or-comment-re "[ \t]*\\($\\|%\\)"
   "Regexp matching blank or comment lines.")
 
   (make-local-variable 'paragraph-start)
   (make-local-variable 'require-final-newline)
   (make-local-variable 'comment-start)
-  (setq comment-start "% ")
-  (setq comment-end "")
+  (make-local-variable 'block-comment-start)
+  (make-local-variable 'block-comment-end)  
+
+  (setq comment-end "\n"
+       comment-start          "%"
+       comment-start-skip     "%{? *"
+       block-comment-start     "%{"
+       block-comment-end       "%}"    
+       )
   (make-local-variable 'comment-end)
   (make-local-variable 'comment-start-skip)
   (setf comment-start-skip "%{")
        paragraph-separate     "^[ \t]*$"
        paragraph-start        "^[ \t]*$"
        require-final-newline  t
-       comment-start          "% "
-       comment-start-skip     "% *"
        comment-column         40
        indent-line-function    'indent-relative-maybe
        )
   (use-local-map mu-mode-map)
 
   ;; run the mode hook. mu-mode-hook use is deprecated
-  (if mudela-mode-hook
-      (run-hooks 'mudela-mode-hook)
-    (run-hooks 'mu-mode-hook)))
+  (run-hooks 'mudela-mode-hook)
+)
+
 
 (defun mu-keep-region-active ()
   ;; do whatever is necessary to keep the region active in XEmacs.