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