【问题标题】:Emacs lua-mode (File mode specification error)Emacs lua-mode(文件模式规范错误)
【发布时间】:2013-03-18 23:49:03
【问题描述】:

我收到以下错误

文件模式规范错误:(错误“Unknown rx form `group-n'”)

当我尝试在 emacs 中编辑 .lua 文件时。我使用 GNU Emacs 23.3.1,我的 .emacs 文件中有以下内容:

(autoload 'lua-mode "lua-mode" "Lua editing mode." t)
(add-to-list 'auto-mode-alist '("\\.lua$" . lua-mode))
(add-to-list 'interpreter-mode-alist '("lua" . lua-mode))

我从http://immerrr.github.com/lua-mode/ 安装了lua-mode。 我尝试使用--debug-init 选项运行emacs,但它没有进入调试器,而是在text-mode 中打开.lua 文件而不是lua-mode..

(另见Emacs lua-mode issue: (void-function interactively-called-p)

【问题讨论】:

  • 您需要确保 lua-mode.el 在您的加载路径上
  • 我的.emacs 文件中有以下内容:(add-to-list 'load-path "~/.emacs.d/el-get/lua-mode/")。在那个目录中我安装了lua-mode.el..

标签: emacs lua elisp


【解决方案1】:

您的 Emacs 正在抱怨,因为它对最近一次提交中 rx 宏中使用的 group-n 符号一无所知,这可能是因为该符号仅在 Emacs 24.2 中引入,而您的符号有点旧.

我必须承认,在编写代码时,我认为rx 包更加成熟,甚至没有费心在 Emacs 新闻中查找它的变化。所以,这里有两种选择:

  • 要么将 Emacs 更新到 24.2
  • 或者您可以降级到 older revision 并等待我有机会重写那段代码。

UPD:问题已在上游修复,代码再次兼容 Emacs23。

【讨论】:

  • 应该用this commit 修复。请尝试。
  • 谢谢!我试过:来自emacs的el-get-update "lua-mode"。现在文件以lua模式打开,但是现在有一个新错误File mode specification error: (void-variable --elt-expected-re--) Error during redisplay: (void-variable --elt-expected-re--)
  • 显然我搞砸了编译时评估的代码。请在 master 中尝试新的提交。
  • 我仍然遇到同样的错误。我在 Emacs 中使用了el-get-update "lua-mode"
  • @HåkonHægland ,为我工作,对不起,el-get-reinstall "lua-mode" 呢?
猜你喜欢
  • 1970-01-01
  • 2015-11-10
  • 1970-01-01
  • 1970-01-01
  • 2016-09-21
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-06-06
相关资源
最近更新 更多