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: Emanuel Berg
Subject: Re: Emacs 30.0 warning from `cl-pushnew' and `memql'
Date: Tue, 27 Dec 2022 12:39:15 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

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.

Might as well to provide :loop #'cl-dolist how to iterate the
list as well ...

And after that ... is there anything else to specify before we can
get rid of `cl-pushnew' altogether since it amounts to doing
everything manually anyway?

-- 
underground experts united
https://dataswamp.org/~incal




reply via email to

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