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

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

Re: Emacs 30.0 warning from `cl-pushnew' and `memql'


From: tomas
Subject: Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Wed, 28 Dec 2022 07:25:24 +0100

On Tue, Dec 27, 2022 at 12:39:15PM +0100, Emanuel Berg wrote:
> Michael Heerdegen wrote:
> 
> >> After the last powerup I see this, it refers to a use of
> >> `cl-pushnew'.
> >>
> >>   Warning: `memql' called with literal string that may never match
> >>   (arg 1)
> >
> > Yes, these new warnings hint at problematic calls. In case of
> > cl-pushnew you want to specify a :test function to avoid comparing
> > strings with an inappropriate test function like the
> > default memql.
> 
> This does not render the warning
> 
>   (cl-pushnew "/usr/share/emacs/site-lisp/elpa-src/slime-2.26.1"
>               load-path
>               :test #'string=)
> 
> but this is not a model I can endorse, this is why you have that
> level of abstraction to begin with, i.e., not to be bothered all the
> time with implementation details.

I don't understand you. That function is most useful if you can
pass it a custom comparison function. I'd say it's fine as it
is.

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


reply via email to

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