summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorThomas Mühlbacher <tmuehlbacher@posteo.net>2026-05-19 11:18:36 +0000
committerSean Whitton <spwhitton@spwhitton.name>2026-05-23 17:53:49 +0100
commit1800350b186864130e16c8618cbcb072c564637e (patch)
tree347ee6c05c1b0b4f3618299db20ae89d4661894e /lisp
parent4f13f52a3aade6e43e42f14f9f94b0c43d6b4b12 (diff)
Avoid compilation-mode matching rust as gnu
* lisp/progmodes/compile.el (compilation-error-regexp-alist-alist): Put 'rust' before 'gnu' to avoid a mismatch since the " |" has become optional (bug#81075). Copyright-paperwork-exempt: yes
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/compile.el27
1 files changed, 14 insertions, 13 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index aaad8622c95..fbcdc6b5124 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -421,6 +421,20 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
nil
(1 compilation-error-face))
+ ;; This must precede the `gnu' rule or the latter would match instead.
+ (rust
+ ,(rx bol (or (group-n 1 "error") (group-n 2 "warning") (group-n 3 "note"))
+ (? "[" (+ (in "A-Z" "0-9")) "]") ":" (* nonl)
+ "\n" (+ " ") "-->"
+ " " (group-n 4 (+ nonl)) ; file
+ ":" (group-n 5 (+ (in "0-9"))) ; line
+ ":" (group-n 6 (+ (in "0-9")))) ; column
+ 4 5 6 (2 . 3)
+ nil
+ (1 compilation-error-face)
+ (2 compilation-warning-face)
+ (3 compilation-info-face))
+
;; Tested with Lua 5.1, 5.2, 5.3, 5.4, and LuaJIT 2.1.
(lua
,(rx bol
@@ -582,19 +596,6 @@ during global destruction\\.$\\)" 1 2)
"\\(?:Parse\\|Fatal\\) error: \\(.*\\) in \\(.*\\) on line \\([0-9]+\\)"
2 3 nil nil)
- (rust
- ,(rx bol (or (group-n 1 "error") (group-n 2 "warning") (group-n 3 "note"))
- (? "[" (+ (in "A-Z" "0-9")) "]") ":" (* nonl)
- "\n" (+ " ") "-->"
- " " (group-n 4 (+ nonl)) ; file
- ":" (group-n 5 (+ (in "0-9"))) ; line
- ":" (group-n 6 (+ (in "0-9")))) ; column
- 4 5 6 (2 . 3)
- nil
- (1 compilation-error-face)
- (2 compilation-warning-face)
- (3 compilation-info-face))
-
(rxp
"^\\(?:Error\\|Warnin\\(g\\)\\):.*\n.* line \\([0-9]+\\) char\
\\([0-9]+\\) of file://\\(.+\\)"