Skip to content

Commit 4892713

Browse files
committed
Merge pull request #600 from geraldus/snapshot-build-fix
Use LIMIT for looking-back call.
2 parents 5d770f8 + cda416c commit 4892713

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

haskell.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@
8080
(let ((p (point)))
8181
(and (search-backward "{-#" nil t)
8282
(search-forward-regexp "\\_<OPTIONS\\(?:_GHC\\)?\\_>" p t))))
83-
(looking-back (rx symbol-start "-" (* (char alnum ?-)))))
83+
(looking-back
84+
(rx symbol-start "-" (* (char alnum ?-)))
85+
(line-beginning-position)))
8486
(list (match-beginning 0) (match-end 0) haskell-ghc-supported-options))
8587
;; Complete LANGUAGE :complete repl ":set -X..."
8688
((and (nth 4 (syntax-ppss))

0 commit comments

Comments
 (0)