From: Michael Heerdegen via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: "Niels Søndergaard" <niels@algon.dk>
Cc: Eli Zaretskii <eliz@gnu.org>, 69282@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 [thread overview]
Message-ID: <87y1bc9n4w.fsf@web.de> (raw)
In-Reply-To: <1D075E76-9B0C-43AE-8D26-564FB95BA929@algon.dk> ("Niels Søndergaard"'s message of "Thu, 22 Feb 2024 17:10:13 +0100")
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.
prev parent reply other threads:[~2024-02-22 21:58 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-20 1:10 bug#69282: 30.0.50; warning for obsolete macro in version 30.0.50 Niels Søndergaard
2024-02-20 13:40 ` Eli Zaretskii
2024-02-20 17:17 ` Niels Søndergaard
2024-02-20 17:18 ` Eli Zaretskii
[not found] ` <61E8B275-161F-483F-9A01-EF43DFCA3523@algon.dk>
2024-02-20 17:35 ` Eli Zaretskii
2024-02-20 17:55 ` Niels Søndergaard
2024-02-22 8:46 ` Niels Søndergaard
2024-02-22 12:32 ` Eli Zaretskii
2024-02-22 16:10 ` Niels Søndergaard
2024-02-22 17:29 ` Niels Søndergaard
2024-02-22 19:05 ` Eli Zaretskii
2024-02-22 21:58 ` Michael Heerdegen via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1bc9n4w.fsf@web.de \
--to=bug-gnu-emacs@gnu.org \
--cc=69282@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=michael_heerdegen@web.de \
--cc=niels@algon.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).