changeset 2471:c5e43751f9aa

(compilation-error-regexp-alist): Fixed MIPS CC regexp to match file names longer than one char. (compilation-parse-errors): Error if compilation-error-regexp-alist is nil.
author Roland McGrath <roland@gnu.org>
date Wed, 07 Apr 1993 18:26:27 +0000
parents 6643737d26ae
children f911936cec3f
files lisp/progmodes/compile.el
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/compile.el	Wed Apr 07 16:36:59 1993 +0000
+++ b/lisp/progmodes/compile.el	Wed Apr 07 18:26:27 1993 +0000
@@ -128,7 +128,7 @@
     ;;	"foo.f", line 3: Error: syntax error near end of statement
     ;; or MIPS RISC CC - the one distributed with Ultrix:
     ;;	ccom: Error: foo.c, line 2: syntax error
-    ("\\b\"?\\([^,\" \n\t]\\)\"?, line \\([0-9]+\\):" 1 2)
+    ("\\b\"?\\([^,\" \n\t]+\\)\"?, line \\([0-9]+\\):" 1 2)
 
     ;; IBM AIX PS/2 C version 1.1:
     ;;	****** Error number 140 in line 8 of file errors.c ******
@@ -883,7 +883,8 @@
     ;; Compile an alist (IDX FILE LINE), where IDX is the number of the
     ;; subexpression for an entire error-regexp, and FILE and LINE are the
     ;; numbers for the subexpressions giving the file name and line number.
-    (setq alist compilation-error-regexp-alist
+    (setq alist (or compilation-error-regexp-alist
+		    (error "compilation-error-regexp-alist is empty!"))
 	  subexpr (1+ error-group))
     (while alist
       (setq error-regexp-groups (cons (list subexpr
@@ -939,9 +940,10 @@
 	     (while (and alist
 			 (null (match-beginning (car (car alist)))))
 	       (setq alist (cdr alist)))
+	     (setq losing-data (match-data))
 	     (if alist
 		 (setq alist (car alist))
-	       (error "compilation-parse-errors: Impossible regexp match!"))
+	       (error "compilation-parse-errors: impossible regexp match!"))
 	     
 	     ;; Extract the file name and line number from the error message.
 	     (let ((beginning-of-match (match-beginning 0)) ;looking-at nukes
@@ -991,7 +993,7 @@
 	       )
 	     )
 	    (t
-	     (error "compilation-parse-errors: impossible regexp match!")))
+	     (error "compilation-parse-errors: known groups didn't match!")))
 
       (message "Parsing error messages...%d (%d%% of buffer)"
 	       compilation-num-errors-found