Mercurial > emacs
changeset 1072:8e0a8faed93a
*** empty log message ***
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Wed, 02 Sep 1992 23:15:36 +0000 |
parents | 53ad9fa87f71 |
children | 721e4f57c8b0 |
files | lisp/progmodes/compile.el |
diffstat | 1 files changed, 11 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/compile.el Wed Sep 02 21:41:14 1992 +0000 +++ b/lisp/progmodes/compile.el Wed Sep 02 23:15:36 1992 +0000 @@ -90,6 +90,7 @@ (defvar compilation-error-regexp-alist '( + ;; NOTE! This first one is repeated in grep-regexp-alist, below. ;; 4.3BSD grep, cc, lint pass 1: ;; /usr/src/foo/foo.c(8): warning: w may be used before set ;; or GNU utilities @@ -122,6 +123,10 @@ compilation. If REGEXP matches, the FILE-IDX'th subexpression gives the file name, and the LINE-IDX'th subexpression gives the line number.") +(defvar grep-regexp-alist + '(("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) + "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") + ;;;###autoload (defvar compilation-search-path '(nil) "*List of directories to search for source files named in error messages. @@ -205,7 +210,9 @@ (list (read-from-minibuffer "Run grep (like this): " "grep -n " nil nil 'grep-history))) (compile-internal (concat command-args " /dev/null") - "No more grep hits" "grep")) + "No more grep hits" "grep" + ;; Give it a simpler regexp to match. + nil grep-regexp-alist)) (defun compile-internal (command error-message &optional name-of-mode parser regexp-alist @@ -545,6 +552,9 @@ (setq compilation-last-buffer (current-buffer)) (compile-reinitialize-errors argp (point)) + ;; Move to bol; the marker for the error on this line will point there. + (beginning-of-line) + ;; Move compilation-error-list to the elt of compilation-old-error-list ;; we want. (setq compilation-error-list compilation-old-error-list)