Mercurial > emacs
comparison lisp/progmodes/compile.el @ 1072:8e0a8faed93a
*** empty log message ***
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Wed, 02 Sep 1992 23:15:36 +0000 |
parents | ef045ff2cb94 |
children | f36b965cfeb0 |
comparison
equal
deleted
inserted
replaced
1071:53ad9fa87f71 | 1072:8e0a8faed93a |
---|---|
88 "Message to print when no more matches for `compilation-error-regexp-alist' | 88 "Message to print when no more matches for `compilation-error-regexp-alist' |
89 are found.") | 89 are found.") |
90 | 90 |
91 (defvar compilation-error-regexp-alist | 91 (defvar compilation-error-regexp-alist |
92 '( | 92 '( |
93 ;; NOTE! This first one is repeated in grep-regexp-alist, below. | |
93 ;; 4.3BSD grep, cc, lint pass 1: | 94 ;; 4.3BSD grep, cc, lint pass 1: |
94 ;; /usr/src/foo/foo.c(8): warning: w may be used before set | 95 ;; /usr/src/foo/foo.c(8): warning: w may be used before set |
95 ;; or GNU utilities | 96 ;; or GNU utilities |
96 ;; foo.c:8: error message | 97 ;; foo.c:8: error message |
97 ("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2) | 98 ("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2) |
120 ) | 121 ) |
121 "Alist (REGEXP FILE-IDX LINE-IDX) of regular expressions to match errors in | 122 "Alist (REGEXP FILE-IDX LINE-IDX) of regular expressions to match errors in |
122 compilation. If REGEXP matches, the FILE-IDX'th subexpression gives the file | 123 compilation. If REGEXP matches, the FILE-IDX'th subexpression gives the file |
123 name, and the LINE-IDX'th subexpression gives the line number.") | 124 name, and the LINE-IDX'th subexpression gives the line number.") |
124 | 125 |
126 (defvar grep-regexp-alist | |
127 '(("^\\([^:( \t\n]+\\)[:( \t]+\\([0-9]+\\)[:) \t]" 1 2)) | |
128 "Regexp used to match grep hits. See `compilation-error-regexp-alist'.") | |
129 | |
125 ;;;###autoload | 130 ;;;###autoload |
126 (defvar compilation-search-path '(nil) | 131 (defvar compilation-search-path '(nil) |
127 "*List of directories to search for source files named in error messages. | 132 "*List of directories to search for source files named in error messages. |
128 Elements should be directory names, not file names of directories. | 133 Elements should be directory names, not file names of directories. |
129 nil as an element means to try the default directory.") | 134 nil as an element means to try the default directory.") |
203 easily repeat a grep command." | 208 easily repeat a grep command." |
204 (interactive | 209 (interactive |
205 (list (read-from-minibuffer "Run grep (like this): " | 210 (list (read-from-minibuffer "Run grep (like this): " |
206 "grep -n " nil nil 'grep-history))) | 211 "grep -n " nil nil 'grep-history))) |
207 (compile-internal (concat command-args " /dev/null") | 212 (compile-internal (concat command-args " /dev/null") |
208 "No more grep hits" "grep")) | 213 "No more grep hits" "grep" |
214 ;; Give it a simpler regexp to match. | |
215 nil grep-regexp-alist)) | |
209 | 216 |
210 (defun compile-internal (command error-message | 217 (defun compile-internal (command error-message |
211 &optional name-of-mode parser regexp-alist | 218 &optional name-of-mode parser regexp-alist |
212 name-function) | 219 name-function) |
213 "Run compilation command COMMAND (low level interface). | 220 "Run compilation command COMMAND (low level interface). |
542 (interactive "P") | 549 (interactive "P") |
543 (or (compilation-buffer-p (current-buffer)) | 550 (or (compilation-buffer-p (current-buffer)) |
544 (error "Not in a compilation buffer.")) | 551 (error "Not in a compilation buffer.")) |
545 (setq compilation-last-buffer (current-buffer)) | 552 (setq compilation-last-buffer (current-buffer)) |
546 (compile-reinitialize-errors argp (point)) | 553 (compile-reinitialize-errors argp (point)) |
554 | |
555 ;; Move to bol; the marker for the error on this line will point there. | |
556 (beginning-of-line) | |
547 | 557 |
548 ;; Move compilation-error-list to the elt of compilation-old-error-list | 558 ;; Move compilation-error-list to the elt of compilation-old-error-list |
549 ;; we want. | 559 ;; we want. |
550 (setq compilation-error-list compilation-old-error-list) | 560 (setq compilation-error-list compilation-old-error-list) |
551 (while (and compilation-error-list | 561 (while (and compilation-error-list |