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

Use preprocessor highlighting from cc-mode #521

Closed
5 tasks
gracjan opened this issue Mar 16, 2015 · 2 comments
Closed
5 tasks

Use preprocessor highlighting from cc-mode #521

gracjan opened this issue Mar 16, 2015 · 2 comments

Comments

@gracjan
Copy link
Contributor

gracjan commented Mar 16, 2015

Emacs cc-mode has font-lock definitions for preprocessor. Those include support for #include highlighting with strings, nice coloring for #define, line continuations and other perks. All of this is lacking in current Haskell mode preprocessor highlighing.

haskell-mode should use:

  • (require 'cc-mode)
  • (c-initialize-cc-mode)
  • (font-lock-add-keywords nil c-font-lock-keywords-1)
  • check if other changes are needed
  • check that the above changes only font-lock for preprocessor and nothing else

cc-mode is bundled with Emacs these days so it can be relied upon.

@gracjan
Copy link
Contributor Author

gracjan commented Apr 6, 2015

Caveat: it seems that # is to be recognized only on first column, although I did not find it documented anywhere.

@gracjan
Copy link
Contributor Author

gracjan commented Feb 6, 2016

Note though #1131. This one seems to be in conflict, so closing.

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

No branches or pull requests

1 participant