[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 87893df 32/79: Support comma splicing.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 87893df 32/79: Support comma splicing. |
Date: |
Sun, 14 Jun 2015 00:05:29 +0000 |
branch: master
commit 87893df80ab8fcbb31ecd88f0a3ad978eb63d910
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Support comma splicing.
---
context-coloring.el | 4 ++++
test/context-coloring-test.el | 6 ++++++
test/fixtures/splice.el | 2 ++
3 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 61f5a31..61c4163 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -330,6 +330,7 @@ generated by `js2-mode'."
(defconst context-coloring-APOSTROPHE-CHAR (string-to-char "'"))
(defconst context-coloring-OPEN-PARENTHESIS-CHAR (string-to-char "("))
(defconst context-coloring-COMMA-CHAR (string-to-char ","))
+(defconst context-coloring-AT-CHAR (string-to-char "@"))
(defconst context-coloring-BACKTICK-CHAR (string-to-char "`"))
(defvar context-coloring-elisp-scope-stack '())
@@ -608,6 +609,9 @@ generated by `js2-mode'."
(setq char (char-after))
(when (= char context-coloring-COMMA-CHAR)
(forward-char)
+ (when (= (char-after) context-coloring-AT-CHAR)
+ ;; If we don't do this "@" could be interpreted as a symbol.
+ (forward-char))
(context-coloring-forward-sws)
(context-coloring-elisp-colorize-sexp)))))))
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index c21cb3d..c0240b5 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -1107,6 +1107,12 @@ ssssssssssss0"))
(xxxxxx () 111111 11111)")))
+(context-coloring-test-deftest-emacs-lisp splice
+ (lambda ()
+ (context-coloring-test-assert-coloring "
+(xxxxxx ()
+ 111111 00001 100001)")))
+
(context-coloring-test-deftest-emacs-lisp comment
(lambda ()
;; Just check that the comment isn't parsed syntactically.
diff --git a/test/fixtures/splice.el b/test/fixtures/splice.el
new file mode 100644
index 0000000..3a857a7
--- /dev/null
+++ b/test/fixtures/splice.el
@@ -0,0 +1,2 @@
+(lambda ()
+ `(,@(a free) ,free))
- [elpa] master 52383b5 26/79: Handle octothorpes., (continued)
- [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
- [elpa] master 87893df 32/79: Support comma splicing.,
Jackson Ray Hamilton <=
- [elpa] master 7167e93 19/79: Pass let and let* tests with recursive colorizer., Jackson Ray Hamilton, 2015/06/13
- [elpa] master af4f773 33/79: Colorize comments and strings inside backquotes., Jackson Ray Hamilton, 2015/06/13
- [elpa] master acaaf39 38/79: Add file statistics to benchmarks., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 8836df9 37/79: Add colorization times to logs., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 5661ed0 44/79: Document `:host' and `:port' properties., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 16fa835 40/79: Optimize JSON parser., Jackson Ray Hamilton, 2015/06/13
- [elpa] master 3dfd515 42/79: Messy server implementation., Jackson Ray Hamilton, 2015/06/13
- [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