Variable: grep-regexp-alist

grep-regexp-alist is a variable defined in grep.el.gz.

Value

(("^\\(?:\\(?1:[^�\n]+\\)\\(?3:�\\)\\(?2:[0-9]+\\):\\|\\(?1:\\(?:[a-zA-Z]:\\)?[^\n:]+?[^\n/:]\\):[	 ]*\\(?2:[1-9][0-9]*\\)[	 ]*:\\)" 1 2
  (#[0 "\205�\302\225\212\211b\210\303 )\304\305	$\211\205�\211Z\266\203\207"
       [grep-highlight-matches grep-match-face 0 line-end-position text-property-any font-lock-face]
       7]
   .
   #[0 "\205'�\302\225\212\211b\210\303 )\304\305	$\211\205�\306\305\307$\211\205%�\211ZS\266\204\207"
       [grep-highlight-matches grep-match-face 0 line-end-position text-property-any font-lock-face next-single-property-change nil]
       8])
  nil nil
  (3
   '(face nil display ":")))
 ("^Binary file \\(.+\\) matches" 1 nil nil 0 1))

Documentation

Regexp used to match grep hits.

See compilation-error-regexp-alist for format details.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/grep.el.gz
;;;###autoload
(defconst grep-regexp-alist
  `((,(concat "^\\(?:"
              ;; Parse using NUL characters when `--null' is used.
              ;; Note that we must still assume no newlines in
              ;; filenames due to "foo: Is a directory." type
              ;; messages.
              "\\(?1:[^\0\n]+\\)\\(?3:\0\\)\\(?2:[0-9]+\\):"
              "\\|"
              ;; Fallback if `--null' is not used, use a tight regexp
              ;; to handle weird file names (with colons in them) as
              ;; well as possible.  E.g., use [1-9][0-9]* rather than
              ;; [0-9]+ so as to accept ":034:" in file names.
              "\\(?1:"
              "\\(?:[a-zA-Z]:\\)?" ; Allow "C:..." for w32.
              "[^\n:]+?[^\n/:]\\):[\t ]*\\(?2:[1-9][0-9]*\\)[\t ]*:"
              "\\)")
     1 2
     ;; Calculate column positions (col . end-col) of first grep match on a line
     (,(lambda ()
         (when grep-highlight-matches
           (let* ((beg (match-end 0))
                  (end (save-excursion (goto-char beg) (line-end-position)))
                  (mbeg
                   (text-property-any beg end 'font-lock-face grep-match-face)))
             (when mbeg
               (- mbeg beg)))))
      .
      ,(lambda ()
         (when grep-highlight-matches
           (let* ((beg (match-end 0))
                  (end (save-excursion (goto-char beg) (line-end-position)))
                  (mbeg
                   (text-property-any beg end 'font-lock-face grep-match-face))
                  (mend
                   (and mbeg (next-single-property-change
                              mbeg 'font-lock-face nil end))))
             (when mend
               (- mend beg 1))))))
     nil nil
     (3 '(face nil display ":")))
    ("^Binary file \\(.+\\) matches" 1 nil nil 0 1))
  "Regexp used to match grep hits.
See `compilation-error-regexp-alist' for format details.")