[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 52e3d07 1/9: Fix bug where empty varlists weren't parsed.
From: |
Jackson Ray Hamilton |
Subject: |
[elpa] master 52e3d07 1/9: Fix bug where empty varlists weren't parsed. |
Date: |
Fri, 13 Nov 2015 05:39:52 +0000 |
branch: master
commit 52e3d07376ef5e951a71cb8fc77b9f48962f7d42
Author: Jackson Ray Hamilton <address@hidden>
Commit: Jackson Ray Hamilton <address@hidden>
Fix bug where empty varlists weren't parsed.
---
context-coloring.el | 6 ++++--
test/context-coloring-test.el | 10 ++++++++++
test/fixtures/empty-varlist.el | 6 ++++++
3 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 8d6cacc..0fe1427 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -504,9 +504,11 @@ For instance, the current file could be a Node.js program."
(context-coloring-colorize-comments-and-strings start (point))))
(defsubst context-coloring-elisp-forward-sexp ()
- "Like `forward-sexp', coloring skipped comments and strings."
+ "Skip/ignore missing sexps, coloring comments and strings."
(let ((start (point)))
- (forward-sexp)
+ (condition-case nil
+ (forward-sexp)
+ (scan-error (context-coloring-forward-sws)))
(context-coloring-elisp-colorize-comments-and-strings-in-region
start (point))))
diff --git a/test/context-coloring-test.el b/test/context-coloring-test.el
index f643e91..fc79f7b 100644
--- a/test/context-coloring-test.el
+++ b/test/context-coloring-test.el
@@ -749,6 +749,16 @@ ssssssssssss0"))
1111 cc ccccccc
1sss11")))
+(context-coloring-test-deftest-emacs-lisp empty-varlist
+ (lambda ()
+ (context-coloring-test-assert-coloring "
+1111111 1 11
+1111111 111
+
+1111 1cc
+ 11
+1111111 111")))
+
(context-coloring-test-deftest-emacs-lisp let*
(lambda ()
(context-coloring-test-assert-coloring "
diff --git a/test/fixtures/empty-varlist.el b/test/fixtures/empty-varlist.el
new file mode 100644
index 0000000..5ee6a78
--- /dev/null
+++ b/test/fixtures/empty-varlist.el
@@ -0,0 +1,6 @@
+(lambda ( ))
+(lambda ())
+
+(let (;;
+ ))
+(lambda ())
- [elpa] master updated (6bb5fee -> cf250b3), Jackson Ray Hamilton, 2015/11/13
- [elpa] master 52e3d07 1/9: Fix bug where empty varlists weren't parsed.,
Jackson Ray Hamilton <=
- [elpa] master f4e3f36 3/9: Add gv-letplace support., Jackson Ray Hamilton, 2015/11/13
- [elpa] master f29f06c 6/9: Use containers on Travis., Jackson Ray Hamilton, 2015/11/13
- [elpa] master de6b508 7/9: Fix bugs where spaces messed up varlists., Jackson Ray Hamilton, 2015/11/13
- [elpa] master f9399ea 5/9: Fix unfinished expression infinite loop., Jackson Ray Hamilton, 2015/11/13
- [elpa] master 4d381cb 4/9: Add macroexp-let2 support., Jackson Ray Hamilton, 2015/11/13
- [elpa] master 1a7c480 8/9: Version 7.2.0., Jackson Ray Hamilton, 2015/11/13
- [elpa] master 6bbbfff 2/9: Add license., Jackson Ray Hamilton, 2015/11/13
- [elpa] master cf250b3 9/9: Merge commit '1a7c480d1e15133b942201f5964fda5e7d74919f' from context-coloring, Jackson Ray Hamilton, 2015/11/13