From: Jeremy Bryant via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 67217@debbugs.gnu.org
Subject: bug#67217: [PATCH] Improve docstring argument conventions
Date: Wed, 15 Nov 2023 23:47:35 +0000 [thread overview]
Message-ID: <874jhmvapa.fsf@jeremybryant.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 563 bytes --]
Tags: patch
Eli, following this convention mentioned in a recent bug,
> The first sentence of a doc string should preferably mention the
> mandatory arguments (TYPE and ARG). If the result is too long to fit
> on a single line, consider saying only the main part there, and then
> describing the details in the following lines.
It doesn't appear to me to be in the manual.
So I'm submitting a patch to amend the manual. This is my first patch to
the manual so let me know if this contribution is in the right section,
or needs changing before installing.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Improve-docstring-argument-conventions.patch --]
[-- Type: text/patch, Size: 1000 bytes --]
From e6aa69b0195e413a6c93edbb931f08db2892dc47 Mon Sep 17 00:00:00 2001
From: Jeremy Bryant <jb@jeremybryant.net>
Date: Wed, 15 Nov 2023 23:44:06 +0000
Subject: [PATCH] Improve docstring argument conventions
* doc/lispref/tips.texi (Documentation Tips):
Improve docstring argument procedence conventions
---
doc/lispref/tips.texi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi
index f760b2554f0..9f1c15525cb 100644
--- a/doc/lispref/tips.texi
+++ b/doc/lispref/tips.texi
@@ -642,7 +642,8 @@ Documentation Tips
in a function call. If the function has many arguments, then it is
not feasible to mention them all in the first line; in that case, the
first line should mention the first few arguments, including the most
-important arguments.
+important arguments. Mandatory arguments should be documented before
+optional arguments.
@item
When a function's documentation string mentions the value of an argument
--
2.40.1
next reply other threads:[~2023-11-15 23:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-15 23:47 Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2023-11-16 6:15 ` bug#67217: [PATCH] Improve docstring argument conventions Eli Zaretskii
2023-11-16 23:55 ` Jeremy Bryant via Bug reports for GNU Emacs, the Swiss army knife of text editors
2023-11-17 7:06 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874jhmvapa.fsf@jeremybryant.net \
--to=bug-gnu-emacs@gnu.org \
--cc=67217@debbugs.gnu.org \
--cc=jb@jeremybryant.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.