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

[faces] set all/only hl-todo keywords which are present #7

Merged
merged 1 commit into from
Mar 5, 2022

Conversation

Hugo-Heagren
Copy link
Contributor

I load hl-todo-mode before my humanoid theme and add a new todo
(keyword . face) pair to hl-todo-keyword-faces. I was frustrated for
a while as to why this new pair didn't show up in actual operation.
The answer is that humanoid-themes overwrites
hl-todo-keyword-faces with a hardcoded value.

All this is meant to achieve is to fix the faces in the list to the
relevant colours. This PR offers a more robust solution: for every
word in the actual list hl-todo-keyword-faces when the theme is set,
if that word appears in a canonical alist in the theme code, set the
colour/face to the one in the canonical alist. Otherwise, leave it
alone. This retains edits (additions and deletions) the user makes,
but still fixes the colours.

Original commit message for sole commit:

Instead of hard-coding the value of hl-todo-keyword-faces, alter the
value of any keyword in the list for which we have a value in the
theme's list. This allows users to alter the list before loading the
theme (and retain their own additions) while still using the theme
colours where relevant.

Instead of hard-coding the value of `hl-todo-keyword-faces`, alter the
value of any keyword in the list for which we have a value in the
theme's list. This allows users to alter the list before loading the
theme (and retain their own additions) while still using the theme
colours where relevant.
@tasmo tasmo self-requested a review March 2, 2022 09:40
@tasmo tasmo self-assigned this Mar 2, 2022
@tasmo tasmo added enhancement New feature or request good first issue Good for newcomers labels Mar 2, 2022
@tasmo tasmo merged commit a36a039 into humanoid-colors:main Mar 5, 2022
@tasmo
Copy link
Member

tasmo commented Mar 5, 2022

Thank you @Hugo-Heagren !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants