all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Christopher Dimech <dimech@gmx.com>
To: Arthur Miller <arthur.miller@live.com>
Cc: emacs-devel@gnu.org
Subject: Re: Lispref add-to-list - doc is unnecessary convoluted
Date: Fri, 4 Dec 2020 03:27:07 +0100	[thread overview]
Message-ID: <trinity-5bc488d1-40e1-4813-b7c8-6c8510bf0239-1607048827169@3c-app-mailcom-bs11> (raw)
In-Reply-To: <AM0PR06MB65776A53D55ACF6FC85BC17B96F10@AM0PR06MB6577.eurprd06.prod.outlook.com>

> Sent: Friday, December 04, 2020 at 3:17 AM
> From: "Arthur Miller" <arthur.miller@live.com>
> To: emacs-devel@gnu.org
> Subject: Lispref add-to-list - doc is unnecessary convoluted
>
> Function: add-to-list symbol element &optional append compare-fn
>
>     This function sets the variable symbol by consing element onto the old value, if element is not already a member of that value. It returns the resulting list, whether updated or not. The value of symbol had better be a list already before the call. add-to-list uses compare-fn to compare element against existing list members; if compare-fn is nil, it uses equal.
>
>     Normally, if element is added, it is added to the front of symbol, but if the optional argument append is non-nil, it is added at the end.
>
>     The argument symbol is not implicitly quoted; add-to-list is an ordinary function, like set and unlike setq. Quote the argument yourself if that is what you want.
>
>     Do not use this function when symbol refers to a lexical variable.
>
> I think this doc is unnecessary convoluted and I don't see reason why it
> describes the implementation. That first sentence make something so
> simple as add-to-list sound so complicated for some reason when you read
> it, and requires one to think twice through what it say (at least me).

I concur.

> Other functions does not do so, so why this one? I don't think it is
> necessary since docs anyway says how it add to list (front/back) kist a
> three sentences further.
>
> I think it is more clear to use word 'list' instead of 'symbol' (element
> is a symbol too for example). Not least because docs later says: "better
> be a list". It clarifies intentions, and hopefully removes the need to say
> things like 'better be a list'.

Agree

> I hope I don't hurt anyone's feelings; I dont' know who wrote it, but I
> would like to suggest a slight modification, patch included. I am not
> native english speaker, so if you agree to change it, somebody please
> look through it.

Not hurt.  I shall read it and report back.

Cheers
C*



  reply	other threads:[~2020-12-04  2:27 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 [this message]
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
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=trinity-5bc488d1-40e1-4813-b7c8-6c8510bf0239-1607048827169@3c-app-mailcom-bs11 \
    --to=dimech@gmx.com \
    --cc=arthur.miller@live.com \
    --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.