branch: elpa/tuareg commit b396f384cbdb0099649712f47647e34ba4219be6 Author: Christophe Troestler <christophe.troest...@umons.ac.be> Commit: Christophe Troestler <christophe.troest...@umons.ac.be>
Avoid optional groups in tuareg-other-file-alist `ff-find-the-other-file' does not behave well in presence of an optional group at the "start". Fixes https://github.com/ocaml/tuareg/issues/280 --- CHANGES.md | 2 +- tuareg.el | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index e9c5ca5215..571a1f707e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -26,7 +26,7 @@ Backward incompatible changes are marked with “⚠”. levels of fontification (see the README). * The switch .ml ↔ .mli now uses the Emacs built-in `find-file` and was extended to `.eliom` ↔ `.eliomi` and `.mly` ↔ `.mli`. It also - work for pre-processed files named `.pp.ml` and `.pp.mli`. + works for pre-processed files named `.pp.ml` and `.pp.mli`. * When switching from an `.ml` to a non-existing `.mli` file using <kbd>C-c C-a</kbd>, one is offered to fill the `.mli` buffer with the generated interface. diff --git a/tuareg.el b/tuareg.el index 6540b197ce..47e83d9899 100644 --- a/tuareg.el +++ b/tuareg.el @@ -219,8 +219,10 @@ much less efficient." :group 'tuareg :type 'boolean) (defcustom tuareg-other-file-alist - '(("\\.\\(?:pp\\.\\)?mli\\'" (".ml" ".mll" ".mly" ".pp.ml")) - ("\\.\\(?:pp\\.\\)?ml\\'" (".mli")) + '(("\\.pp\\.mli\\'" (".ml" ".mll" ".mly" ".pp.ml")) + ("\\.mli\\'" (".ml" ".mll" ".mly" ".pp.ml")) + ("\\.pp\\.ml\\'" (".mli")) + ("\\.ml\\'" (".mli")) ("\\.mll\\'" (".mli")) ("\\.mly\\'" (".mli")) ("\\.eliomi\\'" (".eliom"))