diff options
| author | Stephen Leake | 2014-12-06 02:11:36 -0600 |
|---|---|---|
| committer | Stephen Leake | 2014-12-06 02:38:34 -0600 |
| commit | 06264b3d247b21be627d1bcd7d928cd3140d249a (patch) | |
| tree | d47798b293468d4a60a185f4c62e2cda64601627 /CONTRIBUTE | |
| parent | 7841e9348276c076eb6be26683ee25f0e0db4706 (diff) | |
| download | emacs-06264b3d247b21be627d1bcd7d928cd3140d249a.tar.gz emacs-06264b3d247b21be627d1bcd7d928cd3140d249a.zip | |
Improve CONTRIBUTE and related files.
* CONTRIBUTE: improve; add explicit web references, move some info from
admin/notes/* here.
* INSTALL.REPO: You can't "just run make" after a clean checkout.
* admin/notes/commits: deleted; merged into ./CONTRIBUTE
* admin/notes/repo: move commit, branch info into ./CONTRIBUTE
Diffstat (limited to 'CONTRIBUTE')
| -rw-r--r-- | CONTRIBUTE | 182 |
1 files changed, 145 insertions, 37 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE index b07b6c66afe..9c904a798e5 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE | |||
| @@ -12,36 +12,65 @@ 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 | 12 | idea. Porting to new platforms is also useful, when there is a new |
| 13 | platform, but that is not common nowadays. | 13 | platform, but that is not common nowadays. |
| 14 | 14 | ||
| 15 | For documentation on how to develop Emacs changes, refer to the Emacs | 15 | For documentation on Emacs (to understand how to implement your desired change), refer to: |
| 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 | 16 | ||
| 20 | You may also want to submit your change so that can be considered for | 17 | - the Emacs Manual |
| 21 | inclusion in a future version of Emacs (see below). | 18 | http://www.gnu.org/software/emacs/manual/emacs.html |
| 19 | (info "(Emacs)Top") | ||
| 22 | 20 | ||
| 23 | If you don't feel up to hacking Emacs, there are many other ways to | 21 | - the Emacs Lisp Reference Manual |
| 24 | help. You can answer questions on the mailing lists, write | 22 | http://www.gnu.org/software/emacs/manual/elisp.html |
| 25 | documentation, find and report bugs, check if existing bug reports | 23 | (info "(elisp)Top") |
| 26 | are fixed in newer versions of Emacs, contribute to the Emacs web | 24 | |
| 27 | pages, or develop a package that works with Emacs. | 25 | - http://www.gnu.org/software/emacs |
| 26 | |||
| 27 | - http://www.emacswiki.org/ | ||
| 28 | |||
| 29 | There are many ways to contribute to Emacs: | ||
| 30 | |||
| 31 | - implement a new feature, and submit a patch (see "Submitting | ||
| 32 | Patches" below). | ||
| 33 | |||
| 34 | - answer questions on the Emacs user mailing list | ||
| 35 | https://lists.gnu.org/mailman/listinfo/help-gnu-emacs | ||
| 36 | |||
| 37 | - write documentation, either on the wiki, or in the Emacs source | ||
| 38 | repository (see "Submitting Patches" below) | ||
| 39 | |||
| 40 | - find and report bugs; use M-x report-emacs-bug | ||
| 41 | |||
| 42 | - check if existing bug reports are fixed in newer versions of Emacs | ||
| 43 | http://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=emacs | ||
| 44 | |||
| 45 | - develop a package that works with Emacs, and publish it on your own or in Gnu ELPA. | ||
| 28 | 46 | ||
| 29 | Here are some style and legal conventions for contributors to Emacs: | 47 | Here are some style and legal conventions for contributors to Emacs: |
| 30 | 48 | ||
| 31 | 49 | ||
| 32 | * Coding Standards | 50 | * Coding Standards |
| 33 | 51 | ||
| 34 | Contributed code should follow the GNU Coding Standards. | 52 | Contributed code should follow the GNU Coding Standards |
| 53 | (http://www.gnu.org/prep/standards/ - may also be available in info on | ||
| 54 | your system). | ||
| 35 | 55 | ||
| 36 | If it doesn't, we'll need to find someone to fix the code before we | 56 | If it doesn't, we'll need to find someone to fix the code before we |
| 37 | can use it. | 57 | can use it. |
| 38 | 58 | ||
| 39 | Emacs has certain additional style and coding conventions. | 59 | Emacs has additional style and coding conventions: |
| 60 | |||
| 61 | - the "Tips" Appendix in the Emacs Lisp Reference | ||
| 62 | http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html | ||
| 63 | (info "(elisp)Tips"). | ||
| 40 | 64 | ||
| 41 | Ref: http://www.gnu.org/prep/standards/ | 65 | - Avoid using `defadvice' or `eval-after-load' for Lisp code to be |
| 42 | Ref: GNU Coding Standards Info Manual | 66 | included in Emacs. |
| 43 | Ref: The "Tips" Appendix in the Emacs Lisp Reference. | ||
| 44 | 67 | ||
| 68 | - Remove all trailing whitespace in all source and text files. | ||
| 69 | |||
| 70 | - Emacs has no convention on whether to use tabs in source code, but | ||
| 71 | please don't change whitespace in the files you edit. | ||
| 72 | |||
| 73 | - Use ?\s instead of ? in Lisp code for a space character. | ||
| 45 | 74 | ||
| 46 | * Copyright Assignment | 75 | * Copyright Assignment |
| 47 | 76 | ||
| @@ -75,19 +104,18 @@ patches) over all your contributions. | |||
| 75 | 104 | ||
| 76 | * Getting the Source Code | 105 | * Getting the Source Code |
| 77 | 106 | ||
| 78 | The latest version of the Emacs source code can be downloaded from the | 107 | The current working version of the Emacs source code is stored in a |
| 79 | Savannah web site. It is important to write your patch based on the | 108 | git repository on the Savannah web site |
| 80 | latest version. If you start from an older version, your patch may be | 109 | (http://savannah.gnu.org/projects/emacs). It is important to write |
| 81 | outdated (so that maintainers will have a hard time applying it), or | 110 | your patch based on the current working version. If you start from an |
| 82 | changes in Emacs may have made your patch unnecessary. | 111 | older version, your patch may be outdated (so that maintainers will |
| 112 | have a hard time applying it), or changes in Emacs may have made your | ||
| 113 | patch unnecessary. | ||
| 83 | 114 | ||
| 84 | After you have downloaded the repository source, you should read the file | 115 | After you have downloaded the repository source, you should read the file |
| 85 | INSTALL.REPO for build instructions (they differ to some extent from a | 116 | INSTALL.REPO for build instructions (they differ to some extent from a |
| 86 | normal build). | 117 | normal build). |
| 87 | 118 | ||
| 88 | Ref: http://savannah.gnu.org/projects/emacs | ||
| 89 | |||
| 90 | |||
| 91 | * Submitting Patches | 119 | * Submitting Patches |
| 92 | 120 | ||
| 93 | Every patch must have several pieces of information before we | 121 | Every patch must have several pieces of information before we |
| @@ -112,11 +140,12 @@ For new features, a description of the feature and your implementation. | |||
| 112 | A ChangeLog entry as plaintext (separate from the patch). | 140 | A ChangeLog entry as plaintext (separate from the patch). |
| 113 | 141 | ||
| 114 | See the existing ChangeLog files for format and content. Note that, | 142 | See the existing ChangeLog files for format and content. Note that, |
| 115 | unlike some other projects, we do require ChangeLogs also for | 143 | unlike some other projects, we do require ChangeLogs for |
| 116 | documentation, i.e. Texinfo files. | 144 | documentation, i.e. Texinfo files. |
| 117 | 145 | ||
| 118 | Ref: "Change Log Concepts" node of the GNU Coding Standards Info | 146 | Ref: "Change Log Concepts" node of the GNU Coding Standards Info |
| 119 | Manual, for how to write good log entries. | 147 | Manual, for how to write good log entries. |
| 148 | http://www.gnu.org/prep/standards/html_node/Change-Log-Concepts.html | ||
| 120 | 149 | ||
| 121 | When using git, commit messages should use ChangeLog format, with a | 150 | When using git, commit messages should use ChangeLog format, with a |
| 122 | single short line explaining the change, then an empty line, then | 151 | single short line explaining the change, then an empty line, then |
| @@ -154,27 +183,106 @@ Making cosmetic formatting changes (indentation, etc) makes it harder | |||
| 154 | to see what you have really changed. | 183 | to see what you have really changed. |
| 155 | 184 | ||
| 156 | 185 | ||
| 157 | * Coding style and conventions. | 186 | * Supplemental information for Emacs Developers. |
| 158 | 187 | ||
| 159 | ** Mandatory reading: | 188 | An "Emacs Developer" is someone who contributes a lot of code or |
| 189 | documentation to the Emacs repository. | ||
| 160 | 190 | ||
| 161 | The "Tips and Conventions" Appendix of the Emacs Lisp Reference. | 191 | ** Write access to the Emacs repository. |
| 162 | 192 | ||
| 163 | ** Avoid using `defadvice' or `eval-after-load' for Lisp code to be | 193 | Once you become a frequent contributor to Emacs, we can consider |
| 164 | included in Emacs. | 194 | giving you write access to the version-control repository. Request |
| 195 | access on the emacs-devel@gnu.org mailing list. | ||
| 165 | 196 | ||
| 166 | ** Remove all trailing whitespace in all source and text files. | 197 | ** Using the Emacs repository |
| 167 | 198 | ||
| 168 | ** Use ?\s instead of ? in Lisp code for a space character. | 199 | Emacs uses git for the source code repository. |
| 169 | 200 | ||
| 201 | See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get | ||
| 202 | started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more | ||
| 203 | advanced information. | ||
| 170 | 204 | ||
| 171 | * Supplemental information for Emacs Developers. | 205 | Alternately, see admin/notes/git-workflow. |
| 172 | 206 | ||
| 173 | ** Write access to the Emacs repository. | 207 | If committing changes written by someone else, make the ChangeLog |
| 208 | entry in their name, not yours. git distinguishes between the author | ||
| 209 | and the committer; use the --author option on the commit command to | ||
| 210 | specify the actual author; the committer defaults to you. | ||
| 174 | 211 | ||
| 175 | Once you become a frequent contributor to Emacs, we can consider | 212 | ** Changelog notes |
| 176 | giving you write access to the version-control repository. | 213 | |
| 214 | - Preferred form for several entries with the same content: | ||
| 215 | |||
| 216 | * help.el (view-lossage): | ||
| 217 | * kmacro.el (kmacro-edit-lossage): | ||
| 218 | * edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300 keys. | ||
| 219 | |||
| 220 | (Rather than anything involving "ditto" and suchlike.) | ||
| 221 | |||
| 222 | - Emacs generally follows the GNU coding standards when it comes to | ||
| 223 | ChangeLogs: | ||
| 224 | http://www.gnu.org/prep/standards/html_node/Change-Logs.html . One | ||
| 225 | exception is that we still sometimes quote `like-this' (as the | ||
| 226 | standards used to recommend) rather than 'like-this' (as they do | ||
| 227 | now), because `...' is so widely used elsewhere in Emacs. | ||
| 228 | |||
| 229 | - There are multiple ChangeLogs in the emacs source; roughly one per | ||
| 230 | high-level directory. The ChangeLog entry for a commit belongs in the | ||
| 231 | lowest ChangeLog that is higher than or at the same level as any file | ||
| 232 | changed by the commit. | ||
| 233 | |||
| 234 | - In ChangeLog files, there is no standard or recommended way to | ||
| 235 | identify revisions. | ||
| 236 | |||
| 237 | One way to identify revisions is by quoting their summary line. | ||
| 238 | Another is with an action stamp - an RFC3339 date followed by ! | ||
| 239 | followed by the committer's email - for example, | ||
| 240 | "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit" | ||
| 241 | will suffice. | ||
| 242 | |||
| 243 | - There is no need to make separate change log entries for files such | ||
| 244 | as NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration | ||
| 245 | of files such as 'configure'. "There is no need" means you don't | ||
| 246 | have to, but you can if you want to. | ||
| 247 | |||
| 248 | ** branches | ||
| 249 | |||
| 250 | Development normally takes places on the trunk. | ||
| 251 | Sometimes specialized features are developed on separate branches | ||
| 252 | before possibly being merged to the trunk. | ||
| 253 | |||
| 254 | Development is discussed on the emacs-devel mailing list. | ||
| 255 | |||
| 256 | Sometime before the release of a new major version of Emacs a "feature | ||
| 257 | freeze" is imposed on the trunk, to prepare for creating a release | ||
| 258 | branch. No new features may be added to the trunk after this point, | ||
| 259 | until the release branch is created. This freeze is announced on the | ||
| 260 | emacs-devel mailing list, and not anywhere else. | ||
| 261 | |||
| 262 | For example, "emacs-23" for Emacs 23.2 and later, "EMACS_23_1_RC" for | ||
| 263 | 23.1, "EMACS_22_BASE" for 22.x, and "EMACS_21_1_RC" for 21.x. | ||
| 264 | |||
| 265 | You must follow emacs-devel to know exactly what kinds of changes are | ||
| 266 | allowed on what branch at any time. Announcements about the freeze | ||
| 267 | (and other important events) will contain "ANNOUNCE" in the subject. | ||
| 268 | |||
| 269 | If you are fixing a bug that exists in the current release, be sure to | ||
| 270 | commit it to the release branch; it will be merged to the master | ||
| 271 | branch later. | ||
| 272 | |||
| 273 | The exception is, if you know that the change will be difficult to | ||
| 274 | merge to the trunk (eg because the trunk code has changed a lot). In | ||
| 275 | that case, it's helpful if you can apply the change to both trunk and | ||
| 276 | branch yourself. Indicate in the release branch commit log that there | ||
| 277 | is no need to merge the commit to the trunk; start the commit message | ||
| 278 | with "Backport:". This is helpful for the person merging the release | ||
| 279 | branch to the trunk (it is handled automatically by gitmerge.el). | ||
| 280 | |||
| 281 | |||
| 282 | ** Other process information | ||
| 177 | 283 | ||
| 284 | See all the files in admin/notes/* . In particular, see | ||
| 285 | admin/notes/newfile, see admin/notes/repo. | ||
| 178 | 286 | ||
| 179 | ** Emacs Mailing lists. | 287 | ** Emacs Mailing lists. |
| 180 | 288 | ||
| @@ -189,7 +297,7 @@ by following links from http://savannah.gnu.org/mail/?group=emacs . | |||
| 189 | 297 | ||
| 190 | ** Document your changes. | 298 | ** Document your changes. |
| 191 | 299 | ||
| 192 | Any change that matters to end-users should have a NEWS entry. | 300 | Any change that matters to end-users should have an entry in etc/NEWS. |
| 193 | 301 | ||
| 194 | Think about whether your change requires updating the documentation | 302 | Think about whether your change requires updating the documentation |
| 195 | (both manuals and doc-strings). If you know it does not, mark the NEWS | 303 | (both manuals and doc-strings). If you know it does not, mark the NEWS |