   :type 'string
   :group 'kite)
 
-(defun kite-compile-current-buffer ()
+(defcustom kite-command-emit-parser "kite -p"
+  "The command used to compile Kite source code, with parser output."
+  :type 'string
+  :group 'kite)
+
+(defun kite-compile-current-buffer (command)
   "Compile current buffer and show output in buffer named `kite-compiled-buffer-name'."
   (interactive)
   (save-excursion
-    (kite-compile-region (point-min) (point-max))))
+    (kite-compile-region command (point-min) (point-max))))
 
-(defun kite-compile-region (start end)
+(defun kite-compile-region (command start end)
   "Compile current region and show output in buffer named `kite-compiled-buffer-name'."
   (interactive "r")
 


(defvar kite-mode-map
  (let ((map (make-sparse-keymap)))
    (define-key map (kbd "C-c C-c") 'kite-compile-current-buffer)
    (define-key map (kbd "C-c C-r") 'kite-compile-region)
    map)
  "Keymap for Kite major mode.")



  (let ((result (shell-command-to-string
                 (format "%s -e %s"
                         command
                         (shell-quote-argument (buffer-substring start end)))))
        (buffer (get-buffer kite-compiled-buffer-name)))

