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
Introduce flycheck-mode-line-lighter-base and use it, with test #880
Conversation
@@ -3072,7 +3084,7 @@ nil." | |||
""))) | |||
(`interrupted "-") | |||
(`suspicious "?")))) | |||
(concat " FlyC" text))) | |||
(concat " " flycheck-mode-line-lighter-base text))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move the space to flycheck-mode-line-lighter-base
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the space is always needed because Emacs doesn't add it automatically between mode lighters. But maybe some people want to save 1 space too? I'm not sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd leave it as is and always add the space. The option is for the sake of simplicity, and should be fail-safe, in my opinion.
Those who'd like to remove the space as well should just customise flycheck-mode-line
directly. If the space is that much pain you'll probably have gone to much greater length to shrink your mode line anyway, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine by me :) I'm just used to seeing either single-character lighters with no spaces, and multi-character lighters with a space.
Looks good to me :) I made two small comments. |
I fixed the indentation, thanks. Let me know about the space in the lighter var. |
@@ -888,6 +888,18 @@ Set this variable to nil to disable the mode line completely." | |||
:risky t | |||
:package-version '(flycheck . "0.20")) | |||
|
|||
(defcustom flycheck-mode-line-lighter-base "FlyC" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about flycheck-mode-line-prefix
? It's shorter, and that's what it is, isn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK; renamed.
@tzz Thank you very much. I applied your change and turned your test case into a buttercup spec, which is much nicer than ERT 😎 Thanks for this contribution, and please excuse my out-of-place comments in our discussion. 😊 |
Ha ha you crazy kids with your buttercups... thanks, I'll learn how to use that for next time. |
@tzz SUCH BEAUTY, SUCH WOW 😎 |
Possibly remedies #879
Pretty trivial change, let me know if it's not OK in any way.
Edit (@lunaryorn): Connects to #879 (for waffle)