diff --git a/haskell-cabal.el b/haskell-cabal.el index e2ac19b54..c22950c10 100644 --- a/haskell-cabal.el +++ b/haskell-cabal.el @@ -80,7 +80,6 @@ ;; We could use font-lock-syntactic-keywords, but is it worth it? ;; (modify-syntax-entry ?- ". 12" st) (modify-syntax-entry ?\n ">" st) - (modify-syntax-entry ?. "w" st) (modify-syntax-entry ?- "w" st) st)) diff --git a/tests/haskell-cabal-tests.el b/tests/haskell-cabal-tests.el index aa6e19e80..f95877d13 100644 --- a/tests/haskell-cabal-tests.el +++ b/tests/haskell-cabal-tests.el @@ -50,6 +50,24 @@ (haskell-cabal-previous-subsection) (haskell-cabal-previous-section)))) +(ert-deftest haskell-cabal-period-is-a-word-break () + (with-temp-buffer + (insert "Executable bin + Main-Is: Main + Exposed-Modules: Some.Internal.Type +") + (haskell-cabal-mode) + (goto-char (point-min)) + (search-forward "Modules:") + (skip-chars-forward " ") + (should (looking-at-p "Some")) + (forward-word) + (should (looking-at-p ".Internal")) + (forward-word) + (should (looking-at-p ".Type")) + (backward-word) + (should (looking-at-p "Internal")))) + (ert-deftest haskell-cabal-subsection-arrange-lines-keep-trailing-commas () (should (with-temp-buffer (insert "Executable bin-1