Emacs lua-mode(文件模式规范错误)

标签 emacs lua elisp

我收到以下错误

File mode specification error: (error "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模式..

(另请参阅 Emacs lua-mode issue: (void-function interactively-called-p) )

最佳答案

您的 Emacs 正在提示,因为它对最近一次提交中的 rx 宏中使用的 group-n 符号一无所知,这可能是因为该符号只是介绍于 Emacs 24.2而且你的有点旧了。

我必须承认,在编码时我认为 rx 包更加成熟,甚至懒得在 Emacs 新闻中查找它的变化。因此,这里有两个选择:

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

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

关于Emacs lua-mode(文件模式规范错误),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15489084/

相关文章:

emacs - 无法打开加载文件 :/yasnippet

lua - lua 和 walk_block 中的 pandoc 过滤器

emacs - 如何在Emacs中的git grep命令中使用M-x rgrep?

emacs - 显示组织模式大纲直至特定标题级别

emacs - 如何在emacs中自动执行org-mobile-push org-mobile提取

emacs - 为什么 font-lock-keyword-face 在 Emacs 中突出显示双引号内的文本?

emacs - 使用 Coq Proof General,Emacs 在每个周期执行。我该如何阻止它?

Windows 上的 Emacs elisp 扩展文件名行为

c++ - C LuaJit 分析

LuaJIT 看不到 LuaRocks 安装的岩石