]> git.donarmstrong.com Git - lilypond.git/blobdiff - elisp/lilypond-font-lock.el
* mf/GNUmakefile (FC_FIND): new function. Find ncsb using
[lilypond.git] / elisp / lilypond-font-lock.el
index c2e258a709bbe9d8f9c2d9d581414ee109f54b20..224ab779de2f48ca0e24ad61e3ff2e7d897bbd53 100644 (file)
@@ -93,7 +93,7 @@
 ;;               - brackets '{[]}'
 ;;               - ties '~'
 ;;               - ligatures \[, \]
-      '("\\(-?[][~}{]\\|\\\\[][]\\)" 0 font-lock-warning-face t)
+      '("\\(-?[][~}{]\\|\\\\[][]\\)" 0 font-lock-reference-face t)
 
 ;; "on top", ... vertical grouping:
 ;;               - '<>'-chord brackets with '\\'-voice sep., not marcato '->'
       (setq defaults (cons '( ?\( . "." ) (cons '( ?\) . "." ) defaults))))
     ;; In LilyPond the following chars serve as escape chars, e.g., c^> d-) e_( , 
     ;; but they may be set to punctuation chars, since inside strings they should not act as escape chars
-    (setq defaults (cons (if (memq ?\- not-punct) '( ?\- . "\\" ) '( ?\- . "." ) ) defaults))
-    (setq defaults (cons (if (memq ?\^ not-punct) '( ?\^ . "\\" ) '( ?\^ . "." ) ) defaults))
+    (setq defaults (cons (if (memq ?- not-punct) '( ?\- . "\\" ) '( ?\- . "." ) ) defaults))
+    (setq defaults (cons (if (memq ?^ not-punct) '( ?^ . "\\" ) '( ?^ . "." ) ) defaults))
     (setq defaults (cons (if (memq ?\_ not-punct) '( ?\_ . "\\" ) '( ?\_ . "." ) ) defaults))
     (mapcar (function
             (lambda (x) (modify-syntax-entry
   (setq context (parse-partial-sexp (point-min) (point)))
   (cond ((nth 3 context)) ; inside string
        ((nth 4 context)) ; inside a comment
-       ((eq (char-syntax (char-before (point))) ?\\)) ; found escape-char
-       ((and (eq (char-syntax (char-before (- (point) 1))) ?\\)
+       ((eq (char-syntax (or (char-before (point)) 0)) ?\\)) ; found escape-char
+       ((and (eq (char-syntax (or (char-before (- (point) 1)) 0)) ?\\)
              (memq (char-before (point)) '( ?\) ?\] )))) ; found escape-char
        ((memq (char-before (point)) '( ?\) ))
         (LilyPond-mode-set-syntax-table '( ?\( ?\) )))