emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/rust-mode 5488368 039/486: compilation error regexp specif


From: ELPA Syncer
Subject: [nongnu] elpa/rust-mode 5488368 039/486: compilation error regexp specific to rustc.
Date: Sat, 7 Aug 2021 09:24:43 -0400 (EDT)

branch: elpa/rust-mode
commit 5488368b5b75722795ad2e578f74c0f19f47ec93
Author: Felix S. Klock II <pnkfelix@pnkfx.org>
Commit: Felix S. Klock II <pnkfelix@pnkfx.org>

    compilation error regexp specific to rustc.
    
    Fix #6887.
---
 rust-mode.el | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/rust-mode.el b/rust-mode.el
index ecb223f..efe9f51 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -225,4 +225,19 @@ The initializer is `DEFAULT-TAB-WIDTH'.")
 
 (provide 'rust-mode)
 
+;; Issue #6887: Rather than inheriting the 'gnu compilation error
+;; regexp (which is broken on a few edge cases), add our own 'rust
+;; compilation error regexp and use it instead.
+(defvar rustc-compilation-regexps
+  (let ((re (concat "^\\([^ \n]+\\):\\([0-9]+\\):\\([0-9]+\\): "
+                    "\\([0-9]+\\):\\([0-9]+\\) "
+                    "\\(?:[Ee]rror\\|\\([Ww]arning\\)\\):")))
+    (cons re '(1 (2 . 4) (3 . 5) (6))))
+  "Specifications for matching errors in rustc invocations.
+See `compilation-error-regexp-alist for help on their format.")
+
+(add-to-list 'compilation-error-regexp-alist-alist
+             (cons 'rustc rustc-compilation-regexps))
+(add-to-list 'compilation-error-regexp-alist 'rustc)
+
 ;;; rust-mode.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]