0

我尝试在 Inria 网站上为 Ocaml 安装 Tuareg 模式作为建议。每当我尝试启动它时,我都会遇到此错误:

Symbol的函数定义为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) / 图阿雷格 2.0.6 (2012)

4

2 回答 2

1

dolist来自常见的 lisp Emacs 库。如果 tuaregdolist不使用(eval-when-compile ...(require 'cl)...)它就是一个错误。作为一种解决方法,您可以(require 'cl)在 .emacs 中执行此操作。纯粹的 Emacs 社区不建议这样做,但它相当普遍。

于 2013-09-10T18:04:57.857 回答
0

IIRCdolist有时会在 Emacs-21 周围添加到标准 Elisp 中,因此您的设置确实有问题。

于 2013-09-11T00:17:58.893 回答