]> git.donarmstrong.com Git - lilypond.git/blobdiff - elisp/lilypond-font-lock.el
(Difficult tweaks):
[lilypond.git] / elisp / lilypond-font-lock.el
index 9e71ad6f0297264bfc4e6413477909f1ae540dd7..224ab779de2f48ca0e24ad61e3ff2e7d897bbd53 100644 (file)
   (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 '( ?\( ?\) )))