Mercurial > emacs
comparison lisp/progmodes/compile.el @ 569:505a9721e442
*** empty log message ***
author | Roland McGrath <roland@gnu.org> |
---|---|
date | Fri, 06 Mar 1992 00:28:08 +0000 |
parents | c3bbd755b7da |
children | eca8812e61cd |
comparison
equal
deleted
inserted
replaced
568:f4edd5fc98f6 | 569:505a9721e442 |
---|---|
19 ;; file named COPYING. Among other things, the copyright notice | 19 ;; file named COPYING. Among other things, the copyright notice |
20 ;; and this notice must be preserved on all copies. | 20 ;; and this notice must be preserved on all copies. |
21 | 21 |
22 (provide 'compile) | 22 (provide 'compile) |
23 | 23 |
24 ;;;###autoload | |
25 (defvar compilation-mode-hook nil | |
26 "*List of hook functions run by compilation-mode (see `run-hooks').") | |
27 | |
28 ;;;###autoload | |
24 (defconst compilation-window-height nil | 29 (defconst compilation-window-height nil |
25 "*Number of lines in a compilation window. If nil, use Emacs default.") | 30 "*Number of lines in a compilation window. If nil, use Emacs default.") |
26 | 31 |
27 (defvar compilation-error-list nil | 32 (defvar compilation-error-list nil |
28 "List of error message descriptors for visiting erring functions. | 33 "List of error message descriptors for visiting erring functions. |
99 ) | 104 ) |
100 "Alist (REGEXP FILE-IDX LINE-IDX) of regular expressions to match errors in | 105 "Alist (REGEXP FILE-IDX LINE-IDX) of regular expressions to match errors in |
101 compilation. If REGEXP matches, the FILE-IDX'th subexpression gives the file | 106 compilation. If REGEXP matches, the FILE-IDX'th subexpression gives the file |
102 name, and the LINE-IDX'th subexpression gives the line number.") | 107 name, and the LINE-IDX'th subexpression gives the line number.") |
103 | 108 |
109 ;;;###autoload | |
104 (defvar compilation-search-path '(nil) | 110 (defvar compilation-search-path '(nil) |
105 "List of directories to search for source files named in error messages. | 111 "*List of directories to search for source files named in error messages. |
106 Elements should be directory names, not file names of directories. | 112 Elements should be directory names, not file names of directories. |
107 nil as an element means to try the default directory.") | 113 nil as an element means to try the default directory.") |
108 | 114 |
109 (defvar compile-command "make -k " | 115 (defvar compile-command "make -k " |
110 "Last shell command used to do a compilation; default for next compilation. | 116 "Last shell command used to do a compilation; default for next compilation. |
297 | 303 |
298 (defun compilation-mode () | 304 (defun compilation-mode () |
299 "Major mode for compilation log buffers. | 305 "Major mode for compilation log buffers. |
300 \\<compilation-mode-map>To visit the source for a line-numbered error, | 306 \\<compilation-mode-map>To visit the source for a line-numbered error, |
301 move point to the error message line and type \\[compile-goto-error]. | 307 move point to the error message line and type \\[compile-goto-error]. |
302 To kill the compilation, type \\[kill-compilation]." | 308 To kill the compilation, type \\[kill-compilation]. |
309 | |
310 Runs `compilation-mode-hook' with `run-hooks' (which see)." | |
303 (interactive) | 311 (interactive) |
304 (fundamental-mode) | 312 (fundamental-mode) |
305 (use-local-map compilation-mode-map) | 313 (use-local-map compilation-mode-map) |
306 (buffer-disable-undo (current-buffer)) | 314 (buffer-disable-undo (current-buffer)) |
307 (setq major-mode 'compilation-mode) | 315 (setq major-mode 'compilation-mode) |
310 (setq mode-line-process '(": %s")) | 318 (setq mode-line-process '(": %s")) |
311 (set (make-local-variable 'compilation-error-list) nil) | 319 (set (make-local-variable 'compilation-error-list) nil) |
312 (set (make-local-variable 'compilation-old-error-list) nil) | 320 (set (make-local-variable 'compilation-old-error-list) nil) |
313 (set (make-local-variable 'compilation-parsing-end) 1) | 321 (set (make-local-variable 'compilation-parsing-end) 1) |
314 (set (make-local-variable 'compilation-directory-stack) nil) | 322 (set (make-local-variable 'compilation-directory-stack) nil) |
315 (setq compilation-last-buffer (current-buffer))) | 323 (setq compilation-last-buffer (current-buffer)) |
324 (run-hooks 'compilation-mode-hook)) | |
316 | 325 |
317 ;; Called when compilation process changes state. | 326 ;; Called when compilation process changes state. |
318 (defun compilation-sentinel (proc msg) | 327 (defun compilation-sentinel (proc msg) |
319 "Sentinel for compilation buffers." | 328 "Sentinel for compilation buffers." |
320 (let ((buffer (process-buffer proc))) | 329 (let ((buffer (process-buffer proc))) |