all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Problem with cl-letf in winner.el
@ 2021-05-06 16:42 Alan Mackenzie
  2021-05-06 17:35 ` Stefan Monnier
  2021-05-06 17:36 ` Basil L. Contovounesios
  0 siblings, 2 replies; 3+ messages in thread
From: Alan Mackenzie @ 2021-05-06 16:42 UTC (permalink / raw)
  To: emacs-devel

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-05-06 17:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-06 16:42 Problem with cl-letf in winner.el Alan Mackenzie
2021-05-06 17:35 ` Stefan Monnier
2021-05-06 17:36 ` Basil L. Contovounesios

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.