Merged from emacs@sv.gnu.org. Last-minute emacsclient rewrites be damned!
[bpt/emacs.git] / CONTRIBUTE
CommitLineData
d1208b8b
NR
1
2 Contributing to Emacs
3
27e8e710
RS
4Emacs is a collaborative project and we encourage contributions from
5anyone and everyone. If you want to contribute in the way that will
6help us most, we recommend (1) fixing reported bugs and (2)
7implementing the feature ideas in etc/TODO. However, if you think of
8new features to add, please suggest them too -- we might like your
9idea. Porting to new platforms is also useful, when there is a new
10platform, but that is not common nowadays.
11
12For documentation on how to develop Emacs changes, refer to the Emacs
13Manual and the Emacs Lisp Reference Manual (both included in the Emacs
14distribution). The web pages in http://www.gnu.org/software/emacs
15contain additional information.
d1208b8b
NR
16
17You may also want to submit your change so that can be considered for
6f82a6d0 18inclusion in a future version of Emacs (see below).
d1208b8b 19
27e8e710
RS
20If you don't feel up to hacking Emacs, there are many other ways to
21help. You can answer questions on the mailing lists, write
22documentation, find and report bugs, contribute to the Emacs web
23pages, or develop a package that works with Emacs.
d1208b8b 24
27e8e710 25Here are some style and legal conventions for contributors to Emacs:
6f82a6d0 26
d1208b8b 27
05230057 28* Coding Standards
d1208b8b 29
05230057 30Contributed code should follow the GNU Coding Standard.
d1208b8b 31
05230057
KS
32If it doesn't, we'll need to find someone to fix the code before we
33can use it.
d1208b8b 34
05230057 35Emacs has certain additional style and coding conventions.
d1208b8b 36
05230057
KS
37Ref: http://www.gnu.org/prep/standards_toc.html
38Ref: GNU Coding Standards Info Manual
39Ref: The "Tips" Appendix in the Emacs Lisp Reference.
d1208b8b 40
d1208b8b 41
05230057 42* Copyright Assignment
d1208b8b 43
05230057
KS
44We can accept small changes without legal papers, and for medium-size
45changes a copyright disclaimer is ok too. To accept substantial
46contributions from you, we need a copyright assignment form filled out
47and filed with the FSF.
d1208b8b 48
05230057 49Contact us at emacs-devel@gnu.org to obtain the relevant forms.
d1208b8b 50
d1208b8b 51
05230057 52* Getting the Source Code
ccda8b92 53
05230057
KS
54The latest version of Emacs can be downloaded using CVS or Arch from
55the Savannah web site. It is important to write your patch based on
56this version; if you start from an older version, your patch may be
57outdated when you write it, and maintainers will have hard time
58applying it.
ccda8b92 59
05230057
KS
60After you have downloaded the CVS source, you should read the file
61INSTALL.CVS for build instructions (they differ to some extent from a
62normal build).
d1208b8b 63
05230057 64Ref: http://savannah.gnu.org/projects/emacs
d1208b8b 65
d1208b8b 66
05230057 67* Submitting Patches
d1208b8b 68
05230057
KS
69Every patch must have several pieces of information before we
70can properly evaluate it.
d1208b8b 71
05230057
KS
72When you have all these pieces, bundle them up in a mail message and
73send it to emacs-pretest-bug@gnu.org or emacs-devel@gnu.org.
d1208b8b 74
05230057 75All subsequent discussion should also be sent to the mailing list.
6f82a6d0 76
05230057 77** Description
d1208b8b 78
05230057
KS
79For bug fixes, a description of the bug and how your patch fixes this
80bug.
d1208b8b 81
05230057
KS
82For new features, a description of the feature and your
83implementation.
d1208b8b 84
05230057 85** ChangeLog
d1208b8b 86
05230057 87A ChangeLog entry as plaintext (separate from the patch).
d1208b8b 88
05230057
KS
89See the various ChangeLog files for format and content. Note that,
90unlike some other projects, we do require ChangeLogs also for
91documentation, i.e. Texinfo files.
27e8e710 92
05230057
KS
93Ref: "Change Log Concepts" node of the GNU Coding Standards Info
94Manual, for how to write good log entries.
d1208b8b 95
05230057 96** The patch itself.
ccda8b92 97
05230057 98Please use "Context Diff" format.
d1208b8b 99
05230057
KS
100If you are accessing the CVS repository use
101 cvs update; cvs diff -cp
102else, use
103 diff -cp OLD NEW
d1208b8b 104
05230057
KS
105If your version of diff does not support these options, then get the
106latest version of GNU Diff.
ccda8b92 107
05230057 108** Mail format.
d1208b8b 109
05230057 110We prefer to get the patches as inline plain text.
d1208b8b 111
05230057
KS
112Please be aware of line wrapping which will make the patch unreadable
113and useless for us. To avoid that, you can use MIME attachments or,
114as a last resort, uuencoded gzipped text.
014a250c 115
05230057 116** Please reread your patch before submitting it.
d1208b8b 117
05230057
KS
118** Do not mix changes.
119
120If you send several unrelated changes together, we will ask you to
121separate them so we can consider each of the changes by itself.
122
123
124* Coding style and conventions.
125
126** Mandatory reading:
127
128The "Tips and Conventions" Appendix of the Emacs Lisp Reference.
129
130** Avoid using `defadvice' or `eval-after-load' for Lisp code to be
131included in Emacs.
132
133** Remove all trailing whitespace in all source and text files.
134
135** Use ?\s instead of ? in Lisp code for a space character.
136
137
138* Supplemental information for Emacs Developers.
139
140** Write access to Emacs' CVS repository.
141
142Once you become a frequent contributor to Emacs, we can consider
143giving you write access to the CVS repository.
144
145
146** Emacs Mailing lists.
147
148Discussion about Emacs development takes place on emacs-devel@gnu.org.
149
f41adf50 150Bug reports for released versions are sent to bug-gnu-emacs@gnu.org.
05230057
KS
151
152Bug reports for development versions are sent to emacs-pretest-bug@gnu.org.
153
154You can subscribe to the mailing lists at savannah.gnu.org/projects/emacs.
155
f41adf50 156You can find the mailing lists archives at lists.gnu.org or gmane.org.
05230057
KS
157
158
159** Document your changes.
160
161Think carefully about whether your change requires updating the
162documentation. If it does, you can either do this yourself or add an
163item to the NEWS file.
164
165If you document your change in NEWS, please mark the NEWS entry with
166the documentation status of the change: if you submit the changes for
167the manuals, mark it with "+++"; if it doesn't need to be documented,
168mark it with "---"; if it needs to be documented, but you didn't
169submit documentation changes, leave the NEWS entry unmarked. (These
170marks are checked by the Emacs maintainers to make sure every change
171was reflected in the manuals.)
172
173
174** Understanding Emacs Internals.
175
176The best way to understand Emacs Internals is to read the code,
177but the nodes "Tips" and "GNU Emacs Internals" in the Appendix
178of the Emacs Lisp Reference Manual may also help.
179
180The file etc/DEBUG describes how to debug Emacs bugs.
181
182
183
184* How to Maintain Copyright Years for GNU Emacs
185
186** Our lawyer says it is ok if we add, to each file that has been in Emacs
187since Emacs 21 came out in 2001, all the subsequent years. We don't
188need to check whether *that file* was changed in those years.
189It's sufficient that *Emacs* was changed in those years (and it was!).
190
191** For those files that have been added since then, we should add
f41adf50 192the year it was added to Emacs, and all subsequent years.
05230057
KS
193
194** For the refcards under etc/, it's ok to simply use the latest year
195(typically in a `\def\year{YEAR}' expression) for the rendered copyright
196notice, while maintaining the full list of years in the copyright notice
197in the comments.
198
199\f
200Local variables:
201mode: outline
202paragraph-separate: "[ \f]*$"
203end:
d1208b8b 204