rukano/emacs-faust-mode

Error with emacs 27.1

Closed this issue · 5 comments

When I try to use faust mode on emacs 27.1, I get:

Eager macro-expansion failure: (error "Invalid rx ‘any’ range: ^-+")
rx--string-to-intervals: Invalid rx ‘any’ range: ^-+

When I change this line:

(defconst faust-regexp-faust-operator (rx (any ",'@:*/%^-+|&~>=<!")))

to

(defconst faust-regexp-faust-operator (rx (any ",'@:*/%^|&~>=<!")))

the error goes away and I get (incomplete) highlighting again.

(rx (any ?- ",'@:*/%^+|&~>=<!"))
(rx (any ?, ?' ?@ ?: ?* ?/ ?% ?^ ?+ ?- ?| ?& ?~ ?> ?= ?< ?!))

Either of these should probably work (I think I prefer the latter). Not tested.

@nbfalcon Thanks!

That second version gives me an error: rx requires a string or...
I'm rebuilding my doom config using the first version now, and will do a PR if it works.
The first version works like a charm.

I'll do a PR, how shall I credit you?

@magnetophon the second version way indeed wrong; fixed it (extra parens in any). As for crediting, mentioning this issue is enough for me. Glad that I could help :)

Yep, I'm getting exactly the same on Manjaro, using faust-mode.el included in the community faust package.