Skip to content

Commit

Permalink
Avoid optional groups in tuareg-other-file-alist
Browse files Browse the repository at this point in the history
`ff-find-the-other-file' does not behave well in presence of an
optional group at the "start".

Fixes #280
  • Loading branch information
Chris00 committed Sep 27, 2022
1 parent 18c1b9e commit b396f38
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 4 additions & 2 deletions tuareg.el
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down

0 comments on commit b396f38

Please sign in to comment.