* lisp/cedet: Reduce reliance on EIEIO internals.
[emacs.git] / CONTRIBUTE
blobdc6fd71624a9740826ed28466a20d16d09675c69
1 Copyright (C) 2006-2014 Free Software Foundation, Inc.
2 See end for license conditions.
5                         Contributing to Emacs
7 Emacs is a collaborative project and we encourage contributions from
8 anyone and everyone.  If you want to contribute in the way that will
9 help us most, we recommend (1) fixing reported bugs and (2)
10 implementing the feature ideas in etc/TODO.  However, if you think of
11 new features to add, please suggest them too -- we might like your
12 idea.  Porting to new platforms is also useful, when there is a new
13 platform, but that is not common nowadays.
15 For documentation on Emacs (to understand how to implement your
16 desired change), refer to:
18 - the Emacs Manual
19   http://www.gnu.org/software/emacs/manual/emacs.html
20   (info "(Emacs)Top")
22 - the Emacs Lisp Reference Manual
23   http://www.gnu.org/software/emacs/manual/elisp.html
24   (info "(elisp)Top")
26 - http://www.gnu.org/software/emacs
28 - http://www.emacswiki.org/
30 There are many ways to contribute to Emacs:
32 - implement a new feature, and submit a patch (see "Submitting
33   Patches" below).
35 - answer questions on the Emacs user mailing list
36   https://lists.gnu.org/mailman/listinfo/help-gnu-emacs
38 - write documentation, either on the wiki, or in the Emacs source
39   repository (see "Submitting Patches" below)
41 - find and report bugs; use M-x report-emacs-bug
43 - check if existing bug reports are fixed in newer versions of Emacs
44   http://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=emacs
46 - develop a package that works with Emacs, and publish it on your own
47   or in Gnu ELPA (see admin/notes/elpa).
49 Here are some style and legal conventions for contributors to Emacs:
52 * Coding Standards
54 Contributed code should follow the GNU Coding Standards
55 (http://www.gnu.org/prep/standards/ - may also be available in info on
56 your system).
58 If it doesn't, we'll need to find someone to fix the code before we
59 can use it.
61 Emacs has additional style and coding conventions:
63 - the "Tips" Appendix in the Emacs Lisp Reference
64   http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html
65   (info "(elisp)Tips").
67 - Avoid using `defadvice' or `eval-after-load' for Lisp code to be
68   included in Emacs.
70 - Remove all trailing whitespace in all source and text files.
72 - Emacs has no convention on whether to use tabs in source code;
73   please don't change whitespace in the files you edit.
75 - Use ?\s instead of ?  in Lisp code for a space character.
77 * Copyright Assignment
79 The FSF (Free Software Foundation) is the copyright holder for GNU Emacs.
80 The FSF is a nonprofit with a worldwide mission to promote computer
81 user freedom and to defend the rights of all free software users.
82 For general information, see the website http://www.fsf.org/ .
84 Generally speaking, for non-trivial contributions to GNU Emacs we
85 require that the copyright be assigned to the FSF.  For the reasons
86 behind this, see: http://www.gnu.org/licenses/why-assign.html .
88 Copyright assignment is a simple process.  Residents of some countries
89 can do it entirely electronically.  We can help you get started, and
90 answer any questions you may have (or point you to the people with the
91 answers), at the emacs-devel@gnu.org mailing list.
93 (Please note: general discussion about why some GNU projects ask
94 for a copyright assignment is off-topic for emacs-devel.
95 See gnu-misc-discuss instead.)
97 A copyright disclaimer is also a possibility, but we prefer an assignment.
98 Note that the disclaimer, like an assignment, involves you sending
99 signed paperwork to the FSF (simply saying "this is in the public domain"
100 is not enough).  Also, a disclaimer cannot be applied to future work, it
101 has to be repeated each time you want to send something new.
103 We can accept small changes (roughly, fewer than 15 lines) without
104 an assignment.  This is a cumulative limit (e.g. three separate 5 line
105 patches) over all your contributions.
107 * Getting the Source Code
109 The current working version of the Emacs source code is stored in a
110 git repository on the Savannah web site
111 (http://savannah.gnu.org/projects/emacs).  It is important to write
112 your patch based on the current working version.  If you start from an
113 older version, your patch may be outdated (so that maintainers will
114 have a hard time applying it), or changes in Emacs may have made your
115 patch unnecessary.
117 After you have downloaded the repository source, you should read the file
118 INSTALL.REPO for build instructions (they differ to some extent from a
119 normal build).
121 * Submitting Patches
123 Every patch must have several pieces of information before we
124 can properly evaluate it.
126 When you have all these pieces, bundle them up in a mail message and
127 send it to the developers.  Sending it to bug-gnu-emacs@gnu.org
128 (which is the bug/feature list) is recommended, because that list
129 is coupled to a tracking system that makes it easier to locate patches.
130 If your patch is not complete and you think it needs more discussion,
131 you might want to send it to emacs-devel@gnu.org instead.  If you
132 revise your patch, send it as a followup to the initial topic.
134 ** Description
136 For bug fixes, a description of the bug and how your patch fixes it.
138 For new features, a description of the feature and your implementation.
140 ** ChangeLog
142 A ChangeLog entry as plaintext (separate from the patch).
144 See the existing ChangeLog files for format and content.  Note that,
145 unlike some other projects, we do require ChangeLogs for
146 documentation, i.e. Texinfo files.
148 Ref: "Change Log Concepts" node of the GNU Coding Standards Info
149 Manual, for how to write good log entries.
150 http://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html
152 When using git, commit messages should use ChangeLog format, with a
153 single short line explaining the change, then an empty line, then
154 unindented ChangeLog entries.  (Essentially, a commit message should
155 be a duplicate of what the patch adds to the ChangeLog files.  We are
156 planning to automate this better, to avoid the duplication.) You can
157 use the Emacs functions log-edit-add-to-changelog or
158 log-edit-insert-changelog to ease this process.
160 ** The patch itself.
162 If you are accessing the Emacs repository, make sure your copy is
163 up-to-date (e.g. with 'git pull').  You can commit your changes
164 to a private branch and generate a patch from the master version
165 by using
166         git format-patch master
167 Or you can leave your changes uncommitted and use
168         git diff
169 With no repository, you can use
170         diff -u OLD NEW
172 ** Mail format.
174 We prefer to get the patches as plain text, either inline (be careful
175 your mail client does not change line breaks) or as MIME attachments.
177 ** Please reread your patch before submitting it.
179 ** Do not mix changes.
181 If you send several unrelated changes together, we will ask you to
182 separate them so we can consider each of the changes by itself.
184 ** Do not make formatting changes.
186 Making cosmetic formatting changes (indentation, etc) makes it harder
187 to see what you have really changed.
190 * Supplemental information for Emacs Developers.
192 An "Emacs Developer" is someone who contributes a lot of code or
193 documentation to the Emacs repository.
195 ** Write access to the Emacs repository.
197 Once you become a frequent contributor to Emacs, we can consider
198 giving you write access to the version-control repository. Request
199 access on the emacs-devel@gnu.org mailing list.
201 ** Using the Emacs repository
203 Emacs uses git for the source code repository.
205 See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get
206 started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more
207 advanced information.
209 Alternately, see admin/notes/git-workflow.
211 If committing changes written by someone else, make the ChangeLog
212 entry in their name, not yours. git distinguishes between the author
213 and the committer; use the --author option on the commit command to
214 specify the actual author; the committer defaults to you.
216 ** Changelog notes
218 - Emacs generally follows the GNU coding standards when it comes to
219   ChangeLogs:
220   http://www.gnu.org/prep/standards/html_node/Change-Logs.html .  One
221   exception is that we still sometimes quote `like-this' (as the
222   standards used to recommend) rather than 'like-this' (as they do
223   now), because `...' is so widely used elsewhere in Emacs.
225 - There are multiple ChangeLogs in the emacs source; roughly one per
226   high-level directory. The ChangeLog entry for a commit belongs in the
227   lowest ChangeLog that is higher than or at the same level as any file
228   changed by the commit.
230 - Preferred form for several entries with the same content:
232    * help.el (view-lossage):
233    * kmacro.el (kmacro-edit-lossage):
234    * edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300 keys.
236   (Rather than anything involving "ditto" and suchlike.)
238 - In ChangeLog files, there is no standard or recommended way to
239   identify revisions.
241   One way to identify revisions is by quoting their summary line.
242   Another is with an action stamp - an RFC3339 date followed by !
243   followed by the committer's email - for example,
244   "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit"
245   will suffice.
247 - There is no need to make separate change log entries for files such
248   as NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration
249   of files such as 'configure'.  "There is no need" means you don't
250   have to, but you can if you want to.
252 ** branches
254 Development normally takes places on the trunk.
255 Sometimes specialized features are developed on separate branches
256 before possibly being merged to the trunk.
258 Development is discussed on the emacs-devel mailing list.
260 Sometime before the release of a new major version of Emacs a "feature
261 freeze" is imposed on the trunk, to prepare for creating a release
262 branch.  No new features may be added to the trunk after this point,
263 until the release branch is created. This freeze is announced on the
264 emacs-devel mailing list, and not anywhere else.
266 The trunk branch is named "master" in git; release branches are named
267 "emacs-nn" where "nn" is the major version.
269 You must follow emacs-devel to know exactly what kinds of changes are
270 allowed on what branch at any time. Announcements about the freeze
271 (and other important events) will contain "ANNOUNCE" in the subject.
273 If you are fixing a bug that exists in the current release, be sure to
274 commit it to the release branch; it will be merged to the master
275 branch later.
277 However, if you know that the change will be difficult to merge to the
278 trunk (eg because the trunk code has changed a lot), you can apply the
279 change to both trunk and branch yourself.  Indicate in the release
280 branch commit log that there is no need to merge the commit to the
281 trunk; start the commit message with "Backport:".  gitmerge.el will
282 then exclude that commit from the merge to trunk.
285 ** Other process information
287 See all the files in admin/notes/* . In particular, see
288 admin/notes/newfile, see admin/notes/repo.
290 ** Emacs Mailing lists.
292 Discussion about Emacs development takes place on emacs-devel@gnu.org.
294 Bug reports and fixes, feature requests and implementations should be
295 sent to bug-gnu-emacs@gnu.org, the bug/feature list.  This is coupled
296 to the tracker at http://debbugs.gnu.org .
298 You can subscribe to the mailing lists, or see the list archives,
299 by following links from http://savannah.gnu.org/mail/?group=emacs .
301 ** Document your changes.
303 Any change that matters to end-users should have an entry in etc/NEWS.
305 Think about whether your change requires updating the documentation
306 (both manuals and doc-strings).  If you know it does not, mark the NEWS
307 entry with "---".  If you know that *all* the necessary documentation
308 updates have been made, mark the entry with "+++". Otherwise do not mark it.
310 ** Understanding Emacs Internals.
312 The best way to understand Emacs Internals is to read the code,
313 but the nodes "Tips" and "GNU Emacs Internals" in the Appendix
314 of the Emacs Lisp Reference Manual may also help.
316 The file etc/DEBUG describes how to debug Emacs bugs.
320 This file is part of GNU Emacs.
322 GNU Emacs is free software: you can redistribute it and/or modify
323 it under the terms of the GNU General Public License as published by
324 the Free Software Foundation, either version 3 of the License, or
325 (at your option) any later version.
327 GNU Emacs is distributed in the hope that it will be useful,
328 but WITHOUT ANY WARRANTY; without even the implied warranty of
329 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
330 GNU General Public License for more details.
332 You should have received a copy of the GNU General Public License
333 along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
335 Local variables:
336 mode: outline
337 paragraph-separate: "[  \f]*$"
338 end: