From: storm@cua.dk (Kim F. Storm)
Cc: emacs-devel@gnu.org
Subject: Re: Docstring for define-key
Date: 21 Feb 2003 11:53:41 +0100 [thread overview]
Message-ID: <5xd6lloqfe.fsf@kfs2.cua.dk> (raw)
In-Reply-To: <20030221083232.8366.LEKTU@terra.es>
Juanma Barranquero <lektu@terra.es> writes:
> On Thu, 20 Feb 2003 20:58:19 +0100, kai.grossjohann@uni-duisburg.de (Kai Großjohann) wrote:
>
> > I changed it accordingly.
>
> On the matter of define-key's docstring, the beginning:
>
> "Args KEYMAP, KEY, DEF. Define key sequence KEY, in KEYMAP, as DEF.
> KEYMAP is a keymap.
>
> [...]"
>
> is a bit redundant, isn't? What's wrong with:
>
> "Define key sequence KEY, in keymap KEYMAP, as DEF.
The convention is that the first line of the doc string should mention
the (non-optional) arguments in the actual sequence.
Since define-key args are KEYMAP KEY DEF, it's written like that.
However, if I enter C-h f define-key RET, the output looks like this:
'--------------------
|define-key is a built-in function.
|(define-key KEYMAP KEY DEF)
|
|Args KEYMAP, KEY, DEF. Define key sequence KEY, in KEYMAP, as DEF.
|KEYMAP is a keymap.
|
|KEY is a string or a vector of symbols and characters meaning a
|...
`-------------------
i.e. in that context, the arglist is printed right above the first line,
so it is indeed superfluous -- even if the arguments are mentioned in
the wrong order.
But another wording could be used to fulfill the convention:
Define, in KEYMAP, key sequence KEY as DEF.
--
Kim F. Storm <storm@cua.dk> http://www.cua.dk
next prev parent reply other threads:[~2003-02-21 10:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-19 16:31 Docstring for define-key Kai Großjohann
2003-02-19 22:18 ` Kevin Rodgers
2003-02-20 18:21 ` Richard Stallman
2003-02-20 19:58 ` Kai Großjohann
2003-02-21 7:39 ` Juanma Barranquero
2003-02-21 10:53 ` Kim F. Storm [this message]
2003-02-21 10:34 ` Juanma Barranquero
2003-02-22 17:53 ` Richard Stallman
2003-02-22 20:40 ` Stefan Monnier
2003-02-24 16:37 ` Richard Stallman
2003-02-21 14:36 ` Stefan Monnier
2003-02-21 16:38 ` Kai Großjohann
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=5xd6lloqfe.fsf@kfs2.cua.dk \
--to=storm@cua.dk \
--cc=emacs-devel@gnu.org \
/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.