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

Introduce flycheck-mode-line-lighter-base and use it, with test #880

Closed
wants to merge 1 commit into from

Conversation

tzz
Copy link
Contributor

@tzz tzz commented Feb 17, 2016

Possibly remedies #879

Pretty trivial change, let me know if it's not OK in any way.

Edit (@lunaryorn): Connects to #879 (for waffle)

@@ -3072,7 +3084,7 @@ nil."
"")))
(`interrupted "-")
(`suspicious "?"))))
(concat " FlyC" text)))
(concat " " flycheck-mode-line-lighter-base text)))
Copy link
Member

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Member

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.

@cpitclaudel
Copy link
Member

Looks good to me :) I made two small comments.

@tzz
Copy link
Contributor Author

tzz commented Feb 17, 2016

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"
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK; renamed.

@swsnr
Copy link
Contributor

swsnr commented Feb 17, 2016

@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. 😊

@tzz
Copy link
Contributor Author

tzz commented Feb 17, 2016

Ha ha you crazy kids with your buttercups... thanks, I'll learn how to use that for next time.

@swsnr
Copy link
Contributor

swsnr commented Feb 17, 2016

@tzz SUCH BEAUTY, SUCH WOW 😎

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.

None yet

3 participants