unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: help-gnu-emacs@gnu.org
Subject: Re: Is there equivalent internal function for this list-has-elements?
Date: Sun, 18 Oct 2020 16:43:11 -0400	[thread overview]
Message-ID: <jwvd01fl12g.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: courier.000000005F8C9961.0000177E@static.rcdrun.com

> Other question is, if there is any function other than pushnew, if I
> do not wish to use the pushnew?

Of course there is.  And if you don't like the name `pushnew`, for
example because it starts with the distateful "p", you can use
`cl-pushnew`, which also has the advantage of not being deprecated.

> I can maybe just make a check if element is in the list and then
> simply push?

You mean, do the same as `pushnew`?  Yes, of course.
You could also define a function or even a macro that does that
for you.  A good name for it could `my-pushnew` ;-)


        Stefan




  reply	other threads:[~2020-10-18 20:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-18 19:37 Is there equivalent internal function for this list-has-elements? Jean Louis
2020-10-18 20:43 ` Stefan Monnier [this message]
2020-10-19  7:15   ` tomas
     [not found]   ` <20201019180655.GL19325@protected.rcdrun.com>
     [not found]     ` <jwvpn5ef5dx.fsf-monnier+emacs@gnu.org>
2020-10-19 20:15       ` Jean Louis
2020-10-18 20:58 ` tomas
2020-10-18 21:21   ` Joost Kremers
2020-10-19  6:57     ` tomas
2020-10-19 18:08     ` Jean Louis
2020-10-19 18:23   ` Jean Louis

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=jwvd01fl12g.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=help-gnu-emacs@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.
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).