Emacs无法识别OCaml

时间:2018-08-17 11:15:46

标签: emacs ocaml

我对emacs有问题。

我刚刚下载了它,我还通过终端下载了Opam和OCaml。我非常确定它没有问题,然后安装了tuareg。我将.el的tuareg文件放在了必须放置的位置(在emacs-> site-lisp中)。但是,当我打开一个新文件test.ml时,emacs告诉我找不到该文件,它是directory write-protected并且它没有运行tuareg模式(它仍处于基本模式)。

我设法用C-x C-q更改了只读缓冲区,因此我可以在文件上写,但是当我写let x = 3;;并按C-x C-e时,它不执行解释

这是我的.emacs文件:

;; Affichage français
(standard-display-european t)

;; Affiche le numéro de ligne et n'affiche pas celui de la colonne
(column-number-mode nil)
(line-number-mode t)

;; Les 'beep' deviennent visibles (et non plus audibles)
(setq visible-bell t)

;; Pour le mode Tuareg
(setq auto-mode-alist (cons '("\\.ml\\w?" . tuareg-mode) auto-mode-alist))
(autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code" t)
(autoload 'camldebug "camldebug" "Run the Caml debugger" t)

;; Pour avoir la coloration syntaxique automatiquement
(global-font-lock-mode 1)

;;Couper sur Ctrl+W
(global-set-key (kbd "C-w" ) 'kill-line) 
;;Copier sur Ctrl+C
(global-set-key (kbd "C-c" ) 'kill-ring-save)
;;Coller sur Ctrl+V
(global-set-key (kbd "C-v" ) 'yank)
;;Annuler sur Ctrl+Z
(global-set-key (kbd "C-z" ) 'undo)
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(exec-path (quote ("/usr/bin" "/bin" "/usr/sbin" "/sbin" "/Applications/Emacs.app/Contents/MacOS/bin" "/usr/local/bin"))))
(custom-set-faces
 ;; custom-set-faces was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 )

(setq mac-option-key-is-meta nil)  
(setq mac-command-key-is-meta t)  
(setq mac-command-modifier 'meta)  
(setq mac-option-modifier nil)

0 个答案:

没有答案