Closed dm182 closed 3 years ago
I created the PR which switched to the rx
macros. I'll look into fixing this.
This bug report changed the way regexp
works: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=36237
If we want to continue to support emacs 24, I think these are some options:
rx
regexp
in rx
, embed the necessary S-expressions instead of referring to zig-re-identifier
etc.Same error appears in emacs 25, it's 4 years old, though.
I'm getting this error on 26.3.
besides regexp
, you also cannot use literal
because I believe it's first implemented in emacs 27
an ugly way to handle regexp
is like this:
(defmacro zig-init1 ()
`(defconst zig-re-type
(rx (* (| "?" "[_]" "*" "[]"))
(regexp ,zig-re-identifier))))
(zig-init1)
(defmacro zig-init2 ()
`(progn
(defconst zig-re-type-annotation
(rx (group (regexp ,zig-re-identifier))
(* (any space)) ":" (* (any space))
(group (regexp ,zig-re-type))))))
(zig-init2)
M-x zig-mode won't switch to zig-mode, it returns error instead: "rx form 'regexp' requires args satisfying `stringp'" emacs-version: 24.5.1, package: 20201013.1249