Subject: Incorrect classification of messages in compilation-mode buffer

From: Daniel Lopez <[email-masked]>
Date: Thu, 14 Feb 2019 16:05:10 +0000

Argh, I forgot to attach the patch. Here it is!

Daniel
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 581a98d56c..0303314c59 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -1425,17 +1425,17 @@ compilation-parse-errors
                              file line end-line col end-col (or type 2) fmt))
 
             (when (integerp file)
-              (setq type (if (consp type)
-                             (compilation-type type)
-                           (or type 2)))
-              (compilation--note-type type)
-
-              (compilation--put-prop
-               file 'font-lock-face
-               (symbol-value (aref [compilation-info-face
-                                    compilation-warning-face
-                                    compilation-error-face]
-                                   type))))
+              (let ((this-type (if (consp type)
+                                   (compilation-type type)
+                                 (or type 2))))
+                (compilation--note-type type)
+
+                (compilation--put-prop
+                 file 'font-lock-face
+                 (symbol-value (aref [compilation-info-face
+                                      compilation-warning-face
+                                      compilation-error-face]
+                                     this-type)))))
 
             (compilation--put-prop
              line 'font-lock-face compilation-line-face)