From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: The doc-strings for car and cdr are insulting.
Date: Mon, 25 Oct 2004 15:28:14 -0600 [thread overview]
Message-ID: <2u59fgF26c69qU1@uni-berlin.de> (raw)
In-Reply-To: <mailman.5125.1098725950.2017.bug-gnu-emacs@gnu.org>
Alan Mackenzie wrote:
> Try C-h f car and C-h f cdr. What you get on the screen are
>
> "Return the car of LIST. If arg is nil, return nil.
> Error if arg is not nil and not a cons cell. See also `car-safe'."
>
> and
>
> "Return the cdr of LIST. If arg is nil, return nil.
> Error if arg is not nil and not a cons cell. See also `cdr-safe'."
>
> Now, to my way of thinking, if I type "C-h f car" it's because I want to
> know what the car function does. The existing doc string seems
> implicitly to append "..., and if you're too stupid to know what the car
> of a list means, and you're too lazy to spend hours searching through the
> available documentation, we don't give a damn." It's bad enough getting
> this sort of "help" from proprietary software, but from Emacs ....???
>
> I suggest these doc-strings be amended to:
>
> "Return the first element of LIST. If arg is nil, return nil. ....."
>
> and
>
> "The result of removing the first element from LIST, or nil if arg is
nil.
> Error if arg .....".
cdr does not remove any elements from LIST. CLtL says "the rest of the
list, which is a list with all elements but the first".
Perhaps the doc string should explicitly destructure the LIST argument:
"Error if LIST is neither nil nor a (CAR . CDR) cons cell."
--
Kevin Rodgers
next parent reply other threads:[~2004-10-25 21:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5125.1098725950.2017.bug-gnu-emacs@gnu.org>
2004-10-25 21:28 ` Kevin Rodgers [this message]
[not found] ` <mailman.5162.1098740195.2017.bug-gnu-emacs@gnu.org>
2004-10-26 19:49 ` The doc-strings for car and cdr are insulting Alan Mackenzie
2004-10-25 17:33 Alan Mackenzie
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2u59fgF26c69qU1@uni-berlin.de \
--to=ihs_4664@yahoo.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).