emacs-diffs
[Top][All Lists]
Advanced

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

master e73dbcf26d: Fix compilation-mode parsing of file names in Gradle


From: Lars Ingebrigtsen
Subject: master e73dbcf26d: Fix compilation-mode parsing of file names in Gradle errors
Date: Wed, 29 Jun 2022 05:53:57 -0400 (EDT)

branch: master
commit e73dbcf26d9de114b3ba228edaf946418b476052
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Fix compilation-mode parsing of file names in Gradle errors
    
    * lisp/progmodes/compile.el
    (compilation-error-regexp-alist-alist): Fix parsing of file names
    in Gradle output (bug#56249).
---
 lisp/progmodes/compile.el | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index d28fce9dbd..28a49fc0dd 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -365,9 +365,10 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
        ;;     PROGRAM:SOURCE-FILE-NAME:LINENO: MESSAGE
        ;; which is used for non-interactive programs other than
        ;; compilers (e.g. the "jade:" entry in compilation.txt).
-       (? (| (: alpha (+ (in ?. ?- alnum)) ":" (? " "))
-             ;; Skip indentation generated by GCC's -fanalyzer.
-             (: (+ " ") "|")))
+       (? (: (* " ")        ; Allow space to precede the program name.
+             (| (: alpha (+ (in ?. ?- alnum)) ":" (? " "))
+                ;; Skip indentation generated by GCC's -fanalyzer.
+                (: (+ " ") "|"))))
 
        ;; File name group.
        (group-n 1
@@ -387,13 +388,13 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))
        ;; Line number group.
        (group-n 2 (regexp "[0-9]+"))
        (? (| (: "-"
-                (group-n 4 (regexp "[0-9]+"))            ; ending line
-                (? "." (group-n 5 (regexp "[0-9]+"))))   ; ending column
+                (group-n 4 (regexp "[0-9]+"))          ; ending line
+                (? "." (group-n 5 (regexp "[0-9]+")))) ; ending column
              (: (in ".:")
-                (group-n 3 (regexp "[0-9]+"))            ; starting column
+                (group-n 3 (regexp "[0-9]+")) ; starting column
                 (? "-"
                    (? (group-n 4 (regexp "[0-9]+")) ".") ; ending line
-                   (group-n 5 (regexp "[0-9]+"))))))     ; ending column
+                   (group-n 5 (regexp "[0-9]+")))))) ; ending column
        ":"
        (| (: (* " ")
              (group-n 6 (| "FutureWarning"
@@ -1243,7 +1244,7 @@ POS and RES.")
 ;; Return a property list with all meta information on this error location.
 
 (defun compilation-error-properties (file line end-line col end-col type fmt
-                                     rule)
+                                          rule)
   (unless (text-property-not-all (match-beginning 0) (point)
                                  'compilation-message nil)
     (if file



reply via email to

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