From bb6da2f86fbf255b0bab2fb4ee1104ca81adb904 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 30 Apr 2008 08:12:20 +0000 Subject: [PATCH] (compilation-error-regexp-alist-alist) : Rule out trailing spaces in file and directory names as well. --- lisp/ChangeLog | 3 +++ lisp/progmodes/compile.el | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a82d31d154c..d7d58bdcca6 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -16,6 +16,9 @@ 2008-04-30 Stefan Monnier + * progmodes/compile.el (compilation-error-regexp-alist-alist) : + Rule out trailing spaces in file and directory names as well. + * minibuffer.el (completion--do-completion): Move point even if the completion makes no change. (completion-pcm-try-completion): Fix computation of new point. diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 455a6ae21f9..2f5f329d0b1 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el @@ -237,8 +237,13 @@ of[ \t]+\"?\\([a-zA-Z]?:?[^\":\n]+\\)\"?:" 3 2 nil (1)) ;; 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:\\)\\|\ -- 2.39.5