help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Locating file via load-path


From: Eli Zaretskii
Subject: Re: Locating file via load-path
Date: Sat, 10 Aug 2024 08:39:03 +0300

> From: Arash Esbati <arash@gnu.org>
> Cc: help-gnu-emacs@gnu.org
> Date: Fri, 09 Aug 2024 21:52:24 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >   This is handy to add some elements to configuration variables,
> >   but please do not abuse it in Elisp code, where you are usually
> >   better off using ‘push’ or ‘cl-pushnew’.
> >
> > IOW, don't (ab)use add-to-list if all you need is to add a new element
> > to some list of elements.
> 
> Maybe off-topic, but I always missed the APPEND arg provided by
> `add-to-list' in `cl-pushnew'.

If the order matters, then perhaps cl-pushnew is not what you want.
Or maybe you need to sort the list in some way.

The order rarely matters if all you need is to construct a list of
arbitrary elements.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]