From: Alan Mackenzie <acm@muc.de>
To: emacs-devel@gnu.org
Subject: Problem with cl-letf in winner.el
Date: Thu, 6 May 2021 16:42:43 +0000 [thread overview]
Message-ID: <YJQcgxfZ/vHvPunt@ACM> (raw)
Hello, Emacs.
In Emacs master branch:
In connection with bug #48249, I'm looking at winner.el. In function
winner-set-conf, there is the following macro call:
(cl-letf (((window-buffer miniwin))
((window-point miniwin)))
(set-window-configuration winconf))
.. I'm having trouble understanding it. When I expand and pretty print
it, I get this:
(let*
((v miniwin)
(v miniwin)
(old
(window-point v))
(old
(window-buffer v)))
(unwind-protect
(set-window-configuration winconf)
(set-window-point v old)
(let*
((v old))
(progn
(set-window-buffer v v)
v))))
This looks very strange indeed: under the let* there are two variables
called v and two variables called old. This looks like a bug to me, but
alternatively, is there something I'm not understanding here? (Just to
be specific, I expanded the macro with lexical-binding both nil and t,
and got the same results.)
Help, please!
--
Alan Mackenzie (Nuremberg, Germany).
next reply other threads:[~2021-05-06 16:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-06 16:42 Alan Mackenzie [this message]
2021-05-06 17:35 ` Problem with cl-letf in winner.el Stefan Monnier
2021-05-06 17:36 ` Basil L. Contovounesios
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=YJQcgxfZ/vHvPunt@ACM \
--to=acm@muc.de \
--cc=emacs-devel@gnu.org \
/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).