[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 2ee41c1 52/79: Add comments and strings to condition-case
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 2ee41c1 52/79: Add comments and strings to condition-case test. |
Date: |
Sun, 14 Jun 2015 00:05:39 +0000 |
branch: master
commit 2ee41c15f6f319f8463520278733f77b44619619
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Add comments and strings to condition-case test.
---
context-coloring.el | 16 ++++++++++++----
test/context-coloring-test.el | 4 +++-
test/fixtures/condition-case.el | 4 +++-
3 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index de22014..afc05e4 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -288,6 +288,14 @@ them along the way."
(context-coloring-elisp-colorize-comments-and-strings-in-region
start (point))))
+(defsubst context-coloring-elisp-forward-sexp ()
+ "Like `forward-sexp', but colorize comments and strings along
+the way."
+ (let ((start (point)))
+ (forward-sexp)
+ (context-coloring-elisp-colorize-comments-and-strings-in-region
+ start (point))))
+
(defsubst context-coloring-get-syntax-code ()
(syntax-class
;; Faster version of `syntax-after':
@@ -412,7 +420,7 @@ provide visually \"instant\" updates at 60 frames per
second.")
(defsubst context-coloring-elisp-parse-arg (callback)
(let* ((arg-string (buffer-substring-no-properties
(point)
- (progn (forward-sexp)
+ (progn (context-coloring-elisp-forward-sexp)
(point)))))
(when (not (string-match-p
context-coloring-ignored-word-regexp
@@ -614,7 +622,7 @@ provide visually \"instant\" updates at 60 frames per
second.")
(cond
((= syntax-code context-coloring-OPEN-PARENTHESIS-CODE)
(setq case-pos (point))
- (forward-sexp)
+ (context-coloring-elisp-forward-sexp)
(setq case-end (point))
(goto-char case-pos)
;; Enter.
@@ -623,7 +631,7 @@ provide visually \"instant\" updates at 60 frames per
second.")
(setq syntax-code (context-coloring-get-syntax-code))
(when (/= syntax-code context-coloring-CLOSE-PARENTHESIS-CODE)
;; Skip the condition name(s).
- (forward-sexp)
+ (context-coloring-elisp-forward-sexp)
;; Color the remaining portion of the handler.
(context-coloring-elisp-colorize-region
(point)
@@ -632,7 +640,7 @@ provide visually \"instant\" updates at 60 frames per
second.")
(forward-char))
(t
;; Ignore artifacts.
- (forward-sexp)))
+ (context-coloring-elisp-forward-sexp)))
(context-coloring-elisp-forward-sws))
;; Exit.
(forward-char)
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index 2cfd64a..e6e6a59 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -1173,8 +1173,10 @@ ssssssssssss0"))
1111111 111111 111 000011
(111111111-1111-111111-11111 111
+ cc c
(xxx () 222)
- (11111 (xxx () 222)))")))
+ (11111 (xxx () 222))
+ sss)")))
(defun context-coloring-test-insert-unread-space ()
"Simulate the insertion of a space as if by a user."
diff --git a/test/fixtures/condition-case.el b/test/fixtures/condition-case.el
index bdbca7e..151f591 100644
--- a/test/fixtures/condition-case.el
+++ b/test/fixtures/condition-case.el
@@ -4,5 +4,7 @@
((debug error) err free))
(condition-case-unless-debug nil
+ ;; c
(let () nil)
- (error (let () nil)))
+ (error (let () nil))
+ "s")
- [elpa] master 872bf5f 46/79: Bump required scopifier version., (continued)
- [elpa] master 872bf5f 46/79: Bump required scopifier version., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 2258572 39/79: Optimize. Refactor., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 59492ab 41/79: Refactor token application., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 233ea1a 47/79: Kill any scopifier server before running the tests., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 0079778 48/79: Set `:send-report' to nil., Jackson Ray Hamilton, 2015/06/13
- [elpa] master cacf5de 49/79: Add cond support., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 8d15938 43/79: Cleaner server implementation., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 89286b6 54/79: Cleanup., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 5f9bd49 50/79: Add comments and strings to the cond test., Jackson Ray Hamilton, 2015/06/13
- [elpa] master c2834f0 51/79: Add condition-case support., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 2ee41c1 52/79: Add comments and strings to condition-case test.,
Jackson Ray Hamilton <=
- [elpa] master e387aaf 45/79: Merge branch 'server' into elisp, Jackson Ray Hamilton, 2015/06/13
- [elpa] master 77b075f 60/79: Space., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 5857bc8 53/79: Refactor comments and strings coloring., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 4bd7fc7 56/79: Make delays configurable at the dispatch level., Jackson Ray Hamilton, 2015/06/13
- [elpa] master f870598 59/79: Fix infinite loop when parsing let., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 3c7a00d 55/79: Add lazy coloring., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 08e2981 63/79: Swallow scan errors., Jackson Ray Hamilton, 2015/06/13
- [elpa] master ec9f04d 64/79: Update emacs lisp support in readme., Jackson Ray Hamilton, 2015/06/13
- [elpa] master d2e08e8 62/79: Improve and test lazy coloring., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 46a9193 65/79: Find the edges of the screen more efficiently., Jackson Ray Hamilton, 2015/06/13