Mercurial > emacs
comparison lisp/progmodes/compile.el @ 727:540b047ece4d
*** empty log message ***
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Wed, 24 Jun 1992 05:09:26 +0000 |
parents | 16823e891d56 |
children | a8d94735277e |
comparison
equal
deleted
inserted
replaced
726:5f08efa38dd0 | 727:540b047ece4d |
---|---|
1 ;;; compile.el --- run compiler as inferior of Emacs, and parse its error messages. | 1 ;;; compile.el --- run compiler as inferior of Emacs, parse error messages. |
2 | 2 |
3 ;;;!!! dup removal is broken. | 3 ;;;!!! dup removal is broken. |
4 | 4 |
5 ;; Copyright (C) 1985-1991 Free Software Foundation, Inc. | 5 ;; Copyright (C) 1985-1991 Free Software Foundation, Inc. |
6 | 6 |
82 ;; or GNU utilities | 82 ;; or GNU utilities |
83 ;; foo.c:8: error message | 83 ;; foo.c:8: error message |
84 ("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2) | 84 ("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2) |
85 ;; 4.3BSD lint pass 2 | 85 ;; 4.3BSD lint pass 2 |
86 ;; strcmp: variable # of args. llib-lc(359) :: /usr/src/foo/foo.c(8) | 86 ;; strcmp: variable # of args. llib-lc(359) :: /usr/src/foo/foo.c(8) |
87 ("[ \t:]+\\([^:( \t\n]+\\)[ \t]*[:(]+[ \t]*\\([0-9]+\\)[:) \t]*$" 1 2) | 87 ("[ \t:]+\\([^:( \t\n]+\\)[ \t]*[:(]*(+[ \t]*\\([0-9]+\\))[:) \t]*$" 1 2) |
88 ;; 4.3BSD lint pass 3 | 88 ;; 4.3BSD lint pass 3 |
89 ;; bloofle defined( /users/wolfgang/foo.c(4) ), but never used | 89 ;; bloofle defined( /users/wolfgang/foo.c(4) ), but never used |
90 ("[ \t(]+\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]+" 1 2) | 90 ;; This used to be |
91 ;; ("[ \t(]+\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]+" 1 2) | |
92 ;; which is regexp Impressionism - it matches almost anything! | |
93 ("([ \t]*\\([^:( \t\n]+\\)[ \t]*[:(][ \t]*\\([0-9]+\\))" 1 2) | |
91 ;; Line 45 of "foo.c": bloofel undefined (who does this?) | 94 ;; Line 45 of "foo.c": bloofel undefined (who does this?) |
92 ("^[Ll]ine[ \t]+\\([0-9]+\\)[ \t]+of[ \t]+\"\\([^\"]+\\)\":" 2 1) | 95 ("^[Ll]ine[ \t]+\\([0-9]+\\)[ \t]+of[ \t]+\"\\([^\"\n]+\\)\":" 2 1) |
93 ;; Apollo cc, 4.3BSD fc | 96 ;; Apollo cc, 4.3BSD fc |
94 ;; "foo.f", line 3: Error: syntax error near end of statement | 97 ;; "foo.f", line 3: Error: syntax error near end of statement |
95 ("^\"\\([^\"]+\\)\", line \\([0-9]+\\):" 1 2) | 98 ("^\"\\([^\"\n]+\\)\", line \\([0-9]+\\):" 1 2) |
96 ;; HP-UX 7.0 fc | 99 ;; HP-UX 7.0 fc |
97 ;; foo.f :16 some horrible error message | 100 ;; foo.f :16 some horrible error message |
98 ("\\([^ \t:]+\\)[ \t]*:\\([0-9]+\\)" 1 2) | 101 ("^\\([^ \t\n:]+\\)[ \t]*:\\([0-9]+\\)" 1 2) |
99 ;; IBM AIX PS/2 C version 1.1 | 102 ;; IBM AIX PS/2 C version 1.1 |
100 ;; ****** Error number 140 in line 8 of file errors.c ****** | 103 ;; ****** Error number 140 in line 8 of file errors.c ****** |
101 ("in line \\([0-9]+\\) of file \\([^ ]+[^. ]\\)\\.? " 2 1) | 104 ("in line \\([0-9]+\\) of file \\([^ \n]+[^. \n]\\)\\.? " 2 1) |
102 ;; IBM AIX lint is too painful to do right this way. File name | 105 ;; IBM AIX lint is too painful to do right this way. File name |
103 ;; prefixes entire sections rather than being on each line. | 106 ;; prefixes entire sections rather than being on each line. |
104 ) | 107 ) |
105 "Alist (REGEXP FILE-IDX LINE-IDX) of regular expressions to match errors in | 108 "Alist (REGEXP FILE-IDX LINE-IDX) of regular expressions to match errors in |
106 compilation. If REGEXP matches, the FILE-IDX'th subexpression gives the file | 109 compilation. If REGEXP matches, the FILE-IDX'th subexpression gives the file |
130 "Last shell command used to do a grep search; default for next search. | 133 "Last shell command used to do a grep search; default for next search. |
131 Typically \"grep -n\" or \"egrep -n\". | 134 Typically \"grep -n\" or \"egrep -n\". |
132 \(The \"-n\" option tells grep to output line numbers.)") | 135 \(The \"-n\" option tells grep to output line numbers.)") |
133 | 136 |
134 (defconst compilation-enter-directory-regexp | 137 (defconst compilation-enter-directory-regexp |
135 ": Entering directory `\\\(.*\\\)'$" | 138 ": Entering directory `\\(.*\\)'$" |
136 "Regular expression for a line in the compilation log that | 139 "Regular expression for a line in the compilation log that |
137 changes the current directory. This must contain one \\\(, \\\) pair | 140 changes the current directory. This must contain one \\(, \\) pair |
138 around the directory name. | 141 around the directory name. |
139 | 142 |
140 The default value matches lines printed by the `-w' option of GNU Make.") | 143 The default value matches lines printed by the `-w' option of GNU Make.") |
141 | 144 |
142 (defconst compilation-leave-directory-regexp | 145 (defconst compilation-leave-directory-regexp |
143 ": Leaving directory `\\\(.*\\\)'$" | 146 ": Leaving directory `\\(.*\\)'$" |
144 "Regular expression for a line in the compilation log that | 147 "Regular expression for a line in the compilation log that |
145 changes the current directory to a previous value. This may | 148 changes the current directory to a previous value. This may |
146 contain one \\\(, \\\) pair around the name of the directory | 149 contain one \\(, \\) pair around the name of the directory |
147 being moved from. If it does not, the last directory entered | 150 being moved from. If it does not, the last directory entered |
148 \(by a line matching `compilation-enter-directory-regexp'\) is assumed. | 151 \(by a line matching `compilation-enter-directory-regexp'\) is assumed. |
149 | 152 |
150 The default value matches lines printed by the `-w' option of GNU Make.") | 153 The default value matches lines printed by the `-w' option of GNU Make.") |
151 | 154 |
341 ;; and hack its mode line. | 344 ;; and hack its mode line. |
342 (set-buffer buffer) | 345 (set-buffer buffer) |
343 (setq omax (point-max) | 346 (setq omax (point-max) |
344 opoint (point)) | 347 opoint (point)) |
345 (goto-char omax) | 348 (goto-char omax) |
349 ;; Record where we put the message, so we can ignore it | |
350 ;; later on. | |
346 (insert ?\n mode-name " " msg) | 351 (insert ?\n mode-name " " msg) |
347 (forward-char -1) | 352 (forward-char -1) |
348 (insert " at " (substring (current-time-string) 0 19)) | 353 (insert " at " (substring (current-time-string) 0 19)) |
349 (forward-char 1) | 354 (forward-char 1) |
350 (setq mode-line-process | 355 (setq mode-line-process |