emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Emacs.app (Cocoa/GNUstep port) release and feature list


From: Adrian Robert
Subject: Re: Emacs.app (Cocoa/GNUstep port) release and feature list
Date: Sat, 1 Dec 2007 15:30:56 +0300

> > The new #defines: HAVE_NS GNUSTEP COCOA COCOA_EXPERIMENTAL_CTRL_G
> >
> > Why not HAVE_GNUSTEP and HAVE_COCOA too?
>
> HAVE_XX seems to be standard for the overall windowing system / port
> being used: HAVE_XWINDOWS, HAVE_NTGUI.  GNUSTEP and COCOA are platform
> indicators, like DARWIN, MAC_OS8, GNU_LINUX, or VMS.  I would use
> "MAC_OSX" instead of COCOA, but that is already used by the Carbon
> port to mean essentially HAVE_CARBONGUI.
>
>
>
> > Also it seems that !GNUSTEP is the same as COCOA. Why not just use one
> > of them?
>
> I'm fine to make this change if people think it's easier to read.

I tried this, but on second thought there are two problems.  First,
GNUSTEP and COCOA are both implementations of the NeXTstep API.  There
are others out there, and if Emacs.app one day supports them then it
will need more than GNUSTEP and !GNUSTEP.  Also, it is not sufficient
to assume if MAC_OSX then COCOA, because GNUstep (and possibly other
implementations) can and are installed and used under OS X.

Second, it seems less readable to use "#ifndef XXX" for blocks of code
that are enabled on platform YYY. " #if YYY" (without the negative) is
clearer, even at the cost of additional identifiers.

I could rename them to something like NS_IMPL_GNUSTEP, NS_IMPL_COCOA
(or NS_VENDOR_GNU, NS_VENDOR_APPLE) to make their meaning clearer.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]