branch: elpa/haskell-ts-mode
commit 6adb4932510c60201f7e75814bda963845e9439b
Author: Pranshu Sharma <[email protected]>
Commit: Pranshu Sharma <[email protected]>
Major syntax table fix
Now comment over region works properly
before, \(Type x) syntax didn't work properly, then after fixing it
comments didn't work. Now they both work.
---
haskell-ts-mode.el | 29 +++++++++++++++--------------
1 file changed, 15 insertions(+), 14 deletions(-)
diff --git a/haskell-ts-mode.el b/haskell-ts-mode.el
index bfead77bff..f40e216596 100644
--- a/haskell-ts-mode.el
+++ b/haskell-ts-mode.el
@@ -363,26 +363,27 @@ when `haskell-ts-prettify-words' is non-nil.")
(defvar haskell-ts-mode-syntax-table
(eval-when-compile
(let ((table (make-syntax-table))
- (syntax-list
- `((" " ?\ ?\t)
+ (imenu-syntax-list
+ `((" " " \t\n\r\f\v")
+ ("_" "!#$%&*+./<=>?\\^|-~:")
+ ("w" ?_ ?\')
+ ("." ",:@")
("\"" ?\")
- ("_" ?\' ?_)
("()" ?\()
(")(" ?\))
("(]" ?\[)
(")[" ?\])
- ("(}1nb" ?\{)
- ("){4nb" ?\})
- ("< 123" ?-)
- ("<" ?\n)
("$`" ?\`)
- ,(cons
- "."
- (string-to-list "!#$%&*+./:<=>?@^|~,;\\")))))
- ;; The defaults are mostly fine
- (dolist (ls syntax-list table)
- (dolist (char (cdr ls))
- (modify-syntax-entry char (car ls) table))))))
+ ("(}1nb" ?\{ )
+ ("){4nb" ?\} )
+ ("_ 123" ?- )
+ (">" "\r\n\f\v"))))
+ (dolist (ls imenu-syntax-list table)
+ (dolist (char (if (stringp (cadr ls))
+ (string-to-list (cadr ls))
+ (cdr ls)))
+ (modify-syntax-entry char (car ls) table)))))
+ "The syntax table for haskell.")
(defun haskell-ts-sexp (node)
"Returns non-nil on a sexp node."