1

I am using Tuareg mode for Emacs.

I am also using lwt. lwt has some syntax extension, but Tuareg cannot recognize them and it is ugly without indention and coloring.

I found this:

https://github.com/skydeck/lwt/blob/master/utils/tuareg-2.0.4.patch

It is a patch for tuareg-2.0.4 to enable lwt coloring.


However, I am using Tuareg-2.0.5 and I tried the patch directly, it failed.

I am not sure how to downgrade Tuareg, so I just downloaded the files of tuareg-2.0.4 and copy them to the elpa/tuareg-2.0.5 folder and then I did the patch again.

This was successfully patched as it said, but still my emacs cannot recognize lwt.


Can anyone tell me how?

Thomash
  • 6,339
  • 1
  • 30
  • 50
Jackson Tale
  • 25,428
  • 34
  • 149
  • 271

1 Answers1

3

IMHO, you don't have to replace your stock tuareg.el.

1. Place your patched tuareg.el to ~/.emacs.d/ directory

2. Add the following lines to your ~/.emacs config

(add-to-list 'load-path "~/.emacs.d/")
(load "tuareg")

3. (Optional) byte-compile your custom tuareg.el

M-x byte-compile-file

Stock tuareg mode

stock tuareg mode

Tuareg mode with lwt patch

tuareg mode with lwt patch

barti_ddu
  • 10,179
  • 1
  • 45
  • 53