branch: elpa/scala-mode
commit af0e387461f32a6000d42bb92304b9578ab59133
Author: Heikki Vesalainen <heikkivesalai...@yahoo.com>
Commit: Heikki Vesalainen <heikkivesalai...@yahoo.com>

    Fixes #18: highlight escapes in strings after chars
---
 scala-mode-fontlock.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scala-mode-fontlock.el b/scala-mode-fontlock.el
index 219b79b..a67c607 100644
--- a/scala-mode-fontlock.el
+++ b/scala-mode-fontlock.el
@@ -295,9 +295,9 @@ Does not continue past limit.
 
 (defun scala-font-lock:mark-string-escapes (limit)
   (when (re-search-forward scala-syntax:string-escape-re limit t)
-    (let ((state (syntax-ppss (match-beginning 0))))
-      (goto-char (match-end 0))
-      (= (nth 3 state) ?\"))))
+    (goto-char (match-end 0))
+    (or (= (nth 3 (save-excursion (syntax-ppss (match-beginning 0)))) ?\")
+        (scala-font-lock:mark-string-escapes limit))))
 
 (defun scala-font-lock:mark-numberLiteral (re limit)
   (when (re-search-forward re limit t)

Reply via email to