diff options
| author | John Wiegley | 2016-02-15 14:11:03 -0800 |
|---|---|---|
| committer | John Wiegley | 2016-02-15 14:11:03 -0800 |
| commit | 220613e089ec012ae4ab319637365132ce8dc306 (patch) | |
| tree | 715595598dfd3d80ba7c4306a0ea8f010b320db4 /CONTRIBUTE | |
| parent | ca03b85b9c1b8908f2651eaf594780c7b5217f61 (diff) | |
| parent | d4b93e11a519cf71beca69654fda158d01a26c3b (diff) | |
| download | emacs-220613e089ec012ae4ab319637365132ce8dc306.tar.gz emacs-220613e089ec012ae4ab319637365132ce8dc306.zip | |
Merge from origin/emacs-25
d4b93e1 Minor fixes in global-auto-composition-mode
02b037b Allow arithmetic operators inside C++ template constructs.
44b16f6 Avoid crashes in semi-malformed 'condition-case'
652e5b4 Allow arithmetic operators inside C++ template constructs.
d9ea795 Fix regression with 'recent-keys' and keyboard macros
903603f Fix wording in a doc-view.el comment
cf79616 ; Spelling fixes
f8bf1b3 CONTRIBUTE cleanups and updates
f3aaca3 Port USE_STACK_LISP_OBJECTS fix to Clang
1834ac7 Port to x86 GCC 4.3.1 and earlier
8482949 Fix point movement under 'scroll-conservatively'
c1313b5 Replace colon in file name (not legal on Windows)
f7af26c Fix a typo in edt.texi
8badf95 Make 'mmap_realloc' on MS-Windows more reliable
856cd94 Grep alias `all' shall not match parent directory
Diffstat (limited to 'CONTRIBUTE')
| -rw-r--r-- | CONTRIBUTE | 213 |
1 files changed, 109 insertions, 104 deletions
diff --git a/CONTRIBUTE b/CONTRIBUTE index 7cb4a1c7544..d17e53cc636 100644 --- a/CONTRIBUTE +++ b/CONTRIBUTE | |||
| @@ -1,48 +1,51 @@ | |||
| 1 | This file contains information on Emacs developer processes. | 1 | * How developers contribute to GNU Emacs |
| 2 | 2 | ||
| 3 | For information on contributing to Emacs as a non-developer, see | 3 | Here is how software developers can contribute to Emacs. (Non-developers: see |
| 4 | (info "(emacs)Contributing") or | ||
| 5 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html | 4 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Contributing.html |
| 5 | or run the shell command 'info "(emacs)Contributing"'.) | ||
| 6 | 6 | ||
| 7 | * Information for Emacs Developers. | 7 | ** The Emacs repository |
| 8 | 8 | ||
| 9 | An "Emacs Developer" is someone who contributes a lot of code or | 9 | Emacs development uses Git on Savannah for its main repository. |
| 10 | documentation to the Emacs repository. Generally, they have write | 10 | Briefly, the following shell commands build and run Emacs from scratch: |
| 11 | access to the Emacs git repository on Savannah | ||
| 12 | https://savannah.gnu.org/git/?group=emacs. | ||
| 13 | 11 | ||
| 14 | ** Write access to the Emacs repository. | 12 | git config --global user.name 'Your Name' |
| 13 | git config --global user.email 'your.name@example.com' | ||
| 14 | git config --global transfer.fsckObjects true | ||
| 15 | git clone git://git.sv.gnu.org/emacs.git | ||
| 16 | cd emacs | ||
| 17 | ./autogen.sh | ||
| 18 | ./configure | ||
| 19 | make | ||
| 20 | src/emacs | ||
| 15 | 21 | ||
| 16 | Once you become a frequent contributor to Emacs, we can consider | 22 | For more details, see |
| 17 | giving you write access to the version-control repository. Request | 23 | http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs and |
| 18 | access on the emacs-devel@gnu.org mailing list. Also, be sure to | 24 | http://www.emacswiki.org/emacs/GitForEmacsDevs or see the file |
| 19 | subscribe to the emacs-devel@gnu.org mailing list and include the | 25 | admin/notes/git-workflow. |
| 20 | "emacs-announce" topic, so that you get the announcements about | ||
| 21 | feature freeze and other important events. | ||
| 22 | 26 | ||
| 23 | ** Using the Emacs repository | 27 | ** Getting involved with development |
| 24 | 28 | ||
| 25 | Emacs uses Git for the source code repository. | 29 | You can subscribe to the emacs-devel@gnu.org mailing list, paying |
| 30 | attention to postings with subject lines containing "emacs-announce", | ||
| 31 | as these discuss important events like feature freezes. See | ||
| 32 | http://lists.gnu.org/mailman/listinfo/emacs-devel for mailing list | ||
| 33 | instructions and archives. You can develop and commit changes in your | ||
| 34 | own copy of the repository, and discuss proposed changes on the | ||
| 35 | mailing list. Frequent contributors to Emacs can request write access | ||
| 36 | there. | ||
| 26 | 37 | ||
| 27 | See http://www.emacswiki.org/emacs/GitQuickStartForEmacsDevs to get | 38 | ** Committing changes by others |
| 28 | started, and http://www.emacswiki.org/emacs/GitForEmacsDevs for more | ||
| 29 | advanced information. | ||
| 30 | 39 | ||
| 31 | Alternately, see admin/notes/git-workflow. | 40 | If committing changes written by someone else, commit in their name, |
| 32 | 41 | not yours. You can use 'git commit --author="AUTHOR"' to specify a | |
| 33 | If committing changes written by someone else, make the commit in | 42 | change's author. |
| 34 | their name, not yours. Git distinguishes between the author | ||
| 35 | and the committer; use the --author option on the commit command to | ||
| 36 | specify the actual author; the committer defaults to you. | ||
| 37 | 43 | ||
| 38 | ** Commit messages | 44 | ** Commit messages |
| 39 | 45 | ||
| 40 | Emacs development no longer stores descriptions of new changes in | 46 | Ordinarily, a change you commit should contain a log entry in its |
| 41 | ChangeLog files. Instead, a single ChangeLog file is generated from | 47 | commit message and should not touch the repository's ChangeLog files. |
| 42 | the commit messages when a release is prepared. So changes you commit | 48 | Here is an example commit message (indented): |
| 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): | ||
| 46 | 49 | ||
| 47 | Deactivate shifted region | 50 | Deactivate shifted region |
| 48 | 51 | ||
| @@ -53,12 +56,13 @@ an example of a commit message (indented): | |||
| 53 | * src/frame.c (Fhandle_switch_frame, Fselected_frame): | 56 | * src/frame.c (Fhandle_switch_frame, Fselected_frame): |
| 54 | Deactivate the mark. | 57 | Deactivate the mark. |
| 55 | 58 | ||
| 56 | Below are some rules and recommendations for formatting commit | 59 | Occasionally, commit messages are collected and prepended to a |
| 57 | messages: | 60 | ChangeLog file, where they can be corrected. It saves time to get |
| 61 | them right the first time, so here are guidelines for formatting them: | ||
| 58 | 62 | ||
| 59 | - Start with a single unindented summary line explaining the change; | 63 | - 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 | 64 | 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 | 65 | semicolon and a space "; ", the commit message will be ignored when |
| 62 | generating the ChangeLog file. Use this for minor commits that do | 66 | generating the ChangeLog file. Use this for minor commits that do |
| 63 | not need separate ChangeLog entries, such as changes in etc/NEWS. | 67 | not need separate ChangeLog entries, such as changes in etc/NEWS. |
| 64 | 68 | ||
| @@ -104,19 +108,19 @@ messages: | |||
| 104 | the rationale for a change; that can be done in the commit message | 108 | the rationale for a change; that can be done in the commit message |
| 105 | between the summary line and the file entries. | 109 | between the summary line and the file entries. |
| 106 | 110 | ||
| 107 | - Emacs generally follows the GNU coding standards when it comes to | 111 | - Emacs generally follows the GNU coding standards for ChangeLogs: see |
| 108 | ChangeLogs: | 112 | http://www.gnu.org/prep/standards/html_node/Change-Logs.html |
| 109 | http://www.gnu.org/prep/standards/html_node/Change-Logs.html or | 113 | or run 'info "(standards)Change Logs"'. One exception is that |
| 110 | "(info (standards)Change Logs"). One exception is that we still | 114 | commits still sometimes quote `like-this' (as the standards used to |
| 111 | sometimes quote `like-this' (as the standards used to recommend) | 115 | recommend) rather than 'like-this' or ‘like this’ (as they do now), |
| 112 | rather than 'like-this' (as they do now), because `...' is so widely | 116 | as `...' is so widely used elsewhere in Emacs. |
| 113 | used elsewhere in Emacs. | ||
| 114 | 117 | ||
| 115 | - Some of the rules in the GNU coding standards section 5.2 | 118 | - Some commenting rules in the GNU coding standards also apply |
| 116 | "Commenting Your Work" also apply to ChangeLog entries: they must be | 119 | to ChangeLog entries: they must be in English, and be complete |
| 117 | in English, and be complete sentences starting with a capital and | 120 | sentences starting with a capital and ending with a period (except |
| 118 | ending with a period (except the summary line should not end in a | 121 | the summary line should not end in a period). See |
| 119 | period). | 122 | http://www.gnu.org/prep/standards/html_node/Comments.html |
| 123 | or run 'info "(standards)Comments"'. | ||
| 120 | 124 | ||
| 121 | They are preserved indefinitely, and have a reasonable chance of | 125 | They are preserved indefinitely, and have a reasonable chance of |
| 122 | being read in the future, so it's better that they have good | 126 | being read in the future, so it's better that they have good |
| @@ -145,15 +149,15 @@ messages: | |||
| 145 | will suffice. | 149 | will suffice. |
| 146 | 150 | ||
| 147 | - There is no need to mention files such as NEWS and MAINTAINERS, or | 151 | - There is no need to mention files such as NEWS and MAINTAINERS, or |
| 148 | to indicate regeneration of files such as 'configure', in the | 152 | to indicate regeneration of files such as 'lib/gnulib.mk', in the |
| 149 | ChangeLog entry. "There is no need" means you don't have to, but | 153 | ChangeLog entry. "There is no need" means you don't have to, but |
| 150 | you can if you want to. | 154 | you can if you want to. |
| 151 | 155 | ||
| 152 | ** Generating ChangeLog entries | 156 | ** Generating ChangeLog entries |
| 153 | 157 | ||
| 154 | - You can use various Emacs functions to ease the process of writing | 158 | - You can use Emacs functions to write ChangeLog entries; see |
| 155 | ChangeLog entries; see (info "(emacs)Change Log Commands") or | 159 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html |
| 156 | http://www.gnu.org/software/emacs/manual/html_node/emacs/Change-Log-Commands.html. | 160 | or run 'info "(emacs)Change Log Commands"'. |
| 157 | 161 | ||
| 158 | - If you use Emacs VC, one way to format ChangeLog entries is to create | 162 | - If you use Emacs VC, one way to format ChangeLog entries is to create |
| 159 | a top-level ChangeLog file manually, and update it with 'C-x 4 a' as | 163 | a top-level ChangeLog file manually, and update it with 'C-x 4 a' as |
| @@ -171,32 +175,33 @@ messages: | |||
| 171 | 175 | ||
| 172 | ** Branches | 176 | ** Branches |
| 173 | 177 | ||
| 174 | Development normally takes places on the trunk. | 178 | Future development normally takes place on the master branch. |
| 175 | Sometimes specialized features are developed on separate branches | 179 | Sometimes specialized features are developed on other branches before |
| 176 | before possibly being merged to the trunk. | 180 | possibly being merged to the master. Release branches are named |
| 177 | 181 | "emacs-NN" where NN is the major version number, and are mainly | |
| 178 | Development is discussed on the emacs-devel mailing list. | 182 | intended for more-conservative changes such as bug fixes. Typically, |
| 179 | 183 | collective development is active on the master branch and possibly on | |
| 180 | The trunk branch is named "master" in git; release branches are named | 184 | the current release branch. Periodically, the current release branch |
| 181 | "emacs-nn" where "nn" is the major version. | 185 | is merged into the master, using the gitmerge function described in |
| 186 | admin/notes-git-workflow. | ||
| 182 | 187 | ||
| 183 | If you are fixing a bug that exists in the current release, be sure to | 188 | If you are fixing a bug that exists in the current release, be sure to |
| 184 | commit it to the release branch; it will be merged to the master | 189 | commit it to the release branch; it will be merged to the master |
| 185 | branch later. | 190 | branch later by the gitmerge function. |
| 186 | 191 | ||
| 187 | However, if you know that the change will be difficult to merge to | 192 | However, if you know that the change will be difficult to merge to the |
| 188 | master (eg because the code on master has changed a lot), you can | 193 | master (e.g., because the code on master has changed a lot), you can |
| 189 | apply the change to both master and branch yourself. It could also | 194 | apply the change to both master and branch yourself. It could also |
| 190 | happen that a change is cherry-picked from master to the release | 195 | happen that a change is cherry-picked from master to the release |
| 191 | branch, and so doesn't need to be merged back. In these cases, | 196 | branch, and so doesn't need to be merged back. In these cases, |
| 192 | indicate in the release branch commit log that there is no need to | 197 | say in the release branch commit message that there is no need to merge |
| 193 | merge the commit to master; start the commit message with "Backport:". | 198 | the commit to master, by starting the commit message with "Backport:". |
| 194 | gitmerge.el will then exclude that commit from the merge to trunk. | 199 | The gitmerge function excludes these commits from the merge to the master. |
| 195 | 200 | ||
| 196 | Some changes should not be merged to master at all, for whatever | 201 | Some changes should not be merged to master at all, for whatever |
| 197 | reasons. These should be marked by including something like "Do not | 202 | reasons. These should be marked by including something like "Do not |
| 198 | merge to master" or anything that matches gitmerge-skip-regexp (see | 203 | merge to master" or anything that matches gitmerge-skip-regexp (see |
| 199 | gitmerge.el) in the log message. | 204 | admin/gitmerge.el) in the commit message. |
| 200 | 205 | ||
| 201 | ** Other process information | 206 | ** Other process information |
| 202 | 207 | ||
| @@ -206,10 +211,11 @@ Discussion about Emacs development takes place on emacs-devel@gnu.org. | |||
| 206 | 211 | ||
| 207 | Bug reports and fixes, feature requests and implementations should be | 212 | Bug reports and fixes, feature requests and implementations should be |
| 208 | sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled | 213 | sent to bug-gnu-emacs@gnu.org, the bug/feature list. This is coupled |
| 209 | to the tracker at http://debbugs.gnu.org . | 214 | to the http://debbugs.gnu.org tracker. |
| 210 | 215 | ||
| 211 | You can subscribe to the mailing lists, or see the list archives, | 216 | The Savannah info page http://savannah.gnu.org/mail/?group=emacs |
| 212 | by following links from http://savannah.gnu.org/mail/?group=emacs . | 217 | describes how to subscribe to the mailing lists, or see the list |
| 218 | archives. | ||
| 213 | 219 | ||
| 214 | To email a patch you can use a shell command like 'git format-patch -1' | 220 | To email a patch you can use a shell command like 'git format-patch -1' |
| 215 | to create a file, and then attach the file to your email. This nicely | 221 | to create a file, and then attach the file to your email. This nicely |
| @@ -219,11 +225,10 @@ such patch without additional remarks, you can use a command like | |||
| 219 | 225 | ||
| 220 | ** Issue tracker (a.k.a. "bug tracker") | 226 | ** Issue tracker (a.k.a. "bug tracker") |
| 221 | 227 | ||
| 222 | The Emacs issue tracker is at http://debbugs.gnu.org/. The form | 228 | The Emacs issue tracker at http://debbugs.gnu.org lets you view bug |
| 223 | presented by that page allows to view bug reports and search the | 229 | reports and search the database for bugs matching several criteria. |
| 224 | database for bugs matching several criteria. Messages posted to the | 230 | Messages posted to the bug-gnu-emacs@gnu.org mailing list, mentioned |
| 225 | bug-gnu-emacs@gnu.org mailing list, mentioned above, are recorded by | 231 | above, are recorded by the tracker with the corresponding bugs/issues. |
| 226 | the tracker with the corresponding bugs/issues. | ||
| 227 | 232 | ||
| 228 | GNU ELPA has a 'debbugs' package that allows accessing the tracker | 233 | GNU ELPA has a 'debbugs' package that allows accessing the tracker |
| 229 | database from Emacs. | 234 | database from Emacs. |
| @@ -239,7 +244,7 @@ The process of going through old or new bugs and acting on them is | |||
| 239 | called bug triage. This process is described in the file | 244 | called bug triage. This process is described in the file |
| 240 | admin/notes/bug-triage. | 245 | admin/notes/bug-triage. |
| 241 | 246 | ||
| 242 | ** Document your changes. | 247 | ** Documenting your changes |
| 243 | 248 | ||
| 244 | Any change that matters to end-users should have an entry in etc/NEWS. | 249 | Any change that matters to end-users should have an entry in etc/NEWS. |
| 245 | 250 | ||
| @@ -250,21 +255,21 @@ know it does not, mark the NEWS entry with "---". If you know | |||
| 250 | that *all* the necessary documentation updates have been made, mark | 255 | that *all* the necessary documentation updates have been made, mark |
| 251 | the entry with "+++". Otherwise do not mark it. | 256 | the entry with "+++". Otherwise do not mark it. |
| 252 | 257 | ||
| 253 | Please see (info "(elisp)Documentation Tips") or | 258 | For more specific tips on Emacs's doc style, see |
| 254 | https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html | 259 | http://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html |
| 255 | for more specific tips on Emacs's doc style. Use 'checkdoc' to check | 260 | Use 'checkdoc' to check for documentation errors before submitting a patch. |
| 256 | for documentation errors before submitting a patch. | ||
| 257 | 261 | ||
| 258 | ** Test your changes. | 262 | ** Testing your changes |
| 259 | 263 | ||
| 260 | Please test your changes before committing them or sending them to the | 264 | Please test your changes before committing them or sending them to the |
| 261 | list. If possible, add a new test along with any bug fix or new | 265 | list. If possible, add a new test along with any bug fix or new |
| 262 | functionality you commit (of course, some changes cannot be easily | 266 | functionality you commit (of course, some changes cannot be easily |
| 263 | tested). | 267 | tested). |
| 264 | 268 | ||
| 265 | Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See (info | 269 | Emacs uses ERT, Emacs Lisp Regression Testing, for testing. See |
| 266 | "(ert)") or https://www.gnu.org/software/emacs/manual/html_node/ert/ | 270 | http://www.gnu.org/software/emacs/manual/html_node/ert/ |
| 267 | for more information on writing and running tests. | 271 | or run 'info "(ert)"' for for more information on writing and running |
| 272 | tests. | ||
| 268 | 273 | ||
| 269 | If your test lasts longer than some few seconds, mark it in its | 274 | If your test lasts longer than some few seconds, mark it in its |
| 270 | 'ert-deftest' definition with ":tags '(:expensive-test)". | 275 | 'ert-deftest' definition with ":tags '(:expensive-test)". |
| @@ -293,27 +298,26 @@ If your test file contains the tests "test-foo", "test2-foo" and | |||
| 293 | "test-foo-remote", and you want to run only the former two tests, you | 298 | "test-foo-remote", and you want to run only the former two tests, you |
| 294 | could use a regexp: "make <filename> SELECTOR='\"foo$$\"'" . | 299 | could use a regexp: "make <filename> SELECTOR='\"foo$$\"'" . |
| 295 | 300 | ||
| 296 | ** Understanding Emacs Internals. | 301 | ** Understanding Emacs internals |
| 302 | |||
| 303 | The best way to understand Emacs internals is to read the code. Some | ||
| 304 | source files, such as xdisp.c, have extensive comments describing the | ||
| 305 | design and implementation. The following resources may also help: | ||
| 306 | |||
| 307 | http://www.gnu.org/software/emacs/manual/html_node/elisp/Tips.html | ||
| 308 | http://www.gnu.org/software/emacs/manual/html_node/elisp/GNU-Emacs-Internals.html | ||
| 297 | 309 | ||
| 298 | The best way to understand Emacs Internals is to read the code, | 310 | or run 'info "(elisp)Tips"' or 'info "(elisp)GNU Emacs Internals"'. |
| 299 | but the nodes "Tips" and "GNU Emacs Internals" in the Appendix | ||
| 300 | of the Emacs Lisp Reference Manual may also help. Some source files, | ||
| 301 | such as xdisp.c, have large commentaries describing the design and | ||
| 302 | implementation in more detail. | ||
| 303 | 311 | ||
| 304 | The file etc/DEBUG describes how to debug Emacs bugs. | 312 | The file etc/DEBUG describes how to debug Emacs bugs. |
| 305 | 313 | ||
| 306 | *** Non-ASCII characters in Emacs files | 314 | *** Non-ASCII characters in Emacs files |
| 307 | 315 | ||
| 308 | If you introduce non-ASCII characters into Emacs source files, it is a | 316 | If you introduce non-ASCII characters into Emacs source files, use the |
| 309 | good idea to add a 'coding' cookie to the file to state its encoding. | 317 | UTF-8 encoding unless it cannot do the job for some good reason. |
| 310 | Please use the UTF-8 encoding unless it cannot do the job for some | 318 | Although it is generally a good idea to add 'coding:' cookies to |
| 311 | good reason. As of Emacs 24.4, it is no longer necessary to have | 319 | non-ASCII source files, cookies are not needed in UTF-8-encoded *.el |
| 312 | explicit 'coding' cookies in *.el files if they are encoded in UTF-8, | 320 | files intended for use only with Emacs version 24.5 and later. |
| 313 | but other files need them even if encoded in UTF-8. However, if | ||
| 314 | an *.el file is intended for use with older Emacs versions (e.g. if | ||
| 315 | it's also distributed via ELPA), having an explicit encoding | ||
| 316 | specification is still a good idea. | ||
| 317 | 321 | ||
| 318 | *** Useful files in the admin/ directory | 322 | *** Useful files in the admin/ directory |
| 319 | 323 | ||
| @@ -335,15 +339,15 @@ changed heuristic to deduce that a file was renamed. So if you are | |||
| 335 | planning to make extensive changes to a file after renaming it (or | 339 | planning to make extensive changes to a file after renaming it (or |
| 336 | moving it to another directory), you should: | 340 | moving it to another directory), you should: |
| 337 | 341 | ||
| 338 | - create a feature branch | 342 | - Create a feature branch. |
| 339 | 343 | ||
| 340 | - commit the rename without any changes | 344 | - Commit the rename without any changes. |
| 341 | 345 | ||
| 342 | - make other changes | 346 | - Make other changes. |
| 343 | 347 | ||
| 344 | - merge the feature branch to trunk, _not_ squashing the commits into | 348 | - Merge the feature branch to the master branch, instead of squashing |
| 345 | one. The commit message on this merge should summarize the renames | 349 | the commits into one. The commit message on this merge should |
| 346 | and all the changes. | 350 | summarize the renames and all the changes. |
| 347 | 351 | ||
| 348 | 352 | ||
| 349 | 353 | ||
| @@ -365,4 +369,5 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. | |||
| 365 | Local variables: | 369 | Local variables: |
| 366 | mode: outline | 370 | mode: outline |
| 367 | paragraph-separate: "[ ]*$" | 371 | paragraph-separate: "[ ]*$" |
| 372 | coding: utf-8 | ||
| 368 | end: | 373 | end: |