[emacs] [图阿雷格模式]符号的函数定义无效:dolist

时间:2013-09-10 08:24:31

标签: emacs ocaml tuareg

我尝试为Ocaml安装Tuareg-mode作为Inria网站的建议。 每次我尝试启动它时都会出现此错误:

  

符号的函数定义为void:dolist

使用edebug-defun

Debugger entered--Lisp error: (void-function dolist)
  apply(debug error (void-function dolist))
  edebug(error (void-function dolist))
  (dolist (buf (buffer-list)) (save-current-buffer (set-buffer buf) (if (derived-mode-p (quote tuareg-mode)) (progn (abbrev-mode (if val 1 -1))))))
  (lambda (var val) (set-default var val) (dolist (buf (buffer-list)) (save-current-buffer (set-buffer buf) (if (derived-mode-p (quote tuareg-mode)) (progn (abbrev-mode (if val 1 -$
  custom-initialize-reset(tuareg-use-abbrev-mode t)
  custom-declare-variable(tuareg-use-abbrev-mode t "*Non-nil means electrically indent lines starting with leading keywords.\nLeading keywords are such as `end', `done', `else' etc$
  eval-buffer(#<buffer  *load*> nil "/nfs/ring/users/2013/phibonacci/.emacs.d/tuareg-mode/tuareg.el" nil t)  ; Reading at buffer position 13589
  load-with-code-conversion("/nfs/ring/users/2013/phibonacci/.emacs.d/tuareg-mode/tuareg.el" "/nfs/ring/users/2013/phibonacci/.emacs.d/tuareg-mode/tuareg.el" nil t)
  command-execute(tuareg-mode record)
  execute-extended-command(nil "tuareg-mode")
  call-interactively(execute-extended-command nil nil)
  recursive-edit()
  edebug--recursive-edit(before)
  edebug--display(nil 0 before)
  edebug-debugger(0 before nil)
  edebug-before(0)
  (edebug-after (edebug-before 0) 1 (autoload (quote tuareg-mode) "tuareg" "Major mode for editing Caml code" t))
  (lambda nil (edebug-after (edebug-before 0) 1 (autoload (quote tuareg-mode) "tuareg" "Major mode for editing Caml code" t)))()
  edebug-enter(edebug-anon0 nil (lambda nil (edebug-after (edebug-before 0) 1 (autoload (quote tuareg-mode) "tuareg" "Major mode for editing Caml code" t))))
  edebug-enter(edebug-anon0 nil (lambda nil (edebug-after (edebug-before 0) 1 (autoload (quote tuareg-mode) "tuareg" "Major mode for editing Caml code" t))))
  eval((edebug-enter (quote edebug-anon0) nil (function (lambda nil (edebug-after (edebug-before 0) 1 (autoload (quote tuareg-mode) "tuareg" "Major mode for editing Caml code" t)))$
  eval-expression((edebug-enter (quote edebug-anon0) nil (function (lambda nil (edebug-after (edebug-before 0) 1 (autoload (quote tuareg-mode) "tuareg" "Major mode for editing Caml$
  edebug-defun()
  call-interactively(edebug-defun record nil)
  command-execute(edebug-defun record)
  execute-extended-command(nil "edebug-defun")
  call-interactively(execute-extended-command nil nil)

“/ nfs / ring / users / 2013 / phibonacci”是我的主目录。

我跟着这个:http://www.emacswiki.org/emacs/TuaregMode(只用我自己的路径替换了〜/ .elisp / tuareg-mode~ / .emacs.d / tuareg-mode)

emacs 24.3.1(2013)/ tuareg 2.0.6 (2012)

2 个答案:

答案 0 :(得分:1)

dolist来自常见的lisp Emacs库。如果tuareg使用dolist而没有(eval-when-compile ...(require 'cl)...)它就是一个错误。作为解决方法,您可以在.emacs中执行(require 'cl)。纯粹的Emacs社区不推荐这样做,但它很常见。

答案 1 :(得分:0)

IIRC dolist有时会在Emacs-21附近添加到标准Elisp中,因此您的设置确实存在问题。