Skip to content
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

Operators not getting face applied #503

Closed
ankhers opened this issue Mar 12, 2015 · 3 comments · Fixed by #504
Closed

Operators not getting face applied #503

ankhers opened this issue Mar 12, 2015 · 3 comments · Fixed by #504

Comments

@ankhers
Copy link
Contributor

ankhers commented Mar 12, 2015

I've noticed recently that operators ($, *, +, etc) are no longer getting a face applied to them.

screen shot 2015-03-12 at 11 38 35

In that screen shot, I expect * and + to have the same colour as the = and ::

@chrisdone
Copy link
Member

Reproducing here too. May be caused by b53ba49. Probably the syntax table makes sense but it's a regression in terms of highlighting.

chrisdone added a commit that referenced this issue Mar 12, 2015
Operators should be fontified. Fix #503.
@gracjan
Copy link
Contributor

gracjan commented Mar 12, 2015

@ankhers: Good catch! Thanks!

The story of this is rather interesting one so let me share:

Haskell operator characters used to be in Emacs symbol class, that was a mistake because 'emacs-symbol' is 'haskell-variable' or 'haskell-contructor' that is 'identifier'. Then there was a regexp setup to highlight _ as haskell-operator-face. Now documentation states that haskell-operator-face is font-lock-function-name-face when code says it is font-lock-variable-name-face, neither one seems proper.

Note also that haskell-mode post-fixes underscore and apostrophe into \w (word constituting class) characters.

Note also that neither c++-mode nor python-mode define special syntax rules for operators but then those languages are more keyword driven compared to Haskell.

@gracjan
Copy link
Contributor

gracjan commented Mar 12, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants