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

From: Eli Zaretskii <[email-masked]>
Date: Thu, 08 Dec 2022 13:06:44 +0200

> From: Akira Komamura <[email-masked]>
> Date: Thu, 08 Dec 2022 16:50:25 +0900
> 
> After upgrading to Emacs 29, some packages throw byte-compile errors
> due to use of `map' pattern in `pcase':
> 
> > org-bookmark-heading.el:176:6: Error: Unknown map pattern: (map
> > 'filename 'outline-path 'id 'front-context-string 'indirectp)
> 
> The error can be avoided by `require'ing `map' at compile time in the
> library depending on pcase:
> 
> (eval-when-compile
>   ;; Support map pattern in pcase
>   (require 'map))
> 
> However, this was not necessary in the previous versions.

Could you please point out where does pcase.el uses 'map' in its
source?  The error message you quote doesn't reference pcase.el, only
org-bookmark-heading.el, which is not part of Emacs and is not on
ELPA, AFAICT.  So I wonder where's the place in the core Emacs sources
which causes the problem, and I couldn't find it.  I'm probably
missing something.

Thanks.