Skip to content

Syntax table entries for non-alphanumeric chars #412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 1, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion haskell-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down