Skip to content

Conversation

@Ramblurr
Copy link

This allows for font-locking expressions discarded with the #_ form
differently than comments. Maintains default by inheriting from
font-lock-comment-face.

Fixes #688


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!

This allows for font-locking expressions discarded with the #_ form
differently than comments. Maintains default by inheriting from
font-lock-comment-face.

Fixes clojure-emacs#688
@Ramblurr
Copy link
Author

Ramblurr commented Oct 25, 2025

I haven't updated the tests yet.. I'm having trouble getting eldev working on my system. Any tips on how to get or execute the eldev binary available in NixOS would be appreciated.

@bbatsov
Copy link
Member

bbatsov commented Oct 26, 2025

Can't help with that, but you can always rely on the CI instead if you can't set this up locally.

I'm not sure I like the name of the new face, but the spirit of the change is fine. Probably it should mentioned somewhere in the README as well, otherwise no one will likely find it.

@Ramblurr
Copy link
Author

Can't help with that, but you can always rely on the CI instead if you can't set this up locally.

Ah ok, I'll make some edits then and push :)

I'm not sure I like the name of the new face,

I'm happy to name it whatever you want, any suggestions?

Probably it should mentioned somewhere in the README as well, otherwise no one will likely find it.

I looked around but there didn't seem to be an obvious place. The existing faces (clojure-keyword-face and clojure-character-face) aren't mentioned in the README either. Should I add a new section for the faces?

@bbatsov
Copy link
Member

bbatsov commented Oct 26, 2025

Should I add a new section for the faces?

Yeah, it can be somewhere under "Configuration".

@yuhan0
Copy link
Contributor

yuhan0 commented Oct 27, 2025

I'd vote for keeping the name clojure-discard-face or perhaps clojure-discarded-face because that's the official name for the #_ reader macro (https://clojure.org/guides/weird_characters#_discard), even though various tooling all seem to have their own names for it (ignore, uneval, etc)

There might be a minor semantic mismatch since - depending on the customized value of clojure-comment-regexp - it will be be applied to (comment) and other forms as well, but I can address that in a followup PR

@Ramblurr Ramblurr marked this pull request as ready for review October 27, 2025 07:58
@Ramblurr
Copy link
Author

Ramblurr commented Oct 27, 2025

Ok I've updated the README with a new section on the faces, and updated the font-locking tests to reflect the new face.

The emacs-master build target is failing, but the errors seem unrelated to my changes.

Let me know if you prefer if I squash the commits manually.

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.

Request: a distinct face for #_ forms

3 participants