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

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

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


From: Michael Heerdegen
Subject: bug#69282: 30.0.50; warning for obsolete macro in version 30.0.50
Date: Thu, 22 Feb 2024 22:58:55 +0100
User-agent: Gnus/5.13 (Gnus v5.13)

Niels Søndergaard <niels@algon.dk> 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.





reply via email to

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