Mercurial > emacs
changeset 9888:9d7972f4657c
(compile): With prefix arg, prompt even if (not compilation-read-command).
(compilation-error-regexp-alist): Make first regexp match column numbers too.
Remove regexp for "prog:file:line: error".
Replace GNAT 1.82 regexp with "prog: file:line\(:col\)?: error".
(compilation-parse-errors): If spec has a column subexpr, but it was
optional and didn't match, ignore it.
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Thu, 10 Nov 1994 23:01:15 +0000 |
parents | be7b66e2cb98 |
children | fd275e625abe |
files | lisp/progmodes/compile.el |
diffstat | 1 files changed, 13 insertions(+), 17 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/progmodes/compile.el Thu Nov 10 22:26:57 1994 +0000 +++ b/lisp/progmodes/compile.el Thu Nov 10 23:01:15 1994 +0000 @@ -108,19 +108,15 @@ ;; foo.c:8: error message ;; or HP-UX 7.0 fc: ;; foo.f :16 some horrible error message - ;; - ;; We refuse to match file:number:number - ;; because we want to leave that for another case (see below, GNAT). + ;; or GNU utilities with column (GNAT 1.82): + ;; foo.adb:2:1: Unit name does not match file name ;; ;; We'll insist that the number be followed by a colon or closing ;; paren, because otherwise this matches just about anything ;; containing a number with spaces around it. - ("\n\\([^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\)\\([) \t]\\|:[^0-9\n]\\)" 1 2) - - ;; GNU error message with a program name in it. - ;; compilername:file:linenum: error message - ("\n\\([^:( \t\n]+\\):\\([^:( \t\n]+\\):[ \t]*\\([0-9]+\\)\\(:[^0-9\n]\\)" - 2 3) + ("\n\ +\\([^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\)\\([) \t]\\|\ +:\\([^0-9\n]\\|\\([0-9]+:\\)\\)\\)" 1 2 5) ;; Borland C++: ;; Error ping.c 15: Unable to open include file 'sys/types.h' @@ -179,17 +175,13 @@ ;; E, file.cc(35,52) Illegal operation on pointers ("\n[EW], \\([^(\n]*\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" 1 2 3) - ;; GNAT compiler v1.82 - ;; foo.adb:2:1: Unit name does not match file name - ("\n\\([^ \n\t:]+\\):\\([0-9]+\\):\\([0-9]+\\)[: \t]" 1 2 3) + ;; GNU messages with program name and optional column number. + ("\n[^0-9 \n\t:]+:[ \t]*\\([^ \n\t:]+\\):\ +\\([0-9]+\\):\\(\\([0-9]+\\)[: \t]\\)?" 1 2 4) ;; SGI Irix 5.2 compiler warnings ;; cfe: Warning 835: vpr_tiff.c, line 65: No prototype for the call to rint ("ning [0-9]+: \\([^,\" \n\t]+\\)[,:] \\(line \\)?\\([0-9]+\\):" 1 3) - - ;; GNU message with program name and column number. - ("\n\\([^ \n\t:]+\\):\\([^ \n\t:]+\\):\ -\\([0-9]+\\):\\([0-9]+\\)[: \t]" 2 3 4) ) "Alist that specifies how to match errors in compiler output. Each element has the form (REGEXP FILE-IDX LINE-IDX [COLUMN-IDX]). @@ -270,6 +262,9 @@ You can then use the command \\[next-error] to find the next error message and move to the source code that caused it. +Interactively, prompts for the command if `compilation-read-command' is +non-nil; otherwise uses `compile-command'. With prefix arg, always prompts. + To run more than one compilation at once, start one and rename the \`*compilation*' buffer to some other name with \\[rename-buffer]. Then start the next one. @@ -278,7 +273,7 @@ the function in `compilation-buffer-name-function', so you can set that to a function that generates a unique name." (interactive - (if compilation-read-command + (if (or compilation-read-command current-prefix-arg) (list (read-from-minibuffer "Compile command: " compile-command nil nil '(compile-history . 1))) @@ -1306,6 +1301,7 @@ (match-beginning (nth 2 alist)) (match-end (nth 2 alist))))) (column (and (nth 3 alist) + (match-beginning (nth 3 alist)) (string-to-int (buffer-substring (match-beginning (nth 3 alist))