-
Notifications
You must be signed in to change notification settings - Fork 347
symbol includes trailing @ sign in as-patterns #311
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
Comments
Yes, this is a tricky one. (mapc (lambda (x)
(modify-syntax-entry x "_" table))
;; Some of these are actually OK by default.
"!#$%&*+./:<=>?@^|~") This discussion has a succinct summary of when it is legal, ie. not at the end of a symbol. Given the Emacs syntax table system, which can't take into account the character's position in a potential symbol, I'm not sure that a resolution of this issue is possible. It might be the case that the |
@purcell: wait, this explanation does not sound right, please correct me if I'm wrong: There is a 'w' category that is for words. '@' is never a part of 'w' category in Haskell. Am I wrong about either Haskell or Emacs interpretation of 'w' vs '_'? |
@gracjan Hmm, yes, you're probably right that |
Currently '@' has class '_', each of 'store' has class 'w'. In In Do we lose any functionality if Haskell symbol characters get puntuaction class? |
Probably not, though I can't be 100% certain. |
Emacs 24.3.91.1 (built from src on ubuntu)
haskell-mode 20140726.1852 (from melpa)
When I use
find-tag
orhighlight-symbol-at-point
on an as-pattern, emacs incorrectly thinks the at-sign is part of the symbol.For example, in the following code, if point is on the
xxs
on the left-hand side of line 3, and you typeM-.
tofind-tag
, the default symbol to search for will bexxs@
It's also observable in this screenshot of this code
store@
is highlighted but notstore
The text was updated successfully, but these errors were encountered: