2

I'm using tuareg mode to test small caml functions. But I've got some problems.

  • The caml texts I write are not colored (tuareg mode seems here, the menu tuareg is there)
  • caml toplevel is running
  • but I can't evaluate phrase (C-x C-e) : the message error is "let: Symbol's value as variable is void: tuareg-find-phrase-beginning-regexp"
  • however I can evaluate buffer and it works fine

I really don't understand this error.

I'm using xubuntu 14.04

Edit : the problem goes away when I uninstall camllight (from http://doc.ubuntu-fr.org/caml_light) but use ocaml instead

ericD13
  • 21
  • 3

1 Answers1

0

that my mode Ocaml, have fun

;----------                                                                                                       
; 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)
             ))
user1990
  • 536
  • 3
  • 13