protesilaos / modus-themes

Highly accessible themes for GNU Emacs, conforming with the highest standard for colour contrast between background and foreground values (WCAG AAA).
https://protesilaos.com/emacs/modus-themes
GNU General Public License v3.0
526 stars 29 forks source link

Support for erts-mode? #85

Closed ktfleming closed 1 year ago

ktfleming commented 1 year ago

Hi Prot,

Would you consider supporting erts-mode in the Modus themes?

Background: erts-mode is a built-in mode for editing "erts" files, which are files that contain tests for the ert testing tool that's included in Emacs. I find these files useful for collecting tests for commands that operate on text in a buffer and that have multiple edge cases.

To see what erts-mode looks like, you can open a new buffer, do M-x erts-mode, and insert the following:

Name: kill-word should kill the next word
Point-Char: |
Code: (lambda () (kill-word 1))
=-=
I want to remove this |unnecessary word.
=-=
I want to remove this | word.
=-=-=

Incidentally, if you want to try running the test, you can write it to a file and run (ert-test-erts-file "/path/to/the/file.erts"). There's more information in the "ert" Info manual.

You'll see that the keys like Name and Point-Char are displayed with the face erts-mode-specification-name, while the values like kill-word should kill the next word are displayed with the face erts-mode-specification-value. These have default values defined in erts-mode.el; for example, when using modus-operandi they default to "cornflower blue" and "blue" respectively. It would be nice if modus-themes supported these faces.

The =-= and =-=-= lines also use faces, erts-mode-start-test and erts-mode-end-test respectively, but these inherit from default faces that modus-themes already support, so perhaps addressing these specifically isn't necessary.

protesilaos commented 1 year ago

Hello @ktfleming!

I am testing it now. What do you think?

2023-07-04_13:53:06_950x367

2023-07-04_13:53:17_950x367

ktfleming commented 1 year ago

I think it looks very nice!

protesilaos commented 1 year ago

Thank you! I just pushed the changes. Please let me know if everything works on your end.

ktfleming commented 1 year ago

It works great, thank you!