GNU bug report logs - #72200
30.0.50; cl-flet over cl-symbol-macrolet may expand improperly

Previous Next

Package: emacs;

Reported by: akater <nuclearspace <at> gmail.com>

Date: Fri, 19 Jul 2024 19:00:02 UTC

Severity: normal

Found in version 30.0.50

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: akater <nuclearspace <at> gmail.com>
Cc: 72200 <at> debbugs.gnu.org
Subject: bug#72200: 30.0.50; cl-flet over cl-symbol-macrolet may expand improperly
Date: Sun, 21 Jul 2024 18:09:50 -0400
> The issue is with recent Emacs built from vcs.
>
> emacs -Q --batch --eval "(progn (require 'cl-macs) (cl-flet ((f () (print
> \"f is called\"))) (cl-symbol-macrolet ((x (f))) (setf x 'x1))))"
>
> attempts to call (setf funcall) which is not defined.  It should call
> (setf f) instead.

The interaction between `cl-flet` and `cl-symbol-macrolet` is
pretty delicate.

The interaction between `cl-flet` and `(setf f)` is beyond delicate
(AFAIK we've never claimed to support it, tho IIRC there were cases
where it happened to DTRT, a bit like a broken clock).

Combining the two is sure to bring fun for the whole family, yes.  🙁


        Stefan





This bug report was last modified 330 days ago.

Previous Next


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