Autoload tuareg-mode for .ml4 files

98 Views Asked by At

What do I need to change in tuareg.el to get Emacs to automatically load tuareg-mode for .ml4 files?

I can easily change to tuareg-mode manually, but it would be nice not to have to do that.

1

There are 1 best solutions below

1
Lhooq On BEST ANSWER

You don't need to change tuareg.el but your .emacs

(setq auto-mode-alist
  (cons '("\\.ml[iylp]?$" . tuareg-mode) auto-mode-alist))

You must have this line in your .emacs so change it with

(setq auto-mode-alist
  (cons '("\\.ml[iylp4]?$" . tuareg-mode) auto-mode-alist))

Best :-)