emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 49265ab 25/79: Simplify comment and string parsing.


From: Jackson Ray Hamilton
Subject: [elpa] master 49265ab 25/79: Simplify comment and string parsing.
Date: Sun, 14 Jun 2015 00:05:26 +0000

branch: master
commit 49265ab975fbdda576a577fba6569f62a032f986
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>

    Simplify comment and string parsing.
---
 context-coloring.el |   20 +++-----------------
 1 files changed, 3 insertions(+), 17 deletions(-)

diff --git a/context-coloring.el b/context-coloring.el
index b000fd2..089236b 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -653,29 +653,15 @@ provide visually \"instant\" updates at 60 frames per 
second.")
 (defun context-coloring-elisp-colorize-comment ()
   (let ((start (point)))
     (context-coloring-elisp-increment-sexp-count)
-    (skip-syntax-forward "^>")
+    (context-coloring-forward-sws)
     (context-coloring-maybe-colorize-comments-and-strings
      start
      (point))))
 
 (defun context-coloring-elisp-colorize-string ()
-  (let ((start (point))
-        syntax-code)
+  (let ((start (point)))
     (context-coloring-elisp-increment-sexp-count)
-    ;; Move past the opening string delimiter.
-    (forward-char)
-    (while (progn
-             (skip-syntax-forward "^\\\"")
-             (setq syntax-code (context-coloring-get-syntax-code))
-             (cond
-              ((= syntax-code context-coloring-ESCAPE-CODE)
-               ;; If there was an escape char, keep going.
-               (forward-char 2)
-               t)
-              ((= syntax-code context-coloring-STRING-QUOTE-CODE)
-               ;; If the string ended, move outside it.
-               (forward-char)
-               nil))))
+    (forward-sexp)
     (context-coloring-maybe-colorize-comments-and-strings
      start
      (point))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]