* admin/gitmerge.el (gitmerge-missing):
[emacs.git] / nextstep / README
blob03d69b16b27d7aecb113fde5863aa9a83781cf3b
1   NS -- the Cocoa interface for macOS and compatible systems
2   ----------------------------------------------------------
4 This directory contains files needed to build Emacs on system based on
5 NextStep (NS), including macOS and GNUstep, using the Cocoa API.
8   HISTORY
11 The Nextstep (NS) interface of GNU Emacs was originally written in
12 1994 for NeXTSTEP systems running Emacs 19 and subsequently ported to
13 OpenStep and then Rhapsody, which became Mac OS X.  In 2004 it was
14 adapted to GNUstep, a free OpenStep implementation, and in 2008 it was
15 merged to the GNU Emacs trunk and released with Emacs 23.  Around the
16 same time a separate Mac-only port using the Carbon APIs and
17 descending from a 2001 Mac OS 8/9 port of Emacs 21 was removed. (It
18 remains available externally under the name "mac".)
21   OVERVIEW OF COCOA AND OBJECTIVE-C
23 Cocoa is an API for the Objective-C language, an objective oriented
24 superset of C.  Anybody with experience with iOS or modern macOS
25 application development should feel at home.
27 A method call in Objective-C differs from most other languages in the
28 fact that it doesn't have a normal name.  Instead, the method name is
29 made up of the name of each parameter.  An exception to this rule are
30 methods without parameters.
32 The following calls a method in the object 'anObject'.
34     [anObject alpha:1 beta:2 gamma:3];
36 Classes are declared like the following:
38     @interface AClassName
39     {
40       // A class method.
41       + (TYPE)name1:(TYPE)param1
43       // An object method.
44       - (TYPE)name1:(TYPE)param1 name2:(TYPE)param2;
45     }
46     @end
49   GUIDELINES
51 * Adhere the to the FSF philosophy that a feature in GNU software
52   should not only be available on non-free systems.
54 * People with varying Cocoa and Objective-C skills will read and
55   modify the NS code over a long period of time.  Keep the code simple
56   and avoid language constructs that makes the code hard to maintain.
58 * Don't use macros and types intended for the XCode Interface Builder,
59   like 'IBAction'.
61 * The NS interface should work on all version of macOS from Mac OS X
62   10.6.8 (Snow Leopard) to the latest official release.
64 * Under macOS, it is possible to build Emacs using NS, X11, or console
65   only.  A new macOS feature should work in all appropriate builds.
68   TRACING SUPPORT
70 The NS interface features a printf-based trace package that prints the
71 call tree of selected functions in the Cocoa interface, plus various
72 extra information.  It can be enabled by uncommenting the line
73 defining 'NSTRACE_ENABLED' in "nsterm.h".  To enable more output,
74 uncomment the lines defining symbols starting with 'NSTRACE_GROUP'.
77   GNUSTEP AND OTHER COMPATIBLE SYSTEMS
79 The NS interface works on systems compatible with macOS, for example
80 GNUstep.  Even though they are less frequently used, this is important
81 for a number of reasons:
83 * It supports the GNUstep project and provides an Emacs with the same
84   look-and-feel as the rest of the system.
86 * This allows other Emacs developers to test their changes on the NS
87   interface without having access to a macOS machine.
89 * If a feature in the NS interface work on free systems like GNUstep,
90   this meets the FSF requirement that features in GNU software should
91   not only be available on non-free systems.
94   SEE ALSO
96 The src/ns... files contains the C and Objective-C parts.
98 The lisp/term/ns-win.el file contains the lisp part of the NS
99 interface.
101 The INSTALL file in this directory for compilation instructions.
103 The Nextstep section in the etc/TODO file for a list of ideas for
104 future development.
107 ----------------------------------------------------------------------
108 Copyright 2008-2017 Free Software Foundation, Inc.
110 This file is part of GNU Emacs.
112 GNU Emacs is free software: you can redistribute it and/or modify
113 it under the terms of the GNU General Public License as published by
114 the Free Software Foundation, either version 3 of the License, or
115 (at your option) any later version.
117 GNU Emacs is distributed in the hope that it will be useful,
118 but WITHOUT ANY WARRANTY; without even the implied warranty of
119 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
120 GNU General Public License for more details.
122 You should have received a copy of the GNU General Public License
123 along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.