[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/tuareg 5872d6b 2/5: Treat ancillary locations as messages
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/tuareg 5872d6b 2/5: Treat ancillary locations as messages at Info level, not Error |
Date: |
Fri, 27 Aug 2021 10:57:57 -0400 (EDT) |
branch: elpa/tuareg
commit 5872d6b0b1e3762176855792b1e044da5d7c062a
Author: Mattias EngdegÄrd <mattiase@acm.org>
Commit: Christophe Troestler <christophe.Troestler@umons.ac.be>
Treat ancillary locations as messages at Info level, not Error
Leading spaces (before the `File`) are assumed to indicate an
ancillary location. This is mostly true but not for warnings.
---
tuareg-tests.el | 4 ++--
tuareg.el | 10 ++++++++--
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/tuareg-tests.el b/tuareg-tests.el
index 7118a4b..c336ef1 100644
--- a/tuareg-tests.el
+++ b/tuareg-tests.el
@@ -458,8 +458,8 @@ Returns the value of the last FORM."
" File \"main.ml\", line 7, characters 0-32:\n"
" Definition of module M/2\n")
((1 error "main.ml" 13 13 34 34)
- (225 error "main.ml" 10 10 2 40)
- (308 error "main.ml" 7 7 0 31)))
+ (225 info "main.ml" 10 10 2 40)
+ (308 info "main.ml" 7 7 0 31)))
(("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 5dd9429..3222ca1 100644
--- a/tuareg.el
+++ b/tuareg.el
@@ -3172,7 +3172,12 @@ Short cuts for interactions with the REPL:
(defconst tuareg--error-regexp
(rx bol
- (* " ")
+ ;; Require either zero or 7 leading spaces, to avoid matching
+ ;; Python tracebacks. Assume that spaces mean that this is an
+ ;; ancillary location that should have level Info.
+ ;; FIXME: Ancillary locations for warnings probably have no spaces
+ ;; and are now treated as errors. Fortunately these are rare.
+ (? (group-n 9 " ")) ; 9: INFO
(group-n 1 ; 1: HIGHLIGHT
(or "File "
;; Exception backtrace.
@@ -3220,7 +3225,8 @@ OCaml uses exclusive end-columns but Emacs wants them to
be inclusive."
(when (boundp 'compilation-error-regexp-alist-alist)
(setq compilation-error-regexp-alist-alist
(assq-delete-all 'ocaml compilation-error-regexp-alist-alist))
- (push `(ocaml ,tuareg--error-regexp 3 (4 . 5) (6 . tuareg--end-column) (8) 1
+ (push `(ocaml ,tuareg--error-regexp 3 (4 . 5) (6 . tuareg--end-column)
+ (8 . 9) 1
(8 font-lock-function-name-face))
compilation-error-regexp-alist-alist))
- [nongnu] elpa/tuareg updated (f6801c8 -> 4c4fad3), ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg 5872d6b 2/5: Treat ancillary locations as messages at Info level, not Error,
ELPA Syncer <=
- [nongnu] elpa/tuareg b62d4ee 4/5: Add genuine example of warning with ancillary locations, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg 4c4fad3 5/5: Work around bug in Emacs 26 and older, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg 95f3b01 1/5: Explicit group numbering in error regexp, ELPA Syncer, 2021/08/27
- [nongnu] elpa/tuareg 2a58507 3/5: Use Warning level for Alert messages, ELPA Syncer, 2021/08/27