From: Arthur Miller <arthur.miller@live.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Lispref add-to-list - doc is unnecessary convoluted
Date: Fri, 04 Dec 2020 16:28:29 +0100 [thread overview]
Message-ID: <AM0PR06MB6577A02DF8A6CBD735F3FE8E96F10@AM0PR06MB6577.eurprd06.prod.outlook.com> (raw)
In-Reply-To: <83zh2udle7.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Dec 2020 10:29:36 +0200")
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Arthur Miller <arthur.miller@live.com>
>> Date: Fri, 04 Dec 2020 03:17:19 +0100
>>
>> +This function adds the @var{element} to a list @var{list} if
>
> This will produce "... to a list LIST if ...", which is sub-optimal.
>
> You omitted the part where the current doc string warns against an
> argument that is not a list, and that's losing information.
Yes, it was on purpose, partly because hopefully the argument name LIST is
self-documenting and partly because name of the function says
add-to-list which is self-documenting too. Partly because I also dislike
the wording: "better be a list". Does not sound so proffsy to me; but we
can add description for the argument, and change name to LIST-VAR as
suggested. Maybe the argument should be called LIST-NAME
Another question, why doesn't add-to-list take a list value, why symbol?
Maybe I don't understand lisp enough, but why is this not desirable:
(add-to-list '(1 2 3) '4) or (add-to-list (list 1 2 3) 4)
>> -The argument @var{symbol} is not implicitly quoted; @code{add-to-list}
>> -is an ordinary function, like @code{set} and unlike @code{setq}. Quote
>> -the argument yourself if that is what you want.
>> +The argument @var{list} is not implicitly quoted; @code{add-to-list}
>> +is an ordinary function, like @code{set} and unlike @code{setq}.
>
> Not sure why you want to drop the explicit suggestion to quote the
> list symbol here: it's also losing information.
Mostly because I think it is rather description of implementation and
also because I dislike the wording:
"Quote the argument yourself if that is what you want."
"If that is I want"? :-) If I don't want - is it not needed then? :-)
Is LIST-NAME ok suggestion? And I can put back info about it's value and
quote. Will have to do it tomorrow though.
next prev parent reply other threads:[~2020-12-04 15:28 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-04 2:17 Lispref add-to-list - doc is unnecessary convoluted Arthur Miller
2020-12-04 2:27 ` Christopher Dimech
2020-12-04 2:36 ` Robin Tarsiger
2020-12-04 3:29 ` Arthur Miller
2020-12-04 3:35 ` Arthur Miller
2020-12-04 8:35 ` Lars Ingebrigtsen
2020-12-04 8:29 ` Eli Zaretskii
2020-12-04 15:28 ` Arthur Miller [this message]
2020-12-04 15:56 ` Robin Tarsiger
2020-12-04 16:14 ` Ad-hoc list structure tutorializing (was: Lispref add-to-list - doc is unnecessary convoluted) Robin Tarsiger
2020-12-04 20:24 ` Ad-hoc list structure tutorializing Stefan Monnier
2020-12-04 21:12 ` Christopher Dimech
2020-12-05 7:45 ` Eli Zaretskii
2020-12-06 5:45 ` Richard Stallman
2020-12-06 5:57 ` Robin Tarsiger
2020-12-06 14:01 ` Arthur Miller
2020-12-06 5:39 ` Richard Stallman
2020-12-04 21:40 ` add-to-list vs cl-pushnew Robin Tarsiger
2020-12-04 21:51 ` Robin Tarsiger
2020-12-04 22:47 ` Sv: Ad-hoc list structure tutorializing (was: Lispref add-to-list - doc is unnecessary convoluted) arthur miller
2020-12-04 17:03 ` Lispref add-to-list - doc is unnecessary convoluted Drew Adams
2020-12-04 17:24 ` arthur miller
2020-12-04 18:02 ` Drew Adams
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=AM0PR06MB6577A02DF8A6CBD735F3FE8E96F10@AM0PR06MB6577.eurprd06.prod.outlook.com \
--to=arthur.miller@live.com \
--cc=eliz@gnu.org \
--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.