1 ;; https://www.emacswiki.org/emacs/GenericMode
4 'quincer-mode
;; name of the mode to create
11 "clock") ;; some keywords
13 ;; comments. Require # preceded by space or at line-start
14 ;; otherwise the note 'f#' looks like a comment start
15 ("\\(\\(^\\)\\|\\( \\)\\)\\(#.*\\)$" (4 'font-lock-comment-face
))
17 ;; highlight output name in clock declaration
18 ("^clock[ ]*\\(\\sw*\\)[ ]*.*" (1 'font-lock-string-face
))
20 ;; highlignt output and voice names in voice declaration
21 ("^voice[ ]*\\(\\sw*\\)[ ]*\\(\\sw*\\)[ ]*.*"
22 (1 'font-lock-variable-name-face
) (2 'font-lock-string-face
))
24 ;; highlight event definition line
25 ("^\\(.\\) [^|\n]*$" (1 'font-lock-regexp-grouping-construct
))
27 ;; highlight tick line
28 ("^[0.'S|]\\{4,\\}$" .
'font-lock-function-name-face
)
30 ;; highlight notes, pipe and voice name in pattern line
31 ("^\\([^|]*\\)\\(|\\)[ ]*\\(\\sw*\\)$" (1 'font-lock-regexp-grouping-construct
)
32 (2 'font-lock-function-name-face
) (3 'font-lock-variable-name-face
))
34 '("\\.qn$") ;; files for which to activate this mode
35 nil
;; other functions to call
36 "A mode for quincer files" ;; doc string for this mode