GNU bug report logs - #69282
30.0.50; warning for obsolete macro in version 30.0.50

Previous Next

Package: emacs;

Reported by: Niels Søndergaard <niels <at> algon.dk>

Date: Tue, 20 Feb 2024 02:12:02 UTC

Severity: normal

Found in version 30.0.50

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Michael Heerdegen <michael_heerdegen <at> web.de>
To: Niels Søndergaard <niels <at> algon.dk>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 69282 <at> debbugs.gnu.org
Subject: bug#69282: 30.0.50; warning for obsolete macro in version 30.0.50
Date: Thu, 22 Feb 2024 22:58:55 +0100
Niels Søndergaard <niels <at> 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.




This bug report was last modified 1 year and 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.