branch: elpa/tuareg commit aa57258fb7ab9244f63624543149b869a6eb7706 Author: Mattias EngdegÄrd <matti...@acm.org> Commit: Mattias EngdegÄrd <matti...@acm.org>
Recognise new warning format in compilation output Make `tuareg--error-regexp` match warnings from OCaml 4.12 where they are displayed with mnemonics. --- compilation.txt | 8 ++++++++ tuareg.el | 5 +++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/compilation.txt b/compilation.txt index de91d38..7350995 100644 --- a/compilation.txt +++ b/compilation.txt @@ -112,3 +112,11 @@ Warning 3: This expression has type M/2.t but an expression was expected of type Definition of module M/1 File "main.ml", line 7, characters 0-32: Definition of module M/2 + + +* Since OCaml 4.12, warnings come with mnemonics. + +File "moo.ml", line 6, characters 6-10: +6 | let fish = 13 in + ^^^^ +Warning 26 [unused-var]: unused variable fish. diff --git a/tuareg.el b/tuareg.el index 955ab45..d6653d6 100644 --- a/tuareg.el +++ b/tuareg.el @@ -3174,8 +3174,9 @@ Short cuts for interactions with the REPL: "\n" (* (in "\t "))) (group "Warning" ; 8: WARNING - (? " " (+ (in "0-9")))) - ":")) + (? " " (+ (in "0-9"))) + (? " [" (+ (in "a-z0-9-")) "]") + ":"))) "Regular expression matching the error messages produced by ocamlc/ocamlopt.") (when (boundp 'compilation-error-regexp-alist-alist)