;;; Source file: /usr/local/lib/jade/3.2/lisp/compile.jl
;;; Compiled by jsh@orcrist on Sun Oct 16 20:21:24 1994
;;; Jade 3.2

(provide (quote compile))

(setq gcc-error-regexp "^(.*):([0-9]+):(.+)" gcc-file-expand "\\1" gcc-line-expand "\\2" gcc-error-expand "\\3")

(defvar compile-error-regexp gcc-error-regexp 93822)

(defvar compile-file-expand gcc-file-expand 93881)

(defvar compile-line-expand gcc-line-expand 93972)

(defvar compile-error-expand gcc-error-expand 94058)

(defvar compile-keymap (make-keylist))

(jade-byte-code "xÿ 	
" [compile-buffer bind-keys compile-keymap "Ctrl-c" kill-compilation "Ctrl-z" stop-compilation "Ctrl-f" continue-compilation "r" (start-compile-command compile-default-cmd compile-type-str) "Ctrl-r" compile] 12)

(defvar compile-buffer nil)

(defvar compile-proc nil)

(defvar compile-errors nil 94150)

(defvar compile-error-pos nil)

(defvar compile-type-str nil)

(defvar compile-error-parsed-errors-p nil)

(defvar compile-errors-exist-p nil)

(defvar compile-default-cmd "make" 94193)

(defvar compile-command nil 94292)

(make-variable-buffer-local (quote compile-command))

(defvar compile-shell (unless (getenv "SHELL") "/bin/sh") 94408)

(defun compile-init nil (jade-byte-code "ü 
	û 	F H±F%G±HHJ
Hþ D	H	
	
HI&I&I&F&HJ" [compile-buffer clear-buffer make-buffer "*compilation*" compile-keymap ctrl-c-keymap set-buffer-special add-buffer set-buffer-file-name file-name-directory buffer-file-name compile-errors compile-parsed-errors-p compile-errors-exists-p buffer-start compile-error-pos] 4))

(defun compile-callback nil (jade-byte-code "þ Y	ü JK
û Y	ü #JK
û YJü XH	ü C	JK
	û Q	JK	HIF û YI" [compile-proc process-stopped-p write compile-buffer "Compilation suspended..." process-running-p "restarted
" beep process-exit-value format "
%s%d
" "Compilation exited with value " "
%s%x
" "Compilation exited abnormally: status 0x" process-exit-status] 6))

(defun start-compile-command (command type-str) 94468 (jade-byte-code "ü 
	û NHH	HJK	
	F HD
6
Hþ MF&HE" [compile-proc error "Compilation process already running" save-some-buffers compile-init goto-buffer compile-buffer make-process compile-callback file-name-directory buffer-file-name concat command 10 shell-cmd write start-process compile-shell "-c" type-str compile-type-str] 5))

(defun kill-compilation nil (interactive) (jade-byte-code "þ J
" [compile-proc interrupt-process] 3))

(defun stop-compilation nil (interactive) (jade-byte-code "	þ 
J
" [process-running-p compile-proc stop-process] 3))

(defun continue-compilation nil (interactive) (jade-byte-code "	þ 
J
" [process-stopped-p compile-proc continue-process] 3))

(defun compile (&optional shell-command) 94765 (interactive) (jade-byte-code "ÿ ÿ 
F$F Hþ 
" [shell-command compile-command prompt "Compile command: " compile-default-cmd start-compile-command "errors"] 3))

(defun compile-parse-errors nil (jade-byte-code "ÿ  ±DI2I3I4I5I6	
F&	þ 
		iF#H]ÿ 7cþ t$	
F\"H`ü ZF\"û ]F%H

		KKF&HF&	Hû Hþ “€
&JF&EG±HHÿ  JF HJ" [compile-parsed-errors-p compile-buffer error-file error-line last-e-line last-e-file new-errors find-next-regexp compile-error-regexp compile-error-pos read-from-string regexp-expand-line compile-line-expand file-name-concat buffer-file-name compile-file-expand make-mark pos 0 pos-line match-end nconc compile-errors compile-errors-exist-p compile-proc] 7))

(defun next-error nil 94896 (interactive) (jade-byte-code "HDL2MF!H]ü /þ 	þ $
	HHIû VJü UL	HMþ PM
	HJû VIE" [compile-parse-errors compile-errors err message concat "No " compile-errors-exist-p "more " compile-type-str compile-proc " yet" beep goto-mark regexp-expand-line compile-error-regexp compile-error-expand pos 0 compile-buffer] 7))

(defun grep (args-string) 94993 (interactive "sGrep with args:") (jade-byte-code "þ 
" [args-string start-compile-command concat "grep -n " " /dev/null /dev/null" "grep-hits"] 5))

(defvar grep-buffer-regexp nil 95196)

(defun grep-buffer (&optional regexp) 95245 (interactive) (jade-byte-code "þ F!Hþ þ iD46JK6	

H
F$þ [			
HV&	F$Hû &H	HHE" [regexp grep-buffer-regexp compile-init buffer-start scanpos 0 number compile-buffer stream write 10 find-next-regexp format "%s:%d:%s
" buffer-file-name pos-line copy-area line-start line-end 1 goto-buffer goto-buffer-start] 9))
