Subject: Re: bug#59900: 30.0.50; map pattern in pcase causes a byte-compile error

From: Michael Heerdegen <[email-masked]>
Date: Fri, 09 Dec 2022 22:02:09 +0100

Eli Zaretskii <[email-masked]> writes:

> > What specific question?

> The one I asked at the very beginning of this discussion:
>
>  https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59900#8

The same compiler error happens in emacs -Q if you compile a pcase
form that uses the map pattern and miss to require the map library,
e.g. compiling

#+begin_src emacs-lisp
(defun test (plist)
  (pcase-let (((map :one (:two two)) plist))
    (list one two)))
#+end_src

gives you

| Error: Unknown map pattern: (map :one (:two two))

but it's expected.

> It sounds like the bug is in the package which uses map.el, and that
> package is not part of Emacs.

Exactly.

But I still want to create a patch to support autoloading of the `map'
pattern in "map.el", this is a good idea.

Michael.