 
 (require 'font-lock)
 (require 'comint)
+(require 'view)
 
 ;;; Customization:
 

  :type '(file :must-match t)
  :group 'factor)

(defcustom factor-display-compilation-output t
  "Display the REPL buffer before compiling files."
  :type 'boolean



;;; Key bindings:

(defmacro factor--define-key (key cmd)
  `(progn
     (define-key factor-mode-map [(control ?c) ,key] ,cmd)
     (define-key factor-mode-map [(control ?c) (control ,key)] ,cmd)))

(factor--define-key ?f 'factor-run-file)
(factor--define-key ?r 'factor-send-region)
(factor--define-key ?d 'factor-send-definition)
(factor--define-key ?s 'factor-see)
(factor--define-key ?e 'factor-edit)
(factor--define-key ?z 'switch-to-factor)
(factor--define-key ?c 'comment-region)

(define-key factor-mode-map "\C-ch" 'factor-help)
(define-key factor-mode-map "\C-m" 'newline-and-indent)
(define-key factor-mode-map [tab] 'indent-for-tab-command)

(define-key factor-listener-mode-map [f8] 'factor-refresh-all)



(provide 'factor)
;;; factor.el ends here
