]> code.delx.au - gnu-emacs-elpa/commitdiff
Ignore escaped characters.
authorJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Sat, 30 May 2015 21:01:40 +0000 (14:01 -0700)
committerJackson Ray Hamilton <jackson@jacksonrayhamilton.com>
Sat, 30 May 2015 21:01:40 +0000 (14:01 -0700)
context-coloring.el

index 9b53fd13fb5ea6bc46a14b8dc5be563b4308de40..61f5a31a63571e0db6e814d05858ebb39e015c75 100644 (file)
@@ -668,7 +668,7 @@ provide visually \"instant\" updates at 60 frames per second.")
 (defun context-coloring-elisp-colorize-comments-and-strings-in-region (start end)
   (let (syntax-code)
     (goto-char start)
-    (while (> end (progn (skip-syntax-forward "^<\"" end)
+    (while (> end (progn (skip-syntax-forward "^<\"\\" end)
                          (point)))
       (setq syntax-code (context-coloring-get-syntax-code))
       (cond
@@ -676,13 +676,15 @@ provide visually \"instant\" updates at 60 frames per second.")
         (context-coloring-elisp-colorize-comment))
        ((= syntax-code context-coloring-STRING-QUOTE-CODE)
         (context-coloring-elisp-colorize-string))
+       ((= syntax-code context-coloring-ESCAPE-CODE)
+        (forward-char 2))
        (t
         (forward-char))))))
 
 (defun context-coloring-elisp-colorize-region (start end)
   (let (syntax-code)
     (goto-char start)
-    (while (> end (progn (skip-syntax-forward "^()w_'<\"" end)
+    (while (> end (progn (skip-syntax-forward "^()w_'<\"\\" end)
                          (point)))
       (setq syntax-code (context-coloring-get-syntax-code))
       (cond
@@ -695,6 +697,8 @@ provide visually \"instant\" updates at 60 frames per second.")
         (context-coloring-elisp-colorize-comment))
        ((= syntax-code context-coloring-STRING-QUOTE-CODE)
         (context-coloring-elisp-colorize-string))
+       ((= syntax-code context-coloring-ESCAPE-CODE)
+        (forward-char 2))
        (t
         (forward-char))))))