diff options
| author | Jan D | 2015-04-26 13:55:01 +0200 |
|---|---|---|
| committer | Jan D | 2015-04-26 13:55:01 +0200 |
| commit | f92ac2e82ed199d6f25d2a59508e08addb1150ac (patch) | |
| tree | d7d7756e3dbce10d8f73c27815d815499f78c2bd /CONTRIBUTE | |
| parent | 5a094119ce79723108abd90a1fcc33721e964823 (diff) | |
| parent | a40869789fc5502e3d4e393b7c31d78cb7f29aa1 (diff) | |
| download | emacs-f92ac2e82ed199d6f25d2a59508e08addb1150ac.tar.gz emacs-f92ac2e82ed199d6f25d2a59508e08addb1150ac.zip | |
Merge branch 'master' into cairo
Diffstat (limited to 'CONTRIBUTE')
| -rw-r--r-- | CONTRIBUTE | 177 |
1 files changed, 115 insertions, 62 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE index 005ca17a4e4..bf231554261 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE | |||
| @@ -7,19 +7,22 @@ http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html | |||
| 7 | * Information for Emacs Developers. | 7 | * Information for Emacs Developers. |
| 8 | 8 | ||
| 9 | An "Emacs Developer" is someone who contributes a lot of code or | 9 | An "Emacs Developer" is someone who contributes a lot of code or |
| 10 | documentation to the Emacs repository. Generally, they have write | 10 | documentation to the Emacs repository. Generally, they have write |
| 11 | access to the Emacs git repository on Savannah | 11 | access to the Emacs git repository on Savannah |
| 12 | https://savannah.gnu.org/git/?group=emacs. | 12 | https://savannah.gnu.org/git/?group=emacs. |
| 13 | 13 | ||
| 14 | ** Write access to the Emacs repository. | 14 | ** Write access to the Emacs repository. |
| 15 | 15 | ||
| 16 | Once you become a frequent contributor to Emacs, we can consider | 16 | Once you become a frequent contributor to Emacs, we can consider |
| 17 | giving you write access to the version-control repository. Request | 17 | giving you write access to the version-control repository. Request |
| 18 | access on the emacs-devel@gnu.org mailing list. | 18 | access on the emacs-devel@gnu.org mailing list. Also, be sure to |
| 19 | subscribe to the emacs-devel@gnu.org mailing list and include the | ||
| 20 | "emacs-announce" topic, so that you get the announcements about | ||
| 21 | feature freeze and other important events. | ||
| 19 | 22 | ||
| 20 | ** Using the Emacs repository | 23 | ** Using the Emacs repository |
| 21 | 24 | ||
| 22 | Emacs uses git for the source code repository. | 25 | Emacs uses Git for the source code repository. |
| 23 | 26 | ||
| 24 | See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get | 27 | See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get |
| 25 | started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more | 28 | started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more |
| @@ -27,50 +30,84 @@ advanced information. | |||
| 27 | 30 | ||
| 28 | Alternately, see admin/notes/git-workflow. | 31 | Alternately, see admin/notes/git-workflow. |
| 29 | 32 | ||
| 30 | If committing changes written by someone else, make the ChangeLog | 33 | If committing changes written by someone else, make the commit in |
| 31 | entry in their name, not yours. git distinguishes between the author | 34 | their name, not yours. Git distinguishes between the author |
| 32 | and the committer; use the --author option on the commit command to | 35 | and the committer; use the --author option on the commit command to |
| 33 | specify the actual author; the committer defaults to you. | 36 | specify the actual author; the committer defaults to you. |
| 34 | 37 | ||
| 35 | ** commit messages | 38 | ** Commit messages |
| 36 | 39 | ||
| 37 | When using git, commit messages should use ChangeLog format, with the | 40 | Emacs development no longer stores descriptions of new changes in |
| 38 | following modifications: | 41 | ChangeLog files. Instead, a single ChangeLog file is generated from |
| 42 | the commit messages when a release is prepared. So changes you commit | ||
| 43 | should not touch any of the ChangeLog files in the repository, but | ||
| 44 | instead should contain the log entries in the commit message. Here is | ||
| 45 | an example of a commit message (indented): | ||
| 39 | 46 | ||
| 40 | - Start with a single unindented summary line explaining the change, | 47 | Deactivate shifted region |
| 41 | then an empty line, then unindented ChangeLog entries. | ||
| 42 | 48 | ||
| 43 | You can use various Emacs functions to ease this process; see (info | 49 | Do not silently extend a region that is not highlighted; |
| 44 | "(emacs)Change Log Commands") or | 50 | this can happen after a shift (Bug#19003). |
| 45 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html. | 51 | * doc/emacs/mark.texi (Shift Selection): Document the change. |
| 52 | * lisp/window.el (handle-select-window): | ||
| 53 | * src/frame.c (Fhandle_switch_frame, Fselected_frame): | ||
| 54 | Deactivate the mark. | ||
| 55 | |||
| 56 | Below are some rules and recommendations for formatting commit | ||
| 57 | messages: | ||
| 58 | |||
| 59 | - Start with a single unindented summary line explaining the change; | ||
| 60 | do not end this line with a period. If that line starts with a | ||
| 61 | semi-colon and a space "; ", the log message will be ignored when | ||
| 62 | generating the ChangeLog file. Use this for minor commits that do | ||
| 63 | not need separate ChangeLog entries, such as changes in etc/NEWS. | ||
| 64 | |||
| 65 | - After the summary line, there should be an empty line, then | ||
| 66 | unindented ChangeLog entries. | ||
| 46 | 67 | ||
| 47 | - Limit lines in commit messages to 78 characters, unless they consist | 68 | - Limit lines in commit messages to 78 characters, unless they consist |
| 48 | of a single word of at most 140 characters. If you have trouble | 69 | of a single word of at most 140 characters; this is enforced by a |
| 49 | fitting the summary into 78 characters, add a summarizing paragraph | 70 | commit hook. It's nicer to limit the summary line to 50 characters; |
| 50 | below the empty line and before the individual file descriptions. | 71 | this isn't enforced. If the change can't be summarized so briefly, |
| 72 | add a paragraph after the empty line and before the individual file | ||
| 73 | descriptions. | ||
| 51 | 74 | ||
| 52 | - If only a single file is changed, the summary line can be the normal | 75 | - If only a single file is changed, the summary line can be the normal |
| 53 | file first line (starting with the asterisk). Then there is no | 76 | file first line (starting with the asterisk). Then there is no |
| 54 | individual files section. | 77 | individual files section. |
| 55 | 78 | ||
| 56 | - Explaining the rationale for a design choice is best done in comments | 79 | - If the commit has more than one author, the commit message should |
| 57 | in the source code. However, sometimes it is useful to describe just | 80 | contain separate lines to mention the other authors, like the |
| 58 | the rationale for a change; that can be done in the commit message | 81 | following: |
| 59 | between the summary line and the file entries. | 82 | |
| 83 | Co-authored-by: Joe Schmoe <j.schmoe@example.org> | ||
| 84 | |||
| 85 | - If the commit is a tiny change that is exempt from copyright paperwork, | ||
| 86 | the commit message should contain a separate line like the following: | ||
| 87 | |||
| 88 | Copyright-paperwork-exempt: yes | ||
| 89 | |||
| 90 | - The commit message should contain "Bug#NNNNN" if it is related to | ||
| 91 | bug number NNNNN in the debbugs database. This string is often | ||
| 92 | parenthesized, as in "(Bug#19003)". | ||
| 60 | 93 | ||
| 61 | - Commit messages should contain only printable UTF-8 characters. | 94 | - Commit messages should contain only printable UTF-8 characters. |
| 62 | 95 | ||
| 63 | - Commit messages should not contain the "Signed-off-by:" lines that | 96 | - Commit messages should not contain the "Signed-off-by:" lines that |
| 64 | are used in some other projects. | 97 | are used in some other projects. |
| 65 | 98 | ||
| 66 | ** ChangeLog notes | 99 | - Explaining the rationale for a design choice is best done in comments |
| 100 | in the source code. However, sometimes it is useful to describe just | ||
| 101 | the rationale for a change; that can be done in the commit message | ||
| 102 | between the summary line and the file entries. | ||
| 67 | 103 | ||
| 68 | - Emacs generally follows the GNU coding standards when it comes to | 104 | - Emacs generally follows the GNU coding standards when it comes to |
| 69 | ChangeLogs: | 105 | ChangeLogs: |
| 70 | http://www.gnu.org/prep/standards/html_node/Change-Logs.html . One | 106 | http://www.gnu.org/prep/standards/html_node/Change-Logs.html or |
| 71 | exception is that we still sometimes quote `like-this' (as the | 107 | "(info (standards)Change Logs"). One exception is that we still |
| 72 | standards used to recommend) rather than 'like-this' (as they do | 108 | sometimes quote `like-this' (as the standards used to recommend) |
| 73 | now), because `...' is so widely used elsewhere in Emacs. | 109 | rather than 'like-this' (as they do now), because `...' is so widely |
| 110 | used elsewhere in Emacs. | ||
| 74 | 111 | ||
| 75 | - Some of the rules in the GNU coding standards section 5.2 | 112 | - Some of the rules in the GNU coding standards section 5.2 |
| 76 | "Commenting Your Work" also apply to ChangeLog entries: they must be | 113 | "Commenting Your Work" also apply to ChangeLog entries: they must be |
| @@ -78,48 +115,58 @@ following modifications: | |||
| 78 | ending with a period (except the summary line should not end in a | 115 | ending with a period (except the summary line should not end in a |
| 79 | period). | 116 | period). |
| 80 | 117 | ||
| 81 | It is tempting to relax this rule for commit messages, since they | 118 | They are preserved indefinitely, and have a reasonable chance of |
| 82 | are somewhat transient. However, they are preserved indefinitely, | 119 | being read in the future, so it's better that they have good |
| 83 | and have a reasonable chance of being read in the future, so it's | 120 | presentation. |
| 84 | better that they have good presentation. | ||
| 85 | |||
| 86 | - There are multiple ChangeLogs in the emacs source; roughly one per | ||
| 87 | high-level directory. The ChangeLog entry for a commit belongs in the | ||
| 88 | lowest ChangeLog that is higher than or at the same level as any file | ||
| 89 | changed by the commit. | ||
| 90 | 121 | ||
| 91 | - Use the present tense; describe "what the change does", not "what | 122 | - Use the present tense; describe "what the change does", not "what |
| 92 | the change did". | 123 | the change did". |
| 93 | 124 | ||
| 94 | - Preferred form for several entries with the same content: | 125 | - Preferred form for several entries with the same content: |
| 95 | 126 | ||
| 96 | * help.el (view-lossage): | 127 | * lisp/help.el (view-lossage): |
| 97 | * kmacro.el (kmacro-edit-lossage): | 128 | * lisp/kmacro.el (kmacro-edit-lossage): |
| 98 | * edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300 keys. | 129 | * lisp/edmacro.el (edit-kbd-macro): Fix docstring, lossage is now 300. |
| 99 | 130 | ||
| 100 | (Rather than anything involving "ditto" and suchlike.) | 131 | (Rather than anything involving "ditto" and suchlike.) |
| 101 | 132 | ||
| 102 | - If the commit fixes a bug, add a separate line | 133 | - There is no standard or recommended way to identify revisions in |
| 103 | 134 | ChangeLog entries. Using Git SHA1 values limits the usability of | |
| 104 | Fixes: bug#NNNN | 135 | the references to Git, and will become much less useful if Emacs |
| 105 | 136 | switches to a different VCS. So we recommend against that. | |
| 106 | where NNNN is the bug number. | ||
| 107 | |||
| 108 | - In ChangeLog entries, there is no standard or recommended way to | ||
| 109 | identify revisions. | ||
| 110 | 137 | ||
| 111 | One way to identify revisions is by quoting their summary line. | 138 | One way to identify revisions is by quoting their summary line. |
| 112 | Another is with an action stamp - an RFC3339 date followed by ! | 139 | Another is with an action stamp - an RFC3339 date followed by ! |
| 113 | followed by the committer's email - for example, | 140 | followed by the committer's email - for example, |
| 114 | "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit" | 141 | "2014-01-16T05:43:35Z!esr@thyrsus.com". Often, "my previous commit" |
| 115 | will suffice. | 142 | will suffice. |
| 116 | 143 | ||
| 117 | - There is no need to make separate ChangeLog entries for files such | 144 | - There is no need to mention files such as NEWS, MAINTAINERS, and |
| 118 | as NEWS, MAINTAINERS, and FOR-RELEASE, or to indicate regeneration | 145 | FOR-RELEASE, or to indicate regeneration of files such as |
| 119 | of files such as 'configure'. "There is no need" means you don't | 146 | 'configure', in the ChangeLog entry. "There is no need" means you |
| 120 | have to, but you can if you want to. | 147 | don't have to, but you can if you want to. |
| 121 | 148 | ||
| 122 | ** branches | 149 | ** Generating ChangeLog entries |
| 150 | |||
| 151 | - You can use various Emacs functions to ease the process of writing | ||
| 152 | ChangeLog entries; see (info "(emacs)Change Log Commands") or | ||
| 153 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html. | ||
| 154 | |||
| 155 | - If you use Emacs VC, one way to format ChangeLog entries is to create | ||
| 156 | a top-level ChangeLog file manually, and update it with 'C-x 4 a' as | ||
| 157 | usual. Do not register the ChangeLog file under git; instead, use | ||
| 158 | 'C-c C-a' to insert its contents into into your *vc-log* buffer. | ||
| 159 | Or if 'log-edit-hook' includes 'log-edit-insert-changelog' (which it | ||
| 160 | does by default), they will be filled in for you automatically. | ||
| 161 | |||
| 162 | - Alternatively, you can use the vc-dwim command to maintain commit | ||
| 163 | messages. When you create a source directory, run the shell command | ||
| 164 | 'git-changelog-symlink-init' to create a symbolic link from | ||
| 165 | ChangeLog to .git/c/ChangeLog. Edit this ChangeLog via its symlink | ||
| 166 | with Emacs commands like 'C-x 4 a', and commit the change using the | ||
| 167 | shell command 'vc-dwim --commit'. Type 'vc-dwim --help' for more. | ||
| 168 | |||
| 169 | ** Branches | ||
| 123 | 170 | ||
| 124 | Development normally takes places on the trunk. | 171 | Development normally takes places on the trunk. |
| 125 | Sometimes specialized features are developed on separate branches | 172 | Sometimes specialized features are developed on separate branches |
| @@ -130,9 +177,9 @@ Development is discussed on the emacs-devel mailing list. | |||
| 130 | Sometime before the release of a new major version of Emacs a "feature | 177 | Sometime before the release of a new major version of Emacs a "feature |
| 131 | freeze" is imposed on the trunk, to prepare for creating a release | 178 | freeze" is imposed on the trunk, to prepare for creating a release |
| 132 | branch. No new features may be added to the trunk after this point, | 179 | branch. No new features may be added to the trunk after this point, |
| 133 | until the release branch is created. Announcements about the freeze | 180 | until the release branch is created. Announcements about the freeze |
| 134 | (and other important events) are made on the info-gnu-emacs mailing | 181 | (and other important events) are made on the emacs-devel mailing |
| 135 | list, and not anywhere else. | 182 | list under the "emacs-announce" topic, and not anywhere else. |
| 136 | 183 | ||
| 137 | The trunk branch is named "master" in git; release branches are named | 184 | The trunk branch is named "master" in git; release branches are named |
| 138 | "emacs-nn" where "nn" is the major version. | 185 | "emacs-nn" where "nn" is the major version. |
| @@ -151,13 +198,13 @@ then exclude that commit from the merge to trunk. | |||
| 151 | 198 | ||
| 152 | ** Other process information | 199 | ** Other process information |
| 153 | 200 | ||
| 154 | See all the files in admin/notes/* . In particular, see | 201 | See all the files in admin/notes/* . In particular, see |
| 155 | admin/notes/newfile, see admin/notes/repo. | 202 | admin/notes/newfile, see admin/notes/repo. |
| 156 | 203 | ||
| 157 | *** git vs rename | 204 | *** git vs rename |
| 158 | 205 | ||
| 159 | git does not explicitly represent a file renaming; it uses a percent | 206 | Git does not explicitly represent a file renaming; it uses a percent |
| 160 | changed heuristic to deduce that a file was renamed. So if you are | 207 | changed heuristic to deduce that a file was renamed. So if you are |
| 161 | planning to make extensive changes to a file after renaming it (or | 208 | planning to make extensive changes to a file after renaming it (or |
| 162 | moving it to another directory), you should: | 209 | moving it to another directory), you should: |
| 163 | 210 | ||
| @@ -168,7 +215,7 @@ moving it to another directory), you should: | |||
| 168 | - make other changes | 215 | - make other changes |
| 169 | 216 | ||
| 170 | - merge the feature branch to trunk, _not_ squashing the commits into | 217 | - merge the feature branch to trunk, _not_ squashing the commits into |
| 171 | one. The commit message on this merge should summarize the renames | 218 | one. The commit message on this merge should summarize the renames |
| 172 | and all the changes. | 219 | and all the changes. |
| 173 | 220 | ||
| 174 | ** Emacs Mailing lists. | 221 | ** Emacs Mailing lists. |
| @@ -182,6 +229,10 @@ to the tracker at http://debbugs.gnu.org . | |||
| 182 | You can subscribe to the mailing lists, or see the list archives, | 229 | You can subscribe to the mailing lists, or see the list archives, |
| 183 | by following links from http://savannah.gnu.org/mail/?group=emacs . | 230 | by following links from http://savannah.gnu.org/mail/?group=emacs . |
| 184 | 231 | ||
| 232 | To email a patch you can use a shell command like 'git format-patch -1' | ||
| 233 | to create a file, and then attach the file to your email. This nicely | ||
| 234 | packages the patch's commit message and changes. | ||
| 235 | |||
| 185 | ** Document your changes. | 236 | ** Document your changes. |
| 186 | 237 | ||
| 187 | Any change that matters to end-users should have an entry in etc/NEWS. | 238 | Any change that matters to end-users should have an entry in etc/NEWS. |
| @@ -191,11 +242,11 @@ Doc-strings should be updated together with the code. | |||
| 191 | Think about whether your change requires updating the manuals. If you | 242 | Think about whether your change requires updating the manuals. If you |
| 192 | know it does not, mark the NEWS entry with "---". If you know | 243 | know it does not, mark the NEWS entry with "---". If you know |
| 193 | that *all* the necessary documentation updates have been made, mark | 244 | that *all* the necessary documentation updates have been made, mark |
| 194 | the entry with "+++". Otherwise do not mark it. | 245 | the entry with "+++". Otherwise do not mark it. |
| 195 | 246 | ||
| 196 | Please see (info "(elisp)Documentation Tips") or | 247 | Please see (info "(elisp)Documentation Tips") or |
| 197 | https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html | 248 | https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html |
| 198 | for more specific tips on Emacs's doc style. Use `checkdoc' to check | 249 | for more specific tips on Emacs's doc style. Use 'checkdoc' to check |
| 199 | for documentation errors before submitting a patch. | 250 | for documentation errors before submitting a patch. |
| 200 | 251 | ||
| 201 | ** Test your changes. | 252 | ** Test your changes. |
| @@ -217,7 +268,9 @@ top-level directory. Most tests are in the directory | |||
| 217 | 268 | ||
| 218 | The best way to understand Emacs Internals is to read the code, | 269 | The best way to understand Emacs Internals is to read the code, |
| 219 | but the nodes "Tips" and "GNU Emacs Internals" in the Appendix | 270 | but the nodes "Tips" and "GNU Emacs Internals" in the Appendix |
| 220 | of the Emacs Lisp Reference Manual may also help. | 271 | of the Emacs Lisp Reference Manual may also help. Some source files, |
| 272 | such as xdisp.c, have large commentaries describing the design and | ||
| 273 | implementation in more detail. | ||
| 221 | 274 | ||
| 222 | The file etc/DEBUG describes how to debug Emacs bugs. | 275 | The file etc/DEBUG describes how to debug Emacs bugs. |
| 223 | 276 | ||