branch: elpa/tuareg
commit 2a585072ba6531e2d5935dc56b69ebb3238e38f1
Author: Mattias EngdegÄrd <[email protected]>
Commit: Christophe Troestler <[email protected]>
Use Warning level for Alert messages
Previously they got the Error level by default.
---
compilation.txt | 8 ++++++++
tuareg-tests.el | 5 +++++
tuareg.el | 7 +++----
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/compilation.txt b/compilation.txt
index 736066d..d88a348 100644
--- a/compilation.txt
+++ b/compilation.txt
@@ -122,6 +122,14 @@ File "moo.ml", line 6, characters 6-10:
Warning 26 [unused-var]: unused variable fish.
+* Alert: treat like warning
+
+File "alrt.ml", line 25, characters 9-10:
+25 | val x: t [@@ocaml.deprecated]
+ ^
+Alert deprecated: t
+
+
* Backtrace messages
Before 4.11:
diff --git a/tuareg-tests.el b/tuareg-tests.el
index c336ef1..da1ca32 100644
--- a/tuareg-tests.el
+++ b/tuareg-tests.el
@@ -460,6 +460,11 @@ Returns the value of the last FORM."
((1 error "main.ml" 13 13 34 34)
(225 info "main.ml" 10 10 2 40)
(308 info "main.ml" 7 7 0 31)))
+ (("File \"alrt.ml\", line 25, characters 9-10:\n"
+ "25 | val x: t [@@ocaml.deprecated]\n"
+ " ^\n"
+ "Alert deprecated: t\n")
+ ((1 warning "alrt.ml" 25 25 9 9)))
(("Fatal error: exception Bad.Disaster(\"oh no!\")\n"
"Raised at file \"bad.ml\", line 5, characters 4-22\n"
"Called from file \"worse.ml\" (inlined), line 9, characters 2-5\n"
diff --git a/tuareg.el b/tuareg.el
index 3222ca1..ae00426 100644
--- a/tuareg.el
+++ b/tuareg.el
@@ -3206,10 +3206,9 @@ Short cuts for interactions with the REPL:
(+ "^"))
"\n"
(* (in "\t ")))
- (group-n 8 "Warning" ; 8: WARNING
- (? " " (+ (in "0-9")))
- (? " [" (+ (in "a-z0-9-")) "]")
- ":")))
+ (group-n 8 (or "Warning" "Alert") ; 8: WARNING
+ (* (not (in ":\n")))
+ ":")))
"Regular expression matching the error messages produced by ocamlc/ocamlopt.
Also matches source references in exception backtraces.")