[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is there equivalent internal function for this list-has-elements?
From: |
Stefan Monnier |
Subject: |
Re: Is there equivalent internal function for this list-has-elements? |
Date: |
Sun, 18 Oct 2020 16:43:11 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> 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