* lisp/progmodes/grep.el (grep-mode-font-lock-keywords): Support =linenumber=
authorJuri Linkov <juri@jurta.org>
Fri, 24 May 2013 20:54:38 +0000 (23:54 +0300)
committerJuri Linkov <juri@jurta.org>
Fri, 24 May 2013 20:54:38 +0000 (23:54 +0300)
format used by git-grep for lines with function names.

Fixes: debbugs:13549

etc/grep.txt
lisp/ChangeLog
lisp/progmodes/grep.el

index 70f2501..86f7258 100644 (file)
@@ -72,6 +72,14 @@ Grep finished (matches found) at Thu Jul 21 15:02:15
 agrep -n "INFO tree" ../info/*
 ../info/dir: 6: File: dir      Node: Top       This is the top of the INFO tree
 
+* git-grep
+  with `[diff "el"] xfuncname = "^(\\(.*)$"' in .gitconfig
+  and `*.el diff=el' in .gitattributes
+
+git grep -inH -p -e "org-element-map"
+lisp/org/org.el=20969=(defun org-fill-paragraph (&optional justify)
+lisp/org/org.el:21047:               (org-element-map
+
 * unknown greps
 
 grep -nH -e "xyzxyz" ../info/*
index 2495620..e12652e 100644 (file)
@@ -1,3 +1,9 @@
+2013-05-24  Juri Linkov  <juri@jurta.org>
+
+       * progmodes/grep.el (grep-mode-font-lock-keywords):
+       Support =linenumber= format used by git-grep for lines with
+       function names.  (Bug#13549)
+
 2013-05-24  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * progmodes/octave.el (octave-smie-rules): Return nil rather than
index 1e152c6..46af51e 100644 (file)
@@ -410,7 +410,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies
       (0 '(face nil compilation-message nil help-echo nil mouse-face nil) t)
       (1 grep-error-face)
       (2 grep-error-face nil t))
-     ("^.+?-[0-9]+-.*\n" (0 grep-context-face)))
+     ;; "filename-linenumber-" format is used for context lines in GNU grep,
+     ;; "filename=linenumber=" for lines with function names in "git grep -p".
+     ("^.+?[-=][0-9]+[-=].*\n" (0 grep-context-face)))
    "Additional things to highlight in grep output.
 This gets tacked on the end of the generated expressions.")