Subject: Re: bug#69282: 30.0.50; warning for obsolete macro in version 30.0.50

From: Michael Heerdegen <[email-masked]>
Date: Thu, 22 Feb 2024 22:58:55 +0100

Niels Søndergaard <[email-masked]> writes:

> I am experiencing confusion at a higher level regarding the pcase—flip
> function. This function can be found in the files
> "emacs-lisp/pcase.el" and "emacs-lisp/map.el", however, I am unable to
> grasp its concept consistently.

It had been a macro, not a function.  All it did was transposing the
arguments in function calls (F X Y), e.g.

 (pcase--flip - 3 5) ; ~~> (- 5 3) --> 2

It had been used in "pcase.el" internally as a hack to simplify writing
of pred patterns when the matched value should not be called as last
argument as in the default behavior.

If you now compile code using `pcase--flip' using an Emacs version that
does not have it, the usual thing with unloaded macros happens: the
compiler doesn't know that it's a macro, so it assumes an unknown
function (this emits a compiler warning).  When running the code you get
a run-time error about an unknown function.

Michael.