简体   繁体   中英

Emacs lua-mode (File mode specification error)

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM