私のモード Ocaml、楽しんでください
;----------
; 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 [f2] 'tuareg-eval-phrase)
(define-key tuareg-mode-map [f5] 'compile)
(define-key tuareg-mode-map [f6] 'recompile)
(define-key tuareg-mode-map [f7] 'next-error)
))
(add-hook 'pascal-mode-hook
'(lambda ()
(define-key pascal-mode-map [f5] 'compile)
(define-key pascal-mode-map [f6] 'recompile)
(define-key pascal-mode-map [f7] 'next-error)
))