This is a followup to
https://groups.google.com/forum/#!topic/vim_dev/5RFo3q8xvfo where we talked
about the feature list items relevant to Mac:

2017-04-09 21:58 GMT+09:00 Bram Moolenaar <b...@moolenaar.net>:
>  We should make the feature list a bit more clear about what
those features mean.
>
> I now have:
>
> gui_mac                 Compiled with Macintosh GUI.
> mac                     Any Macintosh version of Vim, but not all OS X.
> macunix                 Compiled for OS X, with darwin
> osx                     Compiled for OS X, with or without darwin


Proposal
-------------

My proposal is to change them as follows:

'gui_mac' will be abolished by discontinuing maintaining the Carbon GUI
code and dropped from the list.

The rest of the items will be changed for eval.txt as follows:

mac         Any macOS versions of Vim
macunix     Compiled for macOS with pasteboard support (default)
osx         (Deprecated.  Use "mac" instead)

Not to mention, macOS implies Mac OS X and OS X.

Personally, I think the item 'osx' can also be dropped on this occation if
we don't worry much about the backwards compatibility of that particular
item.


Rationale
-------------

Next, let me explain how I came to the conclusion for each item.

(1) gui_mac

In src/configure.ac:2231--2232, we have had

auto) AC_MSG_RESULT(auto - Carbon GUI is outdated - disable GUI support)
        SKIP_CARBON=YES ;;

since 2010-07-14 (164fca39b).  Now that time has passed enough for
transition, I propose that we discontinue maintaining the code and drop it
from the codebase.

(2) mac/osx

Currently, 'mac' is set to 1 (evalfunc.c:5493) when MACOS is defined
(vim.h:103).

MACOS is defined when either MACOS_X_UNIX or MAC_CLASSIC is defined, but the
latter is no longer used by the current build system other than passing
-Dmacintosh to the configure script from the command line manually
(vim.h:93--104).

As a result, 'mac' is effectively a synonym of 'macunix' these days.

My proposal is to drop the MAC_CLASSIC semantics from 'mac', and to have it
play the same role as that of the current 'osx' does, in addition to the
MACOS_X_UNIX semantics.

(3) macunix

IMHO, the "darwin feature" is a sort of misnomer.  "Darwin" is the name of
an operating system upon which macOS is based.  So both "without darwin"
and "--disable-darwin" sound unjustifiably demolishing to Mac users.  On
this occasion, I propose changing the description in eval.txt and making it
more specific.  On macOS, what is known as clipboard in our community is
called pasteboard.

That said, since both the default --enable-darwin option and the
MACOS_X_UNIX flag play a crucially important role for the MacVim build
system, keeping them as-is is probably the best choice for now.


Patch
--------

The attached patch was made for my ideas above to take shape.

Though the patch is big in size and broad in range, it was actually made in
a pretty straightforward manner.  For the convenience of reviewers, leaving
a note about the procedure I took might be helpful for review and future
reference:

(1) Adjust the code relevant to MAC_CLASSIC so that the codebase will be
made independent of it.

(2) Now that MAC_CLASSIC is eliminated, MACOS and MACOS_X are synonym.  In
particular, noting that MACOS_X_UNIX implies MACOS_X,

        #if defined(MACOS) && !defined(MACOS_X_UNIX)

is identically false.  Based on those observations, replace MACOS with
MACOS_X.

(3) Now that MAC_CLASSIC and MACOS are eliminated, the source code of the
Carbon GUI is logically disconnected from the rest of the cadebase.  Remove
all the code relevant to the GUI from both the set of source files and the
build system.

(4) Do the proposed changes and update the documents accordingly.

As usual, any comment is welcome.  If you find any problem with the patch,
please let me know.

Best regards
Kazunobu Kuriyama

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Attachment: mac-cleanup.patch.gz
Description: GNU Zip compressed data

Raspunde prin e-mail lui