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

[RFC] Remove unused const FEAT_GUI* #2609

Closed

Conversation

Hettomei
Copy link
Contributor

@Hettomei Hettomei commented May 7, 2015

These variables are no more needed so I removed it.

And also it simplify logic for mch_errmsg and mch_msg because we can group UNIX code.

@marvim marvim added the RFC label May 7, 2015
isatty(2)
# endif
) {
if (isatty(2)) {
Copy link

Choose a reason for hiding this comment

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

Should probably use os_isatty.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You said I just have to replace every isatty with os_isatty without any other check ?

Copy link

Choose a reason for hiding this comment

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

without any other check ?

What do you mean? I just mean replace the two instances of isatty in this PR with os_isatty, since they have the same semantics AFAICT:

/// Test whether a file descriptor refers to a terminal.
///
/// @param fd File descriptor.
/// @return `true` if file descriptor refers to a terminal.
bool os_isatty(int fd)
{
    return uv_guess_handle(fd) == UV_TTY;
}

Copy link

Choose a reason for hiding this comment

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

Sorry if that came across as overly blunt, I'm just trying to be clear.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

By "without any other check" I mean 'I don't now what really do os_isatty instead of isatty so I asked if I really can do this without any other check.

isatty replaced in commit a083983

@ghost
Copy link

ghost commented May 8, 2015

Besides the nit, LGTM.

@yagebu
Copy link
Contributor

yagebu commented May 8, 2015

While greping the source for FEAT_GUI, I found some more unused FEAT_GUI_XYZ, that can safely be removed (namely FEAT_GUI_GTK, FEAT_GUI_MAC, FEAT_GUI_MOTIF, FEAT_GUI_MSWIN, FEAT_GUI_W32). Feel free to to remove them in this PR, or I can open a separate one if you want.

@Hettomei
Copy link
Contributor Author

Hettomei commented May 8, 2015

Thank you. I will do that in this PR as soon as possible

@Hettomei
Copy link
Contributor Author

Hettomei commented May 8, 2015

I change this PR as WIP because I found lot of const no more used and I want to clean it up.

@Hettomei Hettomei changed the title [RFC] Remove last unused FEAT_GUI and ALWAYS_USE_GUI [WIP] Remove unused const FEAT_GUI* May 8, 2015
@marvim marvim added WIP and removed RFC labels May 8, 2015
@Hettomei
Copy link
Contributor Author

Hettomei commented May 8, 2015

I think it is good.
Off course there is other unused const but I will continue to clean these in a new PR.

Change from WIP to RFC.

@Hettomei Hettomei changed the title [WIP] Remove unused const FEAT_GUI* [RFC] Remove unused const FEAT_GUI* May 8, 2015
@marvim marvim added RFC and removed WIP labels May 8, 2015
@ghost
Copy link

ghost commented May 8, 2015

Please prepend Macro cleanup: before each commit, to match previous PRs like #2011 and #1816. In repetitive PRs like this, commit names should be kept short and consistent with one another given their similarities.

@@ -119,7 +119,6 @@ The following compile time preprocessor variables control the features:
Debug Glyphs FEAT_SIGNS
Debug Highlights FEAT_SIGNS
Message Footer FEAT_FOOTER
Balloon Evaluation FEAT_BEVAL
Copy link

Choose a reason for hiding this comment

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

There's still a lot of references in the docs to this, but that should probably be dealt with elsewhere so I suppose it's fine.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, about these const : FEAT_SIGNS, FEAT_FOOTER and FEAT_BEVAL, they only appears in this doc.

I wasn't sure if I can delete all the 2. Vim Compile Options *debugger-compilation* paragraph . Should I do this in a commit ?

Copy link

Choose a reason for hiding this comment

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

I wasn't sure if I can delete all the 2. Vim Compile Options debugger-compilation paragraph . Should I do this in a commit ?

Good idea, but do you mind If instead I do that in #2532? That PR is mostly about documentation while this one already has a pretty specific focus (cleaning up macros). I'll be sure to credit your in the commit message, but it's up to you.

Copy link

Choose a reason for hiding this comment

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

And if you do decide to do it here, make sure to remove section 3 as well: it's empty.

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, I let you do this. And don't credit me, I just revealed a probably dead doc.

Copy link

Choose a reason for hiding this comment

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

And don't credit me, I just revealed a probably dead doc.

I just put spotted by @Hettomei, that's all :-)

@ghost
Copy link

ghost commented May 8, 2015

Besides the nits on the commit structure, LGTM. Good thing you mentioned those defines.

@Hettomei Hettomei force-pushed the remove-last-FEAT_GUI-and-ALWAYS_USE_GUI branch from 69188a0 to ff56e7a Compare May 8, 2015 22:13
@Hettomei
Copy link
Contributor Author

Hettomei commented May 8, 2015

I rebased on master and squashed/changed logs according to comments.

I have done a push --force is that a good way to do a PR ?

@ghost
Copy link

ghost commented May 8, 2015

I have done a push --force is that a good way to do a PR ?

Yes, that's fine. Could you take a lot at this @mhinz and/or @splinterofchaos? I'm not 100 percent sure this code won't be needed in the future at some point.

@ghost ghost added the status:blocked-external Needs a third-party / external change or fix label May 9, 2015
@ghost
Copy link

ghost commented May 9, 2015

I'll just add a waiting label so this isn't forgotten.

if (menu->children == NULL) {
/* found a menu item instead of a sub-menu */
if (*p == NUL)
EMSG(_("E336: Menu path must lead to a sub-menu"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that message E336 is gone you can delete the E336 messages in src/nvim/po/*.po. And perhaps also the tag *E336* in runtime/doc/gui.txt.

Copy link

Choose a reason for hiding this comment

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

My understanding is that they they shouldn't be deleted as they're used for generating fuzzy translations at compile time. Not completely sure though, cc @fwalch.

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 was about to commit right now... I wait.

Also there is E338, and E340 (and I think many more) which is never found in source.

Copy link
Member

Choose a reason for hiding this comment

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

Yup, translations shouldn't be deleted from the PO files, even if they're unused. They might be useful for fuzzy translations.

Copy link
Contributor

Choose a reason for hiding this comment

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

@fwalch Didn't know that, thanks. Very sorry for the noise, @Hettomei.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the insight.

I m newbie to C, never used po files and english is not my native language so : what concretly mean "might be useful for fuzzy translations" ?

Copy link
Member

Choose a reason for hiding this comment

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

Fuzzy translations (as opposed to "manual" translations done by a human) are automatic translations where an existing translation is used for a similar, but different message. Obviously it won't be an exact translation, hence "fuzzy".

Copy link

Choose a reason for hiding this comment

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

Great, thanks @fwalch. Now that that's been sorted are you ok with this PR @glts?

equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 23, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 27, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 27, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 27, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 27, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 27, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 27, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 27, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 27, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 27, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request May 28, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jun 8, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jun 23, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 13, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 28, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 28, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 29, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 30, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Jul 30, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
justinmk pushed a commit to justinmk/neovim that referenced this pull request Jul 31, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
equalsraf pushed a commit to equalsraf/neovim that referenced this pull request Aug 2, 2016
This function is only used for windows
'mch_resolve_shortcut' can be found in vim source src/os_mswin.c
-> mch_resolve_shortcut(char_u *fname)

Spotted by @equalsraf, see PR neovim#2609
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor changes that are not features or bugfixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants