From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "Basil L. Contovounesios" Newsgroups: gmane.emacs.devel Subject: Re: Problem with cl-letf in winner.el Date: Thu, 06 May 2021 18:36:44 +0100 Message-ID: <87sg2zepcj.fsf@tcd.ie> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35107"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Alan Mackenzie Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu May 06 19:44:13 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lei2m-00091Q-Fh for ged-emacs-devel@m.gmane-mx.org; Thu, 06 May 2021 19:44:12 +0200 Original-Received: from localhost ([::1]:50026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lei2l-0001Tq-Hn for ged-emacs-devel@m.gmane-mx.org; Thu, 06 May 2021 13:44:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39772) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lehvn-0004wo-B0 for emacs-devel@gnu.org; Thu, 06 May 2021 13:36:59 -0400 Original-Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]:44997) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lehvf-0005k4-EM for emacs-devel@gnu.org; Thu, 06 May 2021 13:36:58 -0400 Original-Received: by mail-wr1-x436.google.com with SMTP id l13so6469267wru.11 for ; Thu, 06 May 2021 10:36:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=KjCAkGne1isSS4Ms8qhVwhlbOuwTFLd4Dh5hTPI1gc8=; b=Le8Mo191ot6atVu4tkSm14ZmTYBAeiCKRt+dd2qiRv8zLUL3MXPzcDHHPW+urduLno eR7er0JEsB0WIs3bY+F+3XQhiNXskzSnR9GDk+B/nxTGOR3UHur/I8PqTAsE8l1Z/V+s SqFfQSd2cVVNjOVrjiYRTb7RhnZ0VkjfBGEski4PWhHVeENGb60lYkJX83LBSnVDQ+n7 BMx1JYk3wc6id+82JtT+c51GqiwpYFvwEziSDcfwWD4JImnJAJNMYQNvocBVd/O4EANJ 1I7yvUZlTmk03hGqNhsrPZAawwnhv6ux7XE/ZI7pq1WBrDlAiHYLpjy04q5kyH06vtdk rWEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=KjCAkGne1isSS4Ms8qhVwhlbOuwTFLd4Dh5hTPI1gc8=; b=gKVhhA2dYdVFa9ETqWdSf/e35PMGMYOrKvBPe7ZwoRyRNkzq7ecVJhgd2mMIeSFGcG bzWUyf1P0o6y2NZ0VshleY/cwI7nEc35zSc0nu9X7x7p67PQkkn1iGvLqruqlLE4W93Y BRm09ieZKH1zAb9pxhjRcOkIP62AeZSIiifYdt5boLLwtdUWK+H6Y+fLy6pUC0eHjMxv rTdagGy2agJ7YwkUM+y2r/W9GeaOC0V2RuUj4qzEpuumPDXhONnQul8YtaxICP22UrsT THlYjROH0yZailu2JpOGorHAy/rFaYBwqB7X4+C0c0t/3cztXnvJoXSUU7YreX0R/523 XemA== X-Gm-Message-State: AOAM532vGD5emjcyqkm932J4Cm73FKAUYjg+J3aFvoqF3UPSHhx8DnSn QLoDqnRM6EPJIYGZg+Fp0EdAQQ== X-Google-Smtp-Source: ABdhPJzvAm3nu/5b8f7c7qcU++mq2yEFH6ORcGBEdU05bni0LAQSuv5iMzXhf3yXGIydfnqRDiboZg== X-Received: by 2002:a5d:544d:: with SMTP id w13mr6599570wrv.273.1620322606196; Thu, 06 May 2021 10:36:46 -0700 (PDT) Original-Received: from localhost ([2a02:8084:20e2:c380:d15:339e:aa10:60f1]) by smtp.gmail.com with ESMTPSA id m7sm5458287wrv.35.2021.05.06.10.36.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 10:36:45 -0700 (PDT) In-Reply-To: (Alan Mackenzie's message of "Thu, 6 May 2021 16:42:43 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=contovob@tcd.ie; helo=mail-wr1-x436.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:268984 Archived-At: Alan Mackenzie writes: > 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! Enabling print-gensym and print-circle should make it clearer that the seemingly duplicate vars are actually different uninterned symbols. So my reading of that macro call is that it restores miniwin's buffer and point after changing window configuration. HTH, -- Basil