aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath1994-11-10 23:01:15 +0000
committerRoland McGrath1994-11-10 23:01:15 +0000
commit08b1edf49fab9fb775aa0a64860c6e029ceaeca7 (patch)
treecd28721693b2516d69f61b2d919992cc579b2584
parentdb965a28af038ec577f26288c86a6366e5fddd2e (diff)
downloademacs-08b1edf49fab9fb775aa0a64860c6e029ceaeca7.tar.gz
emacs-08b1edf49fab9fb775aa0a64860c6e029ceaeca7.zip
(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.
-rw-r--r--lisp/progmodes/compile.el30
1 files changed, 13 insertions, 17 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 4b4334ab6cd..884e93d0aa5 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -108,19 +108,15 @@ or when it is used with \\[next-error] or \\[compile-goto-error].")
108 ;; foo.c:8: error message 108 ;; foo.c:8: error message
109 ;; or HP-UX 7.0 fc: 109 ;; or HP-UX 7.0 fc:
110 ;; foo.f :16 some horrible error message 110 ;; foo.f :16 some horrible error message
111 ;; 111 ;; or GNU utilities with column (GNAT 1.82):
112 ;; We refuse to match file:number:number 112 ;; foo.adb:2:1: Unit name does not match file name
113 ;; because we want to leave that for another case (see below, GNAT).
114 ;; 113 ;;
115 ;; We'll insist that the number be followed by a colon or closing 114 ;; We'll insist that the number be followed by a colon or closing
116 ;; paren, because otherwise this matches just about anything 115 ;; paren, because otherwise this matches just about anything
117 ;; containing a number with spaces around it. 116 ;; containing a number with spaces around it.
118 ("\n\\([^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\)\\([) \t]\\|:[^0-9\n]\\)" 1 2) 117 ("\n\
119 118\\([^:( \t\n]+\\)[:(][ \t]*\\([0-9]+\\)\\([) \t]\\|\
120 ;; GNU error message with a program name in it. 119:\\([^0-9\n]\\|\\([0-9]+:\\)\\)\\)" 1 2 5)
121 ;; compilername:file:linenum: error message
122 ("\n\\([^:( \t\n]+\\):\\([^:( \t\n]+\\):[ \t]*\\([0-9]+\\)\\(:[^0-9\n]\\)"
123 2 3)
124 120
125 ;; Borland C++: 121 ;; Borland C++:
126 ;; Error ping.c 15: Unable to open include file 'sys/types.h' 122 ;; Error ping.c 15: Unable to open include file 'sys/types.h'
@@ -179,17 +175,13 @@ of[ \t]+\"?\\([^\":\n]+\\)\"?:" 3 2)
179 ;; E, file.cc(35,52) Illegal operation on pointers 175 ;; E, file.cc(35,52) Illegal operation on pointers
180 ("\n[EW], \\([^(\n]*\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" 1 2 3) 176 ("\n[EW], \\([^(\n]*\\)(\\([0-9]+\\),[ \t]*\\([0-9]+\\)" 1 2 3)
181 177
182 ;; GNAT compiler v1.82 178 ;; GNU messages with program name and optional column number.
183 ;; foo.adb:2:1: Unit name does not match file name 179 ("\n[^0-9 \n\t:]+:[ \t]*\\([^ \n\t:]+\\):\
184 ("\n\\([^ \n\t:]+\\):\\([0-9]+\\):\\([0-9]+\\)[: \t]" 1 2 3) 180\\([0-9]+\\):\\(\\([0-9]+\\)[: \t]\\)?" 1 2 4)
185 181
186 ;; SGI Irix 5.2 compiler warnings 182 ;; SGI Irix 5.2 compiler warnings
187 ;; cfe: Warning 835: vpr_tiff.c, line 65: No prototype for the call to rint 183 ;; cfe: Warning 835: vpr_tiff.c, line 65: No prototype for the call to rint
188 ("ning [0-9]+: \\([^,\" \n\t]+\\)[,:] \\(line \\)?\\([0-9]+\\):" 1 3) 184 ("ning [0-9]+: \\([^,\" \n\t]+\\)[,:] \\(line \\)?\\([0-9]+\\):" 1 3)
189
190 ;; GNU message with program name and column number.
191 ("\n\\([^ \n\t:]+\\):\\([^ \n\t:]+\\):\
192\\([0-9]+\\):\\([0-9]+\\)[: \t]" 2 3 4)
193 ) 185 )
194 "Alist that specifies how to match errors in compiler output. 186 "Alist that specifies how to match errors in compiler output.
195Each element has the form (REGEXP FILE-IDX LINE-IDX [COLUMN-IDX]). 187Each element has the form (REGEXP FILE-IDX LINE-IDX [COLUMN-IDX]).
@@ -270,6 +262,9 @@ with output going to the buffer `*compilation*'.
270You can then use the command \\[next-error] to find the next error message 262You can then use the command \\[next-error] to find the next error message
271and move to the source code that caused it. 263and move to the source code that caused it.
272 264
265Interactively, prompts for the command if `compilation-read-command' is
266non-nil; otherwise uses `compile-command'. With prefix arg, always prompts.
267
273To run more than one compilation at once, start one and rename the 268To run more than one compilation at once, start one and rename the
274\`*compilation*' buffer to some other name with \\[rename-buffer]. 269\`*compilation*' buffer to some other name with \\[rename-buffer].
275Then start the next one. 270Then start the next one.
@@ -278,7 +273,7 @@ The name used for the buffer is actually whatever is returned by
278the function in `compilation-buffer-name-function', so you can set that 273the function in `compilation-buffer-name-function', so you can set that
279to a function that generates a unique name." 274to a function that generates a unique name."
280 (interactive 275 (interactive
281 (if compilation-read-command 276 (if (or compilation-read-command current-prefix-arg)
282 (list (read-from-minibuffer "Compile command: " 277 (list (read-from-minibuffer "Compile command: "
283 compile-command nil nil 278 compile-command nil nil
284 '(compile-history . 1))) 279 '(compile-history . 1)))
@@ -1306,6 +1301,7 @@ See variable `compilation-parse-errors-function' for the interface it uses."
1306 (match-beginning (nth 2 alist)) 1301 (match-beginning (nth 2 alist))
1307 (match-end (nth 2 alist))))) 1302 (match-end (nth 2 alist)))))
1308 (column (and (nth 3 alist) 1303 (column (and (nth 3 alist)
1304 (match-beginning (nth 3 alist))
1309 (string-to-int 1305 (string-to-int
1310 (buffer-substring 1306 (buffer-substring
1311 (match-beginning (nth 3 alist)) 1307 (match-beginning (nth 3 alist))