[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))))
- [elpa] master 92166ba 13/79: Add no-fixture option., (continued)
- [elpa] master 92166ba 13/79: Add no-fixture option., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 8ea8c9c 15/79: Pass defun test with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master ea6b4ef 14/79: Increase test documentation., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 7975003 18/79: Pass ignored test with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master d8b5f03 12/79: Remove before-all and after-all., Jackson Ray Hamilton, 2015/06/13
- [elpa] master bc0cb0d 16/79: Pass lambda test with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 6090eb3 17/79: Pass quote test with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master f1ed39f 21/79: Pass comment and string tests with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master d146af8 23/79: Fix string coloring., Jackson Ray Hamilton, 2015/06/13
- [elpa] master aaf4835 20/79: Remove let-varlist data structure. Cleanup., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 49265ab 25/79: Simplify comment and string parsing.,
Jackson Ray Hamilton <=
- [elpa] master 52383b5 26/79: Handle octothorpes., Jackson Ray Hamilton, 2015/06/13
- [elpa] master a283883 24/79: Always colorize the remaining region., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 3d3c693 22/79: Pass interrupt test with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 966bd20 31/79: Add test for escape characters., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 7ab01e3 30/79: Fix ignored test., Jackson Ray Hamilton, 2015/06/13
- [elpa] master f88e21c 29/79: Ignore escaped characters., Jackson Ray Hamilton, 2015/06/13
- [elpa] master e06f1a6 27/79: Color comments and strings inside quotes., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 5a8186b 34/79: Color comments and strings inside defuns., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 4b25191 28/79: Refactor benchmarks. Improve benchmark reliability., Jackson Ray Hamilton, 2015/06/13
- [elpa] master f3697c0 35/79: Strings are sexps., Jackson Ray Hamilton, 2015/06/13