Skip to content

Commit 3407bd7

Browse files
committed
Merge pull request #33 from sviridov/docstrings
Do not indent subsequent lines of a documentation string.
2 parents 3abf674 + 5ee1eca commit 3407bd7

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,37 @@ you are helping to continue that tradition!
603603
604604
* Always capitalize "Emacs".
605605
606+
* Do not indent subsequent lines of a documentation string. This looks nice in the source code, but looks bizarre when users view the documentation.
607+
608+
```el
609+
;; good
610+
(defun goto-line (line &optional buffer)
611+
"Go to LINE, counting from line 1 at beginning of buffer.
612+
613+
If called interactively, a numeric prefix argument specifies
614+
LINE; without a numeric prefix argument, read LINE from the
615+
minibuffer..."
616+
...)
617+
618+
;; bad
619+
(defun goto-line (line &optional buffer)
620+
"Go to LINE, counting from line 1 at beginning of buffer.
621+
622+
If called interactively, a numeric prefix argument specifies
623+
LINE; without a numeric prefix argument, read LINE from the
624+
minibuffer..."
625+
...)
626+
627+
;; also bad
628+
(defun goto-line (line &optional buffer)
629+
"Go to LINE, counting from line 1 at beginning of buffer.
630+
631+
If called interactively, a numeric prefix argument specifies
632+
LINE; without a numeric prefix argument, read LINE from the
633+
minibuffer..."
634+
...)
635+
```
636+
606637
* Emacs' built-in utility, Checkdoc, can automatically check
607638
docstrings for adherence to coding conventions with the built-in
608639
Checkdoc utility. Many in the Emacs community use Checkdoc by way of

0 commit comments

Comments
 (0)