 ;;;; (:require-patch "")
 ;;;; HISTORY :
 ;;;; $Log$
+;;;; Revision 3.29  2015/12/18 15:09:12  troche
+;;;; * go to error when we have a script compilation error
+;;;;
 ;;;; Revision 3.28  2015/12/14 10:41:33  troche
 ;;;; * debug V2 detection
 ;;;;

      (message "Script %s not found" script-name))))

(defun ojs-compilation-filter (proc string)
  (let ((case-fold-search nil))
    (cond ((and (stringp string)
		(string-match "\\`[[:upper:]-]+([0-9]+): \\'" string));; exit when we go back to the top level (ie :res, :pop, etc)
	   ;;(delete-process proc)
	   )
	  ((and (stringp string)
		(string-match ":EXIT-JS" string)) ;; exit when we read this, returned by the compilation functions
	   (insert "----------------------------------------------------------------------------------------------")
	   (fi::subprocess-filter proc (substring string 0 (string-match ":EXIT-JS" string)))	   
	   ;;(delete-process proc)
	   )	  
	  (t
	   (fi::subprocess-filter proc string)))))

(defun trace-ojs-function(tag)
  (interactive

    (process-send-string *ojs-compilation-buffer-name* (format "(jvs::emacs-check-and-compile-script %S %s)\n" selection v2))))


(defvar *compiled-script-window* nil)

(defun do-compile-and-sync-ojs-file (type)
  ;; find the script name
  (let* ((script-name      (file-name-base (buffer-file-name)))
