;---------- ; mode CAML ;---------- (if (and (boundp 'window-system) window-system) (require 'font-lock)) (setq-default auto-mode-alist (cons '("\\.ml[iylp]?" . tuareg-mode) auto-mode-alist)) (setq-default tuareg-in-indent 0) (autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code." t) (autoload 'run-caml "inf-caml" "Run an inferior Caml process." t) (autoload 'camldebug "camldebug" "Run the Caml debugger." t) (defvar caml-mode-hook '(lambda () (modify-syntax-entry ?_ "w" caml-mode-syntax-table))) (add-hook 'tuareg-mode-hook '(lambda () (define-key tuareg-mode-map "\M-q" 'fill-paragraph) )) (add-hook 'tuareg-load-hook '(lambda () (define-key tuareg-mode-map [f5] 'compile) (define-key tuareg-mode-map [f6] 'recompile) (define-key tuareg-mode-map [f7] 'next-error) (load-library "camlit") (camlit-minor-mode) ))