diff --git a/haskell.el b/haskell.el index 1ff4fc4d9..d7739b321 100644 --- a/haskell.el +++ b/haskell.el @@ -80,7 +80,9 @@ (let ((p (point))) (and (search-backward "{-#" nil t) (search-forward-regexp "\\_" p t)))) - (looking-back (rx symbol-start "-" (* (char alnum ?-))))) + (looking-back + (rx symbol-start "-" (* (char alnum ?-))) + (line-beginning-position))) (list (match-beginning 0) (match-end 0) haskell-ghc-supported-options)) ;; Complete LANGUAGE :complete repl ":set -X..." ((and (nth 4 (syntax-ppss))