emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#59900: closed (30.0.50; map pattern in pcase causes a byte-compile e


From: GNU bug Tracking System
Subject: bug#59900: closed (30.0.50; map pattern in pcase causes a byte-compile error)
Date: Sat, 10 Dec 2022 07:54:02 +0000

Your message dated Sat, 10 Dec 2022 09:53:42 +0200
with message-id <83pmcry9rt.fsf@gnu.org>
and subject line Re: bug#59900: 30.0.50; map pattern in pcase causes a 
byte-compile error
has caused the debbugs.gnu.org bug report #59900,
regarding 30.0.50; map pattern in pcase causes a byte-compile error
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
59900: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=59900
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- 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 ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]