Merge from emacs-24; up to 2012-12-20T05:05:41Z!dmantipov@yandex.ru
[bpt/emacs.git] / etc / CONTRIBUTE
CommitLineData
ab422c4d 1Copyright (C) 2006-2013 Free Software Foundation, Inc.
ceaee230
JL
2See end for license conditions.
3
4
5 Contributing to Emacs
6
7Emacs is a collaborative project and we encourage contributions from
8anyone and everyone. If you want to contribute in the way that will
9help us most, we recommend (1) fixing reported bugs and (2)
10implementing the feature ideas in etc/TODO. However, if you think of
11new features to add, please suggest them too -- we might like your
12idea. Porting to new platforms is also useful, when there is a new
13platform, but that is not common nowadays.
14
15For documentation on how to develop Emacs changes, refer to the Emacs
16Manual and the Emacs Lisp Reference Manual (both included in the Emacs
17distribution). The web pages in http://www.gnu.org/software/emacs
18contain additional information.
19
20You may also want to submit your change so that can be considered for
21inclusion in a future version of Emacs (see below).
22
23If you don't feel up to hacking Emacs, there are many other ways to
24help. You can answer questions on the mailing lists, write
6d4cb47e
GM
25documentation, find and report bugs, check if existing bug reports
26are fixed in newer versions of Emacs, contribute to the Emacs web
ceaee230
JL
27pages, or develop a package that works with Emacs.
28
29Here are some style and legal conventions for contributors to Emacs:
30
31
32* Coding Standards
33
83a5f630 34Contributed code should follow the GNU Coding Standards.
ceaee230
JL
35
36If it doesn't, we'll need to find someone to fix the code before we
37can use it.
38
39Emacs has certain additional style and coding conventions.
40
d40084d1 41Ref: http://www.gnu.org/prep/standards/
ceaee230
JL
42Ref: GNU Coding Standards Info Manual
43Ref: The "Tips" Appendix in the Emacs Lisp Reference.
44
45
46* Copyright Assignment
47
50e5ebca
GM
48The FSF (Free Software Foundation) is the copyright holder for GNU Emacs.
49The FSF is a nonprofit with a worldwide mission to promote computer
50user freedom and to defend the rights of all free software users.
51For general information, see the website http://www.fsf.org/ .
52
53Generally speaking, for non-trivial contributions to GNU Emacs we
54require that the copyright be assigned to the FSF. For the reasons
55behind this, see: http://www.gnu.org/licenses/why-assign.html .
ceaee230 56
50e5ebca
GM
57Copyright assignment is a simple process. If you live in the US, you
58can do it entirely electronically. We can help you get started, and
59answer any questions you may have (or point you to the people with the
60answers), at the emacs-devel@gnu.org mailing list.
61
62A copyright disclaimer is also a possibility, but we prefer an assignment.
63We can accept small changes (roughly, fewer than 15 lines) without
64an assignment. This is a cumulative limit (e.g. three separate 5 line
65patches) over all your contributions.
ceaee230
JL
66
67* Getting the Source Code
68
83a5f630
GM
69The latest version of Emacs can be downloaded using Bazaar from the
70Savannah web site. It is important to write your patch based on the
71latest version. If you start from an older version, your patch may be
72outdated (so that maintainers will have a hard time applying it), or
73changes in Emacs may have made your patch unnecessary.
ceaee230 74
83a5f630
GM
75After you have downloaded the Bazaar source, you should read the file
76INSTALL.BZR for build instructions (they differ to some extent from a
ceaee230
JL
77normal build).
78
79Ref: http://savannah.gnu.org/projects/emacs
80
81
82* Submitting Patches
83
84Every patch must have several pieces of information before we
85can properly evaluate it.
86
87When you have all these pieces, bundle them up in a mail message and
14964899
GM
88send it to the developers. Sending it to bug-gnu-emacs@gnu.org
89(which is the bug/feature list) is recommended, because that list
90is coupled to a tracking system that makes it easier to locate patches.
91If your patch is not complete and you think it needs more discussion,
92you might want to send it to emacs-devel@gnu.org instead. If you
93revise your patch, send it as a followup to the initial topic.
ceaee230
JL
94
95** Description
96
97For bug fixes, a description of the bug and how your patch fixes this
98bug.
99
65b37d56 100For new features, a description of the feature and your implementation.
ceaee230
JL
101
102** ChangeLog
103
104A ChangeLog entry as plaintext (separate from the patch).
105
83a5f630 106See the various ChangeLog files for format and content. Note that,
ceaee230
JL
107unlike some other projects, we do require ChangeLogs also for
108documentation, i.e. Texinfo files.
109
110Ref: "Change Log Concepts" node of the GNU Coding Standards Info
111Manual, for how to write good log entries.
112
113** The patch itself.
114
115Please use "Context Diff" format.
116
83a5f630
GM
117If you are accessing the Bazaar repository, make sure your copy is
118up-to-date (e.g. with `bzr pull'), then use
119 bzr diff --no-aliases --diff-options=-cp
120Else, use
ceaee230
JL
121 diff -cp OLD NEW
122
123If your version of diff does not support these options, then get the
124latest version of GNU Diff.
125
126** Mail format.
127
128We prefer to get the patches as inline plain text.
129
130Please be aware of line wrapping which will make the patch unreadable
131and useless for us. To avoid that, you can use MIME attachments or,
132as a last resort, uuencoded gzipped text.
133
134** Please reread your patch before submitting it.
135
136** Do not mix changes.
137
138If you send several unrelated changes together, we will ask you to
139separate them so we can consider each of the changes by itself.
140
83a5f630
GM
141** Do not make formatting changes.
142
143Making cosmetic formatting changes (indentation, etc) makes it harder
144to see what you have really changed.
145
ceaee230
JL
146
147* Coding style and conventions.
148
149** Mandatory reading:
150
151The "Tips and Conventions" Appendix of the Emacs Lisp Reference.
152
153** Avoid using `defadvice' or `eval-after-load' for Lisp code to be
154included in Emacs.
155
156** Remove all trailing whitespace in all source and text files.
157
158** Use ?\s instead of ? in Lisp code for a space character.
159
160
161* Supplemental information for Emacs Developers.
162
83a5f630 163** Write access to the Emacs repository.
ceaee230
JL
164
165Once you become a frequent contributor to Emacs, we can consider
83a5f630 166giving you write access to the Bazaar repository.
ceaee230
JL
167
168
169** Emacs Mailing lists.
170
171Discussion about Emacs development takes place on emacs-devel@gnu.org.
172
14964899
GM
173Bug reports and fixes, feature requests and implementations should be
174sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled
175to the tracker at http://debbugs.gnu.org .
ceaee230 176
14964899
GM
177You can subscribe to the mailing lists, or see the list archives,
178by following links from http://savannah.gnu.org/mail/?group=emacs .
ceaee230
JL
179
180** Document your changes.
181
182Think carefully about whether your change requires updating the
183documentation. If it does, you can either do this yourself or add an
184item to the NEWS file.
185
186If you document your change in NEWS, please mark the NEWS entry with
187the documentation status of the change: if you submit the changes for
188the manuals, mark it with "+++"; if it doesn't need to be documented,
189mark it with "---"; if it needs to be documented, but you didn't
190submit documentation changes, leave the NEWS entry unmarked. (These
191marks are checked by the Emacs maintainers to make sure every change
192was reflected in the manuals.)
193
194
195** Understanding Emacs Internals.
196
197The best way to understand Emacs Internals is to read the code,
198but the nodes "Tips" and "GNU Emacs Internals" in the Appendix
199of the Emacs Lisp Reference Manual may also help.
200
201The file etc/DEBUG describes how to debug Emacs bugs.
202
203
ceaee230
JL
204\f
205This file is part of GNU Emacs.
206
ab73e885 207GNU Emacs is free software: you can redistribute it and/or modify
ceaee230 208it under the terms of the GNU General Public License as published by
ab73e885
GM
209the Free Software Foundation, either version 3 of the License, or
210(at your option) any later version.
ceaee230
JL
211
212GNU Emacs is distributed in the hope that it will be useful,
213but WITHOUT ANY WARRANTY; without even the implied warranty of
214MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
215GNU General Public License for more details.
216
217You should have received a copy of the GNU General Public License
ab73e885 218along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
ceaee230
JL
219\f
220Local variables:
221mode: outline
222paragraph-separate: "[ \f]*$"
223end:
224