Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multi-digit lambda args #672

Merged

Conversation

daveliepmann
Copy link
Contributor

@daveliepmann daveliepmann commented Nov 24, 2023

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

  • The commits are consistent with our contribution guidelines.
  • You've added tests (if possible) to cover your change(s). Bugfix, indentation, and font-lock tests are extremely important!
  • You've run M-x checkdoc and fixed any warnings in the code you've written.
  • You've updated the changelog (if adding/changing user-visible functionality).
  • You've updated the readme (if adding/changing user-visible functionality).

Thanks!

@bbatsov bbatsov merged commit 222fdaf into clojure-emacs:master Nov 24, 2023
@bbatsov
Copy link
Member

bbatsov commented Nov 24, 2023

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

@daveliepmann daveliepmann deleted the fix-multi-digit-lambda-args branch November 24, 2023 19:10
@daveliepmann
Copy link
Contributor Author

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 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syntax highlighting broken for digits after the first in % args
2 participants