GNU bug report logs -
#59900
30.0.50; map pattern in pcase causes a byte-compile error
Previous Next
Full log
Message #20 received at 59900 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
> 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.
Apology for the misleading title.
`pcase.el' itself doesn't depend on `map.el', nor does it contain `map'
pattern
in its source. `pcase.el' itself successfully compiles.
I encountered the error while trying to byte-compile
`org-bookmark-heading.el',
which contains a `map' pattern at the following location:
https://github.com/alphapapa/org-bookmark-heading/blob/f245c9023df28d6ee545dae4b96a1c237e6965ba/org-bookmark-heading.el#L176
The error vanishes if I add `(eval-when-compile (require 'map))' as in the
following PR:
https://github.com/alphapapa/org-bookmark-heading/pull/19/files
I encountered similar errors in other libraries that contain a `map' pattern
inside a `pcase' form. It didn't happen until recently, when I updated
Emacs and
began to get those errors.
> 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.
There are some other additional patterns for `pcase'. One of them is `rx'
pattern. There is an autoload cookie right above the definition of
`(pcase-defmacro rx ...' in `rx.el'. On the other hand, there is no autoload
above `(pcase-defmacro map ...' in `map.el'. I think this might be the
cause.
Is there any reason for not autoloading the `pcase-defmacro` form?
Thanks.
[Message part 2 (text/html, inline)]
This bug report was last modified 2 years and 214 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.