Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion haskell-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ executable found in PATH.")
(modify-syntax-entry ?\t " " table)
(modify-syntax-entry ?\" "\"" table)
(modify-syntax-entry ?\' "_" table)
(modify-syntax-entry ?_ "w" table)
(modify-syntax-entry ?_ "_" table)
(modify-syntax-entry ?\( "()" table)
(modify-syntax-entry ?\) ")(" table)
(modify-syntax-entry ?\[ "(]" table)
Expand Down
2 changes: 1 addition & 1 deletion tests/haskell-c2hs-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@
'(("{#" t haskell-c2hs-hook-pair-face)
("set" "w" haskell-c2hs-hook-name-face)
("#}" t haskell-c2hs-hook-pair-face)
("AF_NET" "w" haskell-constructor-face))
("AF_NET" "w_" haskell-constructor-face))
'haskell-c2hs-mode))

(ert-deftest haskell-c2hs-pointer-hook-1 ()
Expand Down
10 changes: 5 additions & 5 deletions tests/haskell-font-lock-tests.el
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,13 @@
("Comm6" "w" font-lock-comment-face)
("Cons7" "w" haskell-constructor-face)
("pragma1" "w" haskell-pragma-face)
("non_pragma2" "w" font-lock-comment-face)
("non_pragma2" "w_" font-lock-comment-face)

("non_pragma3" "w" font-lock-comment-face)
("liquid_haskell" "w" haskell-liquid-haskell-annotation-face)
("non_liquid_haskell_2" "w" font-lock-comment-face)
("non_pragma3" "w_" font-lock-comment-face)
("liquid_haskell" "w_" haskell-liquid-haskell-annotation-face)
("non_liquid_haskell_2" "w_" font-lock-comment-face)

("non_liquid_haskell_3" "w" font-lock-comment-face))))
("non_liquid_haskell_3" "w_" font-lock-comment-face))))


(ert-deftest haskell-syntactic-string-vs-comment-escape ()
Expand Down
7 changes: 4 additions & 3 deletions tests/haskell-test-utils.el
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ If SYNTAX or FACE are set to t then any syntex respective face is
not checked."
(let (all-syntaxes
all-faces
(syntax-classes "-.w_()'\"$\\/<>@!|")
(text (buffer-substring-no-properties beg end)))
(while (< beg end)
(add-to-list 'all-syntaxes (syntax-class (syntax-after beg)))
(add-to-list 'all-syntaxes (char-to-string (aref syntax-classes (syntax-class (syntax-after beg)))))
(add-to-list 'all-faces (get-text-property beg 'face))
(setq beg (1+ beg)))
(unless (eq syntax t)
(should (equal (list text (list (syntax-class (string-to-syntax syntax))))
(list text all-syntaxes))))
(should (equal (list text (mapconcat #'identity (sort (mapcar (lambda (syn) (char-to-string syn)) syntax) #'string<) ""))
(list text (mapconcat #'identity (sort all-syntaxes #'string<) "")))))
(unless (eq face t)
(should (equal (list text (list face))
(list text all-faces))))))
Expand Down