diff --git a/CHANGES.md b/CHANGES.md index 0f2a70ab84..58e58e4d3a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -129,6 +129,11 @@ profile. This started with version 0.26.0. M.foo) ``` +### Emacs mode + +- Add `neocaml-mode` support to `ocamlformat-before-save` + (#2787, @bbatsov) + ## 0.28.1 ### Highlight diff --git a/emacs/ocamlformat.el b/emacs/ocamlformat.el index 47c0c0a9c3..7c652acdf8 100644 --- a/emacs/ocamlformat.el +++ b/emacs/ocamlformat.el @@ -101,7 +101,8 @@ nil (default)." \(add-hook \\='before-save-hook \\='ocamlformat-before-save)." (interactive) (when - (memq major-mode '(tuareg-mode caml-mode ocaml-ts-mode ocamli-ts-mode)) + (memq major-mode '(tuareg-mode caml-mode ocaml-ts-mode ocamli-ts-mode + neocaml-mode neocaml-interface-mode)) (ocamlformat))) (defun ocamlformat--goto-line (line)