From bde94a7f475a7b6ecdfd1def20f1f459c7b97c00 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Thu, 25 Nov 2004 03:05:00 +0000 Subject: [PATCH] (grep-regexp-alist): Don't match parens around line numbers. --- lisp/progmodes/grep.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index 7a13ddba6ed..fd4b716ae4b 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el @@ -247,9 +247,12 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies ;;;###autoload (defvar grep-regexp-alist - '(("^\\(.+?\\)[:( \t]+\ + ;; rms: I removed the code to match parens around the line number + ;; because it causes confusion and so we will find out if anyone needs it. + ;; It causes confusion with a file name that contains a number in parens. + '(("^\\(.+?\\)[: \t]+\ \\([0-9]+\\)\\([.:]?\\)\\([0-9]+\\)?\ -\\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[:) \t]" 1 (2 . 5) (4 . 6)) +\\(?:-\\(?:\\([0-9]+\\)\\3\\)?\\.?\\([0-9]+\\)?\\)?[: \t]" 1 (2 . 5) (4 . 6)) ("^\\(.+?\\)[:(]+\\([0-9]+\\)\\([:)]\\).*?\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" 1 2 ;; Calculate column positions (beg . end) of first grep match on a line -- 2.39.5