为 .ml4 文件自动加载 tuareg 模式

Autoload tuareg-mode for .ml4 files

我需要在 tuareg.el 中更改什么才能让 Emacs 自动加载 .ml4 文件的 tuareg-mode

我可以轻松地手动更改为 tuareg-mode,但如果不必那样做就好了。

您不需要更改 tuareg.el 但您的 .emacs

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

您的 .emacs 中必须包含此行,因此请将其更改为

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

最佳 :-)