rukano / emacs-faust-mode

Faust major mode for editing faust code (.dsp files)
13 stars 7 forks source link

Error with emacs 27.1 #15

Closed magnetophon closed 4 years ago

magnetophon commented 4 years ago

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: ^-+
magnetophon commented 4 years ago

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.

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

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

magnetophon commented 4 years ago

@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?

nbfalcon commented 4 years ago

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

agraef commented 4 years ago

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