Skip to content

Commit 37a3de8

Browse files
authored
Qualify match with a further check rather than remove it
1 parent 5b54d4b commit 37a3de8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

haskell-load.el

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,13 +205,8 @@ list of modules where missed IDENT was found."
205205
(string-match
206206
"Use \\([A-Z][A-Za-z]+\\) if you want to disable this"
207207
msg)
208-
;; Andreas Abel, 2024-01-10, https://github.com/haskell/haskell-mode/issues/1834
209-
;; The following regex also matches the new x-partial warning
210-
;; "Consider refactoring to use Data.List.NonEmpty"
211-
;; which would result in a suggestion to
212-
;; "Add {-# LANGUAGE Data #-} to the top of the file?"
213-
;; Thus, we disable it.
214-
;; (string-match "use \\([A-Z][A-Za-z]+\\)" msg)
208+
(and (string-match "use \\([A-Z][A-Za-z]+\\)" msg)
209+
(not (string-match "refactoring to use" msg)))
215210
(string-match "You need \\([A-Z][A-Za-z]+\\)" msg)))
216211
(when haskell-process-suggest-language-pragmas
217212
(haskell-process-suggest-pragma

0 commit comments

Comments
 (0)