我收到以下错误
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/