diff options
| author | Roland McGrath | 1995-12-20 19:41:30 +0000 |
|---|---|---|
| committer | Roland McGrath | 1995-12-20 19:41:30 +0000 |
| commit | 501cf4283fbd8a94d4298db374d7415ea52fec73 (patch) | |
| tree | bbc8a412383f421ed5d277a88dfc5cbb7a07d05b | |
| parent | 453ed650c80c7fe692b3ff0ac49a7d997cdf83e7 (diff) | |
| download | emacs-501cf4283fbd8a94d4298db374d7415ea52fec73.tar.gz emacs-501cf4283fbd8a94d4298db374d7415ea52fec73.zip | |
(compilation-mode): Add autoload cookie.
| -rw-r--r-- | lisp/progmodes/compile.el | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index 172a4622791..b093158dcea 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -56,11 +56,11 @@ it at all.") | |||
| 56 | (defvar compilation-old-error-list nil | 56 | (defvar compilation-old-error-list nil |
| 57 | "Value of `compilation-error-list' after errors were parsed.") | 57 | "Value of `compilation-error-list' after errors were parsed.") |
| 58 | 58 | ||
| 59 | (defvar compilation-parse-errors-function 'compilation-parse-errors | 59 | (defvar compilation-parse-errors-function 'compilation-parse-errors |
| 60 | "Function to call to parse error messages from a compilation. | 60 | "Function to call to parse error messages from a compilation. |
| 61 | It takes args LIMIT-SEARCH and FIND-AT-LEAST. | 61 | It takes args LIMIT-SEARCH and FIND-AT-LEAST. |
| 62 | If LIMIT-SEARCH is non-nil, don't bother parsing past that location. | 62 | If LIMIT-SEARCH is non-nil, don't bother parsing past that location. |
| 63 | If FIND-AT-LEAST is non-nil, don't bother parsing after finding that | 63 | If FIND-AT-LEAST is non-nil, don't bother parsing after finding that |
| 64 | many new errors. | 64 | many new errors. |
| 65 | It should read in the source files which have errors and set | 65 | It should read in the source files which have errors and set |
| 66 | `compilation-error-list' to a list with an element for each error message | 66 | `compilation-error-list' to a list with an element for each error message |
| @@ -110,7 +110,7 @@ or when it is used with \\[next-error] or \\[compile-goto-error].") | |||
| 110 | ;; foo.f :16 some horrible error message | 110 | ;; foo.f :16 some horrible error message |
| 111 | ;; or GNU utilities with column (GNAT 1.82): | 111 | ;; or GNU utilities with column (GNAT 1.82): |
| 112 | ;; foo.adb:2:1: Unit name does not match file name | 112 | ;; foo.adb:2:1: Unit name does not match file name |
| 113 | ;; | 113 | ;; |
| 114 | ;; 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 |
| 115 | ;; paren, because otherwise this matches just about anything | 115 | ;; paren, because otherwise this matches just about anything |
| 116 | ;; containing a number with spaces around it. | 116 | ;; containing a number with spaces around it. |
| @@ -140,7 +140,7 @@ or when it is used with \\[next-error] or \\[compile-goto-error].") | |||
| 140 | ;; Some SGI cc version: | 140 | ;; Some SGI cc version: |
| 141 | ;; cfe: Warning 835: foo.c, line 2: something | 141 | ;; cfe: Warning 835: foo.c, line 2: something |
| 142 | ("\n\\(cfe\\|fort\\): [^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3) | 142 | ("\n\\(cfe\\|fort\\): [^:\n]*: \\([^ \n]*\\), line \\([0-9]+\\):" 2 3) |
| 143 | ;; Error on line 3 of t.f: Execution error unclassifiable statement | 143 | ;; Error on line 3 of t.f: Execution error unclassifiable statement |
| 144 | ;; Unknown who does this: | 144 | ;; Unknown who does this: |
| 145 | ;; Line 45 of "foo.c": bloofel undefined | 145 | ;; Line 45 of "foo.c": bloofel undefined |
| 146 | ;; Absoft FORTRAN 77 Compiler 3.1.3 | 146 | ;; Absoft FORTRAN 77 Compiler 3.1.3 |
| @@ -157,14 +157,14 @@ of[ \t]+\"?\\([^\":\n]+\\)\"?:" 3 2) | |||
| 157 | ;; File "foobar.ml", lines 5-8, characters 20-155: blah blah | 157 | ;; File "foobar.ml", lines 5-8, characters 20-155: blah blah |
| 158 | ;; Microtec mcc68k: | 158 | ;; Microtec mcc68k: |
| 159 | ;; "foo.c", line 32 pos 1; (E) syntax error; unexpected symbol: "lossage" | 159 | ;; "foo.c", line 32 pos 1; (E) syntax error; unexpected symbol: "lossage" |
| 160 | ;; GNAT (as of July 94): | 160 | ;; GNAT (as of July 94): |
| 161 | ;; "foo.adb", line 2(11): warning: file name does not match ... | 161 | ;; "foo.adb", line 2(11): warning: file name does not match ... |
| 162 | ("\"\\([^,\" \n\t]+\\)\", lines? \\([0-9]+\\)[:., (-]" 1 2) | 162 | ("\"\\([^,\" \n\t]+\\)\", lines? \\([0-9]+\\)[:., (-]" 1 2) |
| 163 | 163 | ||
| 164 | ;; MIPS RISC CC - the one distributed with Ultrix: | 164 | ;; MIPS RISC CC - the one distributed with Ultrix: |
| 165 | ;; ccom: Error: foo.c, line 2: syntax error | 165 | ;; ccom: Error: foo.c, line 2: syntax error |
| 166 | ;; DEC AXP OSF/1 cc | 166 | ;; DEC AXP OSF/1 cc |
| 167 | ;; /usr/lib/cmplrs/cc/cfe: Error: foo.c: 1: blah blah | 167 | ;; /usr/lib/cmplrs/cc/cfe: Error: foo.c: 1: blah blah |
| 168 | ("rror: \\([^,\" \n\t]+\\)[,:] \\(line \\)?\\([0-9]+\\):" 1 3) | 168 | ("rror: \\([^,\" \n\t]+\\)[,:] \\(line \\)?\\([0-9]+\\):" 1 3) |
| 169 | 169 | ||
| 170 | ;; IBM AIX PS/2 C version 1.1: | 170 | ;; IBM AIX PS/2 C version 1.1: |
| @@ -390,7 +390,7 @@ Returns the compilation buffer created." | |||
| 390 | (let ((regexp-alist (or regexp-alist compilation-error-regexp-alist)) | 390 | (let ((regexp-alist (or regexp-alist compilation-error-regexp-alist)) |
| 391 | (parser (or parser compilation-parse-errors-function)) | 391 | (parser (or parser compilation-parse-errors-function)) |
| 392 | (thisdir default-directory) | 392 | (thisdir default-directory) |
| 393 | outwin) | 393 | outwin) |
| 394 | (save-excursion | 394 | (save-excursion |
| 395 | ;; Clear out the compilation buffer and make it writable. | 395 | ;; Clear out the compilation buffer and make it writable. |
| 396 | ;; Change its default-directory to the directory where the compilation | 396 | ;; Change its default-directory to the directory where the compilation |
| @@ -432,7 +432,7 @@ Returns the compilation buffer created." | |||
| 432 | (set-process-sentinel proc 'compilation-sentinel) | 432 | (set-process-sentinel proc 'compilation-sentinel) |
| 433 | (set-process-filter proc 'compilation-filter) | 433 | (set-process-filter proc 'compilation-filter) |
| 434 | (set-marker (process-mark proc) (point) outbuf) | 434 | (set-marker (process-mark proc) (point) outbuf) |
| 435 | (setq compilation-in-progress | 435 | (setq compilation-in-progress |
| 436 | (cons proc compilation-in-progress))) | 436 | (cons proc compilation-in-progress))) |
| 437 | ;; No asynchronous processes available | 437 | ;; No asynchronous processes available |
| 438 | (message (format "Executing `%s'..." command)) | 438 | (message (format "Executing `%s'..." command)) |
| @@ -504,6 +504,7 @@ Returns the compilation buffer created." | |||
| 504 | "Keymap for compilation log buffers. | 504 | "Keymap for compilation log buffers. |
| 505 | `compilation-minor-mode-map' is a cdr of this.") | 505 | `compilation-minor-mode-map' is a cdr of this.") |
| 506 | 506 | ||
| 507 | ;;;###autoload | ||
| 507 | (defun compilation-mode () | 508 | (defun compilation-mode () |
| 508 | "Major mode for compilation log buffers. | 509 | "Major mode for compilation log buffers. |
| 509 | \\<compilation-mode-map>To visit the source for a line-numbered error, | 510 | \\<compilation-mode-map>To visit the source for a line-numbered error, |
| @@ -722,7 +723,7 @@ Does NOT find the source line like \\[next-error]." | |||
| 722 | ;; Parse some more. | 723 | ;; Parse some more. |
| 723 | (compile-reinitialize-errors nil nil 2) | 724 | (compile-reinitialize-errors nil nil 2) |
| 724 | (setq errors compilation-error-list))) | 725 | (setq errors compilation-error-list))) |
| 725 | (error "%s is the last erring file" | 726 | (error "%s is the last erring file" |
| 726 | (compilation-error-filedata-file-name | 727 | (compilation-error-filedata-file-name |
| 727 | filedata)))))) | 728 | filedata)))))) |
| 728 | (setq errors (cdr errors))) | 729 | (setq errors (cdr errors))) |
| @@ -955,7 +956,7 @@ marker at the location in the source code indicated by the error message. | |||
| 955 | Optional first arg MOVE says how many error messages to move forwards (or | 956 | Optional first arg MOVE says how many error messages to move forwards (or |
| 956 | backwards, if negative); default is 1. Optional second arg REPARSE, if | 957 | backwards, if negative); default is 1. Optional second arg REPARSE, if |
| 957 | non-nil, says to reparse the error message buffer and reset to the first | 958 | non-nil, says to reparse the error message buffer and reset to the first |
| 958 | error (plus MOVE - 1). If optional third argument SILENT is non-nil, return | 959 | error (plus MOVE - 1). If optional third argument SILENT is non-nil, return |
| 959 | nil instead of raising an error if there are no more errors. | 960 | nil instead of raising an error if there are no more errors. |
| 960 | 961 | ||
| 961 | The current buffer should be the desired compilation output buffer." | 962 | The current buffer should be the desired compilation output buffer." |
| @@ -967,7 +968,7 @@ The current buffer should be the desired compilation output buffer." | |||
| 967 | (save-excursion | 968 | (save-excursion |
| 968 | (set-buffer compilation-last-buffer) | 969 | (set-buffer compilation-last-buffer) |
| 969 | ;; compilation-error-list points to the "current" error. | 970 | ;; compilation-error-list points to the "current" error. |
| 970 | (setq next-errors | 971 | (setq next-errors |
| 971 | (if (> move 0) | 972 | (if (> move 0) |
| 972 | (nthcdr (1- move) | 973 | (nthcdr (1- move) |
| 973 | compilation-error-list) | 974 | compilation-error-list) |
| @@ -1356,7 +1357,7 @@ See variable `compilation-parse-errors-function' for the interface it uses." | |||
| 1356 | (if alist | 1357 | (if alist |
| 1357 | (setq alist (car alist)) | 1358 | (setq alist (car alist)) |
| 1358 | (error "compilation-parse-errors: impossible regexp match!")) | 1359 | (error "compilation-parse-errors: impossible regexp match!")) |
| 1359 | 1360 | ||
| 1360 | ;; Extract the file name and line number from the error message. | 1361 | ;; Extract the file name and line number from the error message. |
| 1361 | (let ((beginning-of-match (match-beginning 0)) ;looking-at nukes | 1362 | (let ((beginning-of-match (match-beginning 0)) ;looking-at nukes |
| 1362 | (filename (buffer-substring (match-beginning (nth 1 alist)) | 1363 | (filename (buffer-substring (match-beginning (nth 1 alist)) |
| @@ -1383,7 +1384,7 @@ See variable `compilation-parse-errors-function' for the interface it uses." | |||
| 1383 | (setq filename (concat comint-file-name-prefix filename))) | 1384 | (setq filename (concat comint-file-name-prefix filename))) |
| 1384 | (setq filename (cons filename (cons default-directory | 1385 | (setq filename (cons filename (cons default-directory |
| 1385 | (nthcdr 4 alist)))) | 1386 | (nthcdr 4 alist)))) |
| 1386 | 1387 | ||
| 1387 | 1388 | ||
| 1388 | ;; Locate the erring file and line. | 1389 | ;; Locate the erring file and line. |
| 1389 | ;; Cons a new elt onto compilation-error-list, | 1390 | ;; Cons a new elt onto compilation-error-list, |