branch: master
commit 52383b5abacf079bf0f1cfd3f6f7039aa7b9c032
Author: Jackson Ray Hamilton <[email protected]>
Commit: Jackson Ray Hamilton <[email protected]>
Handle octothorpes.
---
context-coloring.el | 4 +++-
test/fixtures/ignored.el | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/context-coloring.el b/context-coloring.el
index 089236b..459aca0 100644
--- a/context-coloring.el
+++ b/context-coloring.el
@@ -326,6 +326,7 @@ generated by `js2-mode'."
(defconst context-coloring-COMMENT-START-CODE 11)
(defconst context-coloring-COMMENT-END-CODE 12)
+(defconst context-coloring-OCTOTHORPE-CHAR (string-to-char "#"))
(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 ","))
@@ -597,7 +598,8 @@ generated by `js2-mode'."
char)
(setq char (char-after))
(cond
- ((= char context-coloring-APOSTROPHE-CHAR)
+ ((or (= char context-coloring-APOSTROPHE-CHAR)
+ (= char context-coloring-OCTOTHORPE-CHAR))
(forward-sexp))
((= char context-coloring-BACKTICK-CHAR)
(setq start (point))
diff --git a/test/fixtures/ignored.el b/test/fixtures/ignored.el
index 776a846..748b970 100644
--- a/test/fixtures/ignored.el
+++ b/test/fixtures/ignored.el
@@ -1,2 +1,2 @@
(defun a ()
- (+ a 1 +1 -1 1.0 :a t nil (0 . 0)))
+ (+ a 1 +1 -1 1.0 #x0 :a t nil (0 . 0)))