Skip to content

Commit f7b0d2d

Browse files
committed
Merge pull request #22 from mwfogleman/docstrings
Add a Docstrings section.
2 parents 28ae1fc + d40594d commit f7b0d2d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ You can generate a PDF or an HTML copy of this guide using
4242
* [Anonymous (lambda) functions](#anonymous-lambda-functions)
4343
* [Comments](#comments)
4444
* [Comment Annotations](#comment-annotations)
45+
* [Docstrings](#docstrings)
4546
* [Existential](#existential)
4647

4748
## Source Code Layout & Organization
@@ -502,6 +503,26 @@ at all.
502503
* Use other custom annotation keywords if it feels appropriate, but be
503504
sure to document them in your project's `README` or similar.
504505
506+
### Docstrings
507+
508+
Emacs is famous for the breadth, depth, and ubiquity of its
509+
documentation. By taking the time to write docstrings in your package,
510+
you are helping to continue that tradition!
511+
512+
* Begin with a terse, complete sentence. Use imperative language. For
513+
example, prefer "Verify" over "Verifies", and "Check" over "Checks".
514+
515+
* When a function takes arguments, mention what the arguments do,
516+
whether they are required, and so on. Describe the arguments in
517+
UPCASE, and order them as they are used.
518+
519+
* Always capitalize "Emacs".
520+
521+
* Emacs' built-in utility, Checkdoc, can automatically check
522+
docstrings for adherence to coding conventions with the built-in
523+
Checkdoc utility. Many in the Emacs community use Checkdoc by way of
524+
[Flycheck](http://flycheck.readthedocs.org/en/latest/).
525+
505526
## Existential
506527
507528
* Be consistent. In an ideal world, be consistent with these guidelines.

0 commit comments

Comments
 (0)