From f88e21c28038ccbe46c8e87446a78da53b6c515b Mon Sep 17 00:00:00 2001 From: Jackson Ray Hamilton Date: Sat, 30 May 2015 14:01:40 -0700 Subject: [PATCH] Ignore escaped characters. --- context-coloring.el | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/context-coloring.el b/context-coloring.el index 9b53fd13f..61f5a31a6 100644 --- a/context-coloring.el +++ b/context-coloring.el @@ -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)))))) -- 2.39.2