clojure-emacs / clojure-mode

Emacs support for the Clojure(Script) programming language
910 stars 246 forks source link

Fix multi-digit lambda args #672

Closed daveliepmann closed 10 months ago

daveliepmann commented 10 months ago

Fixes #671 by syntax-highlighting multi-digit lambda arguments, e.g. #(+ %10 %19).

Does not attempt to distinguish between %20 (which is both reader-legal and works) and %21 (which is reader-legal but does not compile) because that's complex and depends on Clojure compiler internals.


Before submitting a PR mark the checkboxes for the items you've done (if you think a checkbox does not apply, then leave it unchecked):

Thanks!

bbatsov commented 10 months ago

Looks good to me. I guess I never realized people used double-digit lambda args. 😆

daveliepmann commented 10 months ago

I guess I never realized people used double-digit lambda args.

I never have and in 99.9% of situations would advise against them — I just noticed the regex didn't handle legal Clojure while fixing the keyword regex next to it 🤣