diff options
| author | Roland McGrath | 1992-09-02 23:15:36 +0000 |
|---|---|---|
| committer | Roland McGrath | 1992-09-02 23:15:36 +0000 |
| commit | 15d1a8dab697a64da935e8df8fa524e36499ff40 (patch) | |
| tree | d3245d1d9a96c7c9dbbdd9a15ffeea175edfc565 | |
| parent | a5f8804e5dc573001204ca478e7b208772845c9e (diff) | |
| download | emacs-15d1a8dab697a64da935e8df8fa524e36499ff40.tar.gz emacs-15d1a8dab697a64da935e8df8fa524e36499ff40.zip | |
*** empty log message ***
| -rw-r--r-- | lisp/progmodes/compile.el | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 8bf1a279848..5b96deb3317 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -90,6 +90,7 @@ are found.") | |||
| 90 | 90 | ||
| 91 | (defvar compilation-error-regexp-alist | 91 | (defvar compilation-error-regexp-alist |
| 92 | '( | 92 | '( |
| 93 | ;; NOTE! This first one is repeated in grep-regexp-alist, below. | ||
| 93 | ;; 4.3BSD grep, cc, lint pass 1: | 94 | ;; 4.3BSD grep, cc, lint pass 1: |
| 94 | ;; /usr/src/foo/foo.c(8): warning: w may be used before set | 95 | ;; /usr/src/foo/foo.c(8): warning: w may be used before set |
| 95 | ;; or GNU utilities | 96 | ;; or GNU utilities |
| @@ -122,6 +123,10 @@ are found.") | |||
| 122 | compilation. If REGEXP matches, the FILE-IDX'th subexpression gives the file | 123 | compilation. If REGEXP matches, the FILE-IDX'th subexpression gives the file |
| 123 | name, and the LINE-IDX'th subexpression gives the line number.") | 124 | name, and the LINE-IDX'th subexpression gives the line number.") |
| 124 | 125 | ||
| 126 | (defvar grep-regexp-alist | ||
| 127 | '(("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) | ||
| 128 | "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") | ||
| 129 | |||
| 125 | ;;;###autoload | 130 | ;;;###autoload |
| 126 | (defvar compilation-search-path '(nil) | 131 | (defvar compilation-search-path '(nil) |
| 127 | "*List of directories to search for source files named in error messages. | 132 | "*List of directories to search for source files named in error messages. |
| @@ -205,7 +210,9 @@ easily repeat a grep command." | |||
| 205 | (list (read-from-minibuffer "Run grep (like this): " | 210 | (list (read-from-minibuffer "Run grep (like this): " |
| 206 | "grep -n " nil nil 'grep-history))) | 211 | "grep -n " nil nil 'grep-history))) |
| 207 | (compile-internal (concat command-args " /dev/null") | 212 | (compile-internal (concat command-args " /dev/null") |
| 208 | "No more grep hits" "grep")) | 213 | "No more grep hits" "grep" |
| 214 | ;; Give it a simpler regexp to match. | ||
| 215 | nil grep-regexp-alist)) | ||
| 209 | 216 | ||
| 210 | (defun compile-internal (command error-message | 217 | (defun compile-internal (command error-message |
| 211 | &optional name-of-mode parser regexp-alist | 218 | &optional name-of-mode parser regexp-alist |
| @@ -545,6 +552,9 @@ other kinds of prefix arguments are ignored." | |||
| 545 | (setq compilation-last-buffer (current-buffer)) | 552 | (setq compilation-last-buffer (current-buffer)) |
| 546 | (compile-reinitialize-errors argp (point)) | 553 | (compile-reinitialize-errors argp (point)) |
| 547 | 554 | ||
| 555 | ;; Move to bol; the marker for the error on this line will point there. | ||
| 556 | (beginning-of-line) | ||
| 557 | |||
| 548 | ;; Move compilation-error-list to the elt of compilation-old-error-list | 558 | ;; Move compilation-error-list to the elt of compilation-old-error-list |
| 549 | ;; we want. | 559 | ;; we want. |
| 550 | (setq compilation-error-list compilation-old-error-list) | 560 | (setq compilation-error-list compilation-old-error-list) |