emacs-devel
[Top][All Lists]
Advanced

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

Problem with cl-letf in winner.el


From: Alan Mackenzie
Subject: Problem with cl-letf in winner.el
Date: Thu, 6 May 2021 16:42:43 +0000

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).



reply via email to

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