diff lisp/progmodes/compile.el @ 94494:07fb6a1d5233

(compilation-error-regexp-alist-alist) <gnu>: Rule out trailing spaces in file and directory names as well.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Wed, 30 Apr 2008 08:12:20 +0000
parents c9abaca676e7
children c444df26b274
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Wed Apr 30 07:16:08 2008 +0000
+++ b/lisp/progmodes/compile.el	Wed Apr 30 08:12:20 2008 +0000
@@ -237,8 +237,13 @@
      ;; times of the form "HH:MM:SS" where MM is taken as a line number, so
      ;; the last line tries to rule out message where the info after the
      ;; line number starts with "SS".  --Stef
+
+     ;; The core of the regexp is the one with *?.  It says that a file name
+     ;; can be composed of any non-newline char, but it also rules out some
+     ;; valid but unlikely cases, such as a trailing space or a space
+     ;; followed by a -.
      "^\\(?:[[:alpha:]][-[:alnum:].]+: ?\\)?\
-\\([0-9]*[^0-9\n]\\(?:[^\n ]\\| [^-\n]\\)*?\\): ?\
+\\([0-9]*[^0-9\n]\\(?:[^\n ]\\| [^-/\n]\\)*?\\): ?\
 \\([0-9]+\\)\\(?:\\([.:]\\)\\([0-9]+\\)\\)?\
 \\(?:-\\([0-9]+\\)?\\(?:\\3\\([0-9]+\\)\\)?\\)?:\
 \\(?: *\\(\\(?:Future\\|Runtime\\)?[Ww]arning\\|W:\\)\\|\