2
votes

I get the following error

File mode specification error: (error "Unknown rx form `group-n'")

when I try to edit a .lua file in emacs. I use GNU Emacs 23.3.1, and I have the following in my .emacs file:

(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))

I installed lua-mode from http://immerrr.github.com/lua-mode/. I have tried to run emacs with the --debug-init option, but it did not enter the debugger, instead the .lua file opens in text-mode and not lua-mode..

(See also Emacs lua-mode issue: (void-function interactively-called-p))

1
You need to make sure that lua-mode.el is on your load-path.hjpotter92
I have the following in my .emacs file: (add-to-list 'load-path "~/.emacs.d/el-get/lua-mode/"). In that directory I have lua-mode.el installed..Håkon Hægland

1 Answers

5
votes

Your Emacs is complaining because it knows nothing about group-n symbol used in rx macro in one of the recent commits, and that is probably because that symbol was only introduced in Emacs 24.2 and your one is a bit older.

I must admit, when coding that I thought that rx package was much more mature and didn't even bother looking up its changes in Emacs news. So, there are two options here:

  • either you update your Emacs to 24.2
  • or you could downgrade to older revision and wait while I have the chance to rewrite that piece of code.

UPD: the issue is fixed in upstream, the code is compatible with Emacs23 again.