From d2a931a7977f61a82a7c0c7e258fe33b59d01e4a Mon Sep 17 00:00:00 2001 From: Kirill Ignatiev Date: Tue, 30 Dec 2014 22:45:32 -0500 Subject: [PATCH] Syntax table entries for non-alphanumeric chars See #410 --- haskell-mode.el | 37 ++++++++++++++++++++++++++++++++++++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/haskell-mode.el b/haskell-mode.el index 342b2cf9a..5b385d5e1 100644 --- a/haskell-mode.el +++ b/haskell-mode.el @@ -289,7 +289,42 @@ Run M-x describe-variable haskell-mode-hook for a list of such modes.")) (mapc (lambda (x) (modify-syntax-entry x "_" table)) ;; Some of these are actually OK by default. - "!#$%&*+⧺./:<=>?@^|~") + "!#$%&*+./:<=>?@^|~") + + ;; Characters in these blocks are non-alphanumeric and can be + ;; symbol constituents; haskell uses Unicode character category. + (dolist (block '(("Alchemical Symbols" 128768 128895) + ("Ancient Symbols" 65936 65999) + ("Arrows" 8592 8703) + ("Byzantine Musical Symbols" 118784 119039) + ("CJK Symbols and Punctuation" 12288 12351) + ("Combining Diacritical Marks for Symbols" 8400 8447) + ("Cuneiform Numbers and Punctuation" 74752 74879) + ("Currency Symbols" 8352 8399) + ("Enclosed Alphanumeric Supplement" 127232 127487) + ("Enclosed Alphanumerics" 9312 9471) + ("Enclosed CJK Letters and Months" 12800 13055) + ("Enclosed Ideographic Supplement" 127488 127743) + ("General Punctuation" 8192 8303) + ("Khmer Symbols" 6624 6655) + ("Mathematical Operators" 8704 8959) + ("Miscellaneous Mathematical Symbols-A" 10176 10223) + ("Miscellaneous Mathematical Symbols-B" 10624 10751) + ("Miscellaneous Symbols" 9728 9983) + ("Miscellaneous Symbols and Arrows" 11008 11263) + ("Miscellaneous Symbols and Pictographs" 127744 128511) + ("Musical Symbols" 119040 119295) + ("Rumi Numeral Symbols" 69216 69247) + ("Supplemental Arrows-A" 10224 10239) + ("Supplemental Arrows-B" 10496 10623) + ("Supplemental Arrows-C" 129024 129279) + ("Supplemental Mathematical Operators" 10752 11007) + ("Supplemental Punctuation" 11776 11903) + ("Tai Xuan Jing Symbols" 119552 119647) + ("Transport and Map Symbols" 128640 128767) + ("Yijing Hexagram Symbols" 19904 19967))) + (modify-syntax-entry (cons (nth 1 block) (nth 2 block)) "_" table)) + (unless (featurep 'mule) ;; Non-ASCII syntax should be OK, at least in Emacs. (mapc (lambda (x)