MetaOCaml staging annotation syntax highlighting in Emacs using tuareg-support-metaocaml

95 views Asked by At

TL:DR; I would like MetaOCaml syntax highlighting in Emacs, but the relevant option has no effect. What can I do?

I'm pretty new to Emacs, but have been using MetaOCaml for a while.

I installed opam 1.3.1-r1 and emacs 25.2 through my distribution's package manager (portage). I subsequently installed BER MetaOCaml 4.04.0+BER and tuareg 2.0.10 via opam (in that order). I've edited .emacs to add the following line: (load "/home/user/.opam/4.04.0+BER/share/emacs/site-lisp/tuareg-site-file"), and (setq tuareg-support-metaocaml t) as suggested by http://okmij.org/ftp/ML/MetaOCaml.html. However, when I load a file containing staging annotations, they are not highlighted in any way (see attached pictures). The font lock for multistage is untouched, and it appears staging annotations should be darkblue on lightgray.

I've previously tried this on the Linux Subsystem for Windows (which seems to be plain Ubuntu without Xorg) on a different machine with both BER MetaOCaml 4.02.1+BER and 4.04.0+BER, using opam's tuareg 2.0.10 and it's user-setup package to configure emacs for me and setting tuareg-support-metaocaml using M-x customize. This produced the same seemingly unsatisfactory result as shown in the attached screenshots.

Is there anything I should (or shouldn't) have done to get this working, or am I misunderstanding the intended behaviour?

Thank you in advance.

(Note that I already posted this as an issue on the tuareg Github repository: https://github.com/ocaml/tuareg/issues/151 . Sorry if this is frowned upon.)

Example of MetaOCaml in Emacs under X

Example of MetaOCaml in Emacs in a terminal

0

There are 0 answers