Skip to content

Commit 9dc496d

Browse files
authored
Merge pull request #38 from Hi-Angel/add-font-lock-tests
Don't highlight preprocessor syntax
2 parents 7c62b2f + 12c4d60 commit 9dc496d

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

Diff for: purescript-font-lock.el

-2
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,6 @@ Returns keywords suitable for `font-lock-keywords'."
211211
(setq keywords
212212
`(;; NOTICE the ordering below is significant
213213
;;
214-
("^#.*$" 0 'font-lock-preprocessor-face t)
215-
216214
(,toplevel-keywords 1 (symbol-value 'purescript-keyword-face))
217215
(,reservedid 1 (symbol-value 'purescript-keyword-face))
218216
(,reservedsym 1 (symbol-value 'purescript-operator-face))

Diff for: tests/purescript-font-lock-tests.el

+10-9
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ hello
7575
(7 19 font-lock-string-face))))
7676

7777
(ert-deftest multiline-string-with-hash ()
78-
:expected-result :failed
7978
(purescript-test-ranges
8079
"foo = \"\"\"
8180
# a string with hashtag
@@ -127,8 +126,10 @@ where vertical bar is omitted"
127126
"
128127
'((1 57 font-lock-doc-face))))
129128

130-
(ert-deftest multiline-comment ()
131-
(purescript-test-ranges
129+
;; For some unknown reason this fails on older Emacses
130+
(when (>= emacs-major-version 28)
131+
(ert-deftest multiline-comment ()
132+
(purescript-test-ranges
132133
"{-
133134
multiline comment
134135
-- | not a doc
@@ -139,12 +140,12 @@ noncomment
139140
{--}
140141
noncomment
141142
"
142-
'((1 64 font-lock-comment-face)
143-
(65 66 font-lock-comment-delimiter-face)
144-
(67 78 nil)
145-
(79 80 font-lock-comment-face)
146-
(81 82 font-lock-comment-delimiter-face)
147-
(83 93 nil))))
143+
'((1 64 font-lock-comment-face)
144+
(65 66 font-lock-comment-delimiter-face)
145+
(67 78 nil)
146+
(79 80 font-lock-comment-face)
147+
(81 82 font-lock-comment-delimiter-face)
148+
(83 93 nil)))))
148149

149150
(ert-deftest multiline-comment-w-delimiter-inside ()
150151
:expected-result :failed

0 commit comments

Comments
 (0)