Open ogdenwebb opened 6 years ago
You can probably just define a face with that name in your own config file and it'd work.
I could add a fallback, but then I'd either need to spam the message buffer with warnings or ignore it entirely, and I definitely don't want to do the latter since it'd hide the fact that there's a better solution.
You can probably just define a face with that name in your own config file and it'd work.
Yes, I know that. Meanwhile in my opinion, it's a bit kinky workaround, because I need define face for every single custom state to omit this issue in the future.
(...) I need define face for every single custom state (...)
FWIW, this is how I think it should be. It's annoying, but it's not like you have programmatically created states.
If there are any of these that are sufficiently popular I could just add them to the package. I don't use any myself, though.
An intermediate solution...could be providing a macro that defines faces for custom states + adds them to the config. So, a helper for the users, documented. But you would still have to define the face.
I agree that using a fallback is not a good idea.
What's the reason for opposing a default face if there isn't one specified for the state? If it is the need to have messages to indicate this to the user, I'm not sure that would be necessary since defining custom states is a supported and documented feature of evil.
At the moment when this case is encountered, (1) telephone line breaks and dumps error output to the messages buffer (2) the user must go down to elisp land to fix it.
IMO the alternative for a custom state of defaulting to a sane face with just the name of the state would be preferable. If the user would like to customize the face then they certainly can (as is well-documented in telephone line), but they need not be forced to do so to get basic functionality, which is often all they need.
For example, there's some plugins for Emacs which provide custom evil-state, such as evil-multiedit, but telephone-line doesn't have appropriate face for them, so mode-line won't display anything.
Probably telephone-line needs a fallback face for this case.