;;
(defconst mudela-font-lock-keywords
- (let* ((keywords '(
- "accepts" "accidentals" "break" "bar" "cadenza" "clear"
- "clef" "cm" "consists" "contains" "duration" "absdynamic"
- "in" "translator" "type" "lyric" "key" "maininput" "melodic"
- "musical_pitch" "meter" "midi" "mm" "multi" "header"
- "notenames" "octave" "output" "partial" "paper" "plet"
- "property" "pt" "shape" "relative" "include" "score"
- "script" "skip" "table" "spandynamic" "symboltables"
- "tempo" "texid" "textstyle" "transpose" "version" "grouping"
+ (let* ((keywords '("spanrequest" "simultaneous" "sequential" "accepts"
+ "alternative" "bar" "breathe"
+ "cadenza" "chordmodifiers" "chords" "clef" "cm" "consists"
+ "consistsend" "context"
+ "duration" "font" "grace" "header" "in" "lyrics"
+ "key" "keysignature" "mark" "musicalpitch"
+ "time" "times" "midi" "mm" "name" "notenames"
+ "notes" "partial" "paper" "penalty" "property" "pt"
+ "relative" "remove" "repeat" "repetitions" "addlyrics"
+ "scm" "scmfile" "score" "script"
+ "shape" "skip" "textscript" "tempo" "translator" "transpose"
+ "type" "version"
))
(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.")
(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 "%{")
+ (setq comment-start-skip "%{") ;??
(make-local-variable 'comment-column)
(make-local-variable 'imenu-generic-expression)
(setq imenu-generic-expression mu-imenu-generic-expression)
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.