; compilation-error-regexp-alist-alist order comment
authorMattias Engdegård <mattiase@acm.org>
Mon, 3 Jun 2024 14:52:27 +0000 (16:52 +0200)
committerMattias Engdegård <mattiase@acm.org>
Mon, 3 Jun 2024 14:53:29 +0000 (16:53 +0200)
lisp/progmodes/compile.el

index b18eb81fee144a1fd0a32de89419a13b18f812c1..e31af774bd0daea81097a5080cec4c88783829cf 100644 (file)
@@ -194,6 +194,11 @@ and a string describing how the process finished.")
 
 (defvar compilation-error-regexp-alist-alist
  (eval-when-compile
+   ;; The order of this list is the default order of items in
+   ;; `compilation-error-regexp-alist' which is also the matching order,
+   ;; so don't add things in alphabetic order just out of habit.
+   ;; FIXME: We should sort it by frequency (less often used ones in the back),
+   ;; but individual patterns also have their own partial order.
   `((absoft
      "^\\(?:[Ee]rror on \\|[Ww]arning on\\( \\)\\)?[Ll]ine[ \t]+\\([0-9]+\\)[ \t]+\
 of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1))