]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4208/3: Emacs mode: recognize \this-is-a-command syntax
authorDavid Kastrup <dak@gnu.org>
Sun, 30 Nov 2014 13:52:22 +0000 (14:52 +0100)
committerDavid Kastrup <dak@gnu.org>
Sat, 6 Dec 2014 12:25:26 +0000 (13:25 +0100)
This is a late followup for

Issue 2702: Unify the lexer's idea of words and commands across all modes.

elisp/lilypond-font-lock.el

index 73a8df8f7d951b6d373c1d8beab88871b062ff92..be7b592635b5c9678f85347fafd55a6d2c066ea3 100644 (file)
@@ -58,8 +58,8 @@
 ;; ... keywords (defined above, see kwregex)
       (cons (concat "\\(\\([_^-]?\\(" kwregex "\\)\\)+\\)\\($\\|[] \t(~{}>\\\\_()^*-]\\)") '(1 font-lock-keyword-face))
 
-;; ... user defined identifiers \[a-zA-Z]+
-      '("\\([_^-]?\\\\\\([a-zA-Z][a-zA-Z]*\\)\\)" 1 font-lock-constant-face)
+;; ... user defined identifiers, roughly  \[a-zA-Z]+ with single - or _ in between.
+      '("\\([_^-]?\\\\\\([a-zA-Z[:nonascii:]]\\(?:[-_]?[a-zA-Z[:nonascii:]]\\)*\\)\\)" 1 font-lock-constant-face)
 
 ;; ... the left side of '=' -mark
       '("\\([_a-zA-Z.0-9-]+\\)[ \t]*=[ \t]*" 1 font-lock-variable-name-face)