aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorNoam Postavsky2018-07-09 16:56:47 -0400
committerNoam Postavsky2018-07-12 21:49:50 -0400
commit3eb4603b0d432740ff4e8deb637cca2f35cf5fee (patch)
tree0333e7f6507ec70149cc79758198c002caeb059d /lisp
parent5cc7c4b48a2d6eca5d14d12b1cd258bf9cabde74 (diff)
downloademacs-3eb4603b0d432740ff4e8deb637cca2f35cf5fee.tar.gz
emacs-3eb4603b0d432740ff4e8deb637cca2f35cf5fee.zip
Match w32 paths in grep sans --null hits (Bug#32051)
* lisp/progmodes/grep.el (grep-regexp-alist): Add an optional part to match paths starting with C: (other drive letters). * test/lisp/progmodes/compile-tests.el (compile-tests--grep-regexp-testcases) (compile-tests--grep-regexp-tricky-testcases) (compile-test-grep-regexps): New tests. (compile--test-error-line): Return `compilation-message'.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/grep.el4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index da09c900e58..0bfabd5f3fe 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -379,7 +379,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
379 ;; to handle weird file names (with colons in them) as 379 ;; to handle weird file names (with colons in them) as
380 ;; well as possible. E.g., use [1-9][0-9]* rather than 380 ;; well as possible. E.g., use [1-9][0-9]* rather than
381 ;; [0-9]+ so as to accept ":034:" in file names. 381 ;; [0-9]+ so as to accept ":034:" in file names.
382 "\\(?1:[^\n:]+?[^\n/:]\\):[\t ]*\\(?2:[1-9][0-9]*\\)[\t ]*:" 382 "\\(?1:"
383 "\\(?:[a-zA-Z]:\\)?" ; Allow "C:..." for w32.
384 "[^\n:]+?[^\n/:]\\):[\t ]*\\(?2:[1-9][0-9]*\\)[\t ]*:"
383 "\\)") 385 "\\)")
384 1 2 386 1 2
385 ;; Calculate column positions (col . end-col) of first grep match on a line 387 ;; Calculate column positions (col . end-col) of first grep match on a line