Subject: bug#14831: cl-member warnings during bootstrap

From: Stefan Monnier <[email-masked]>
Date: Tue, 16 Jul 2013 04:57:42 -0400

>> I'd like to understand exactly where those `cl-member's come from.
>> I suspect the missing part is the (put 'cl-member 'compiler-macro
>> #'cl--compiler-macro-member) which is normally in cl-loaddefs.el.
>> 
>> Those residual cl-member calls may actually be a real problem, so maybe
>> this is not just a minor cosmetic fix.

> Deleting cl-loadefs.el and batch byte-compiling a file with sole contents:

> (defvar foo-bar nil)
> (add-to-list 'foo-bar 1)

> produces byte-code containing cl-member. Makes no sense to me...

Aha!  So it's the compiler-macro of add-to-list which turns an
add-to-list call into a cl-pushnew call, which is then macro-expanded to
something that uses cl-member, which should be turned into a plain
`member' by `cl--compiler-macro-member'.  So it can be fixed by changing
the compiler-macro of add-to-list not to use cl-pushnew.

        Stefan