| CARVIEW |
Navigation Menu
-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
[RFC] Remove dead #ifdefed code #814
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
Conversation
|
Probably simple for everyone who reads Haskell fluently ;). Just kidding though, this could be great! |
I mean simple algorithm, not simple code :-) Btw I tried to do my best to simplify code if someone would be interested in it. |
|
Nicely done. I've been doing some cleaning and came across some of those already:
|
|
@equalsraf thank you for information. I will take this into account. |
|
I need advise on my last commit "Remove FEAT_OSFILETYPE". That feature is disabled in Vim, but was not entirely removed to use it in the future on operating systems which support storing a file type with the file (see more details in commit message). I am not sure that some of Neovim target platforms have such functionality. Does anyone have some insights? |
|
I removed all defines which look to me obviously unneeded. I have doubts only about |
It is already partially removed from screen.c
All code which was inside #ifdef CURSOR_SHAPE is being used now, except one in version.c (that occurence is fixed by this commit).
Feature description from Vim documentation: NOTE: this code is currently disabled, as the RISC OS implementation was removed. In the future this will use the 'filetype' option. On operating systems which support storing a file type with the file, you can specify that an autocommand should only be executed if the file is of a certain type. The actual type checking depends on which platform you are running Vim on; see your system's documentation for details. To use osfiletype checking in an autocommand you should put a list of types to match in angle brackets in place of a pattern, like this: > :au BufRead *.html,<&faf;HTML> runtime! syntax/html.vim This will match: - Any file whose name ends in ".html" - Any file whose type is "&faf" or "HTML", where the meaning of these types depends on which version of Vim you are using. Unknown types are considered NOT to match.
This feature allow to use any white space characters instead of one <TAB> in tag files. It is disabled in vanilla Vim's default build configuration. Exuberant ctags use format with exactly one TAB.
libuv provide uv_get_total_mem_kib. So HAVE_TOTAL_MEM should always be true. Before that commit in neovim maxmem=5120 and maxmemtot=10240. Now both equal to half of system memory.
It was used in Vim for NeXT OS.
|
Rebased. |
|
@Hinidu if you could update the docs that would be great, and splitting this into say 3 PRs would make it much easier to digest. I was wanting to get this PR through soon. |
|
I don't see the need to split this into multiple PRs, it's perfectly manageable and self-contained as it is. In my opinion. |
|
Ok. But it seems like no one has had time to review it so I inferred that it was due to the size. |
I guess the amount of commits does "scare" a little bit. Anyway, to counteract that I gave it a quick look and it looks quite good. I just had one thought: Don't have a lot of knowledge of EBCDIC, but after looking at that wiki page, I can see that it's really ancient (IBM mainframes?) Good riddance. That said, sometimes some people seem to want it?! https://www.sublimetext.com/forum/viewtopic.php?f=4&p=42210 I'd rather see it go, people that want compatibility with such a thing could perhaps use a plugin or vanilla. LGTM. |
|
No, don't worry about splitting it. |
|
Thank you @Hinidu |
I made a simple analyzer to find symbols which are tested in
#ifdefs but are not defined explicitly.Now I want to go through the resulting list step by step and remove dead code related to legacy systems and other stuff which we will not use in the future.
Inspired by #808