--- Begin Message ---
Subject: |
30.0.50; map pattern in pcase causes a byte-compile error |
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.
As a similar example, the `rx' pattern for `pcase' is autoloaded (see
`rx.el'), so shouldn't the `map' pattern support be autoloaded as well?
;;;###autoload
(pcase-defmacro rx (&rest regexps)
...
--- End Message ---
--- Begin Message ---
Subject: |
Re: bug#59900: 30.0.50; map pattern in pcase causes a byte-compile error |
Date: |
Sat, 10 Dec 2022 09:53:42 +0200 |
> From: Michael Heerdegen <michael_heerdegen@web.de>
> Cc: akira.komamura@gmail.com, 59900@debbugs.gnu.org
> Date: Sat, 10 Dec 2022 02:01:35 +0100
>
> Michael Heerdegen <michael_heerdegen@web.de> writes:
>
> > But I still want to create a patch to support autoloading of the `map'
> > pattern in "map.el", this is a good idea.
>
> I'm not so sure after thinking more about it: _Nothing_ in "map.el" has
> an autoload cookie. I'm not convinced that out of all things `map'
> pcase patterns should be the only thing that are autoloaded whereby
> everything else in map.el requires an explicit `require'. That would be
> hardly consistent
Thanks. I agree with that conclusion, and so I'm closing this bug
report. The fix should be in the programs that use pcase-map, not in
core.
--- End Message ---