Subject: Re: bug#49866: 28.0.50; gnus-summary-exit from the transient search buffer giving error

From: Eric Abrahamsen <[email-masked]>
Date: Fri, 06 Aug 2021 09:57:53 -0700

Eric Abrahamsen <[email-masked]> writes:

> On 08/06/21 12:25 PM, Basil L. Contovounesios wrote:
>> Lars Ingebrigtsen <[email-masked]> writes:
>>
>>> "Basil L. Contovounesios" <[email-masked]> writes:
>>>
>>>> The problem isn't nil, it's '(1 2 3). 
>>>
>>> The original backtrace was
>>>
>>> Debugger entered--Lisp error: (cl-no-applicable-method map-into nil list)
>>>   signal(cl-no-applicable-method (map-into nil list))
>>> [...]
>>>   map-into(nil list)
>>>   map-merge(list nil nil)
>>
>> This reminds me of https://bugs.gnu.org/46722, although I can't
>> reproduce the error with (map-into () 'list).
>>
>>> though.  So Eric's patch is the right thing for the '(1 2 3) nil case?
>>
>> I don't see how Eric's patch addresses the '(1 2 3) case, since '(1 2 3)
>> is not a valid map that map-merge can usefully operate on.
>
> I've provided unhelpful examples here, because I didn't really know what
> `map-merge' was supposed to do.
>
> Reloading map.el or map.elc is enough to fix the problem here. So that's
> another data point.
>
> I realized that I was lying when I told Andy that EBDB doesn't use
> map.el! In fact it does require it at the top ebdb.el, but then doesn't
> make use of any of the functions. Maybe at some point I thought I'd use
> it for something?

I am further lying! Apparently I was using it, in ebdb-com.el, for alist
mapping in a pcase-lambda. My apologies to Andy for dismissing the
possibility that it was EBDB -- I have no recollection of writing that
code!

ANYWAY the real problem seems to have something to do with the recent
change to the "eql" specializer for method definitions, done in
6535fd1fa9. That patch added quotes to eg the 'list in:

(cl-defmethod map-into (map (_type (eql 'list)))
  "Convert MAP into an alist."
  (map-pairs map))

And removing those quotes removes the error for me. Again, simply
reloading either map.el or map.elc (with quotes still in place) also
removes the error, so there must be something tricky going on in
compilation. I'm cc'ing akater, the author of that patch, in hopes
they'll have some light to shed.

Eric