From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Newsgroups: gmane.emacs.devel Subject: Re: master 297d3d2: * lisp/subr.el (dlet): New macro Date: Wed, 11 Mar 2020 01:10:27 +0100 Message-ID: <874kuvkaz0.fsf@gmail.com> References: <20200310160056.17081.81443@vcs0.savannah.gnu.org> <20200310160058.8122E20B7E@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="4438"; 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: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 11 01:10:47 2020 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 1jBoxT-000130-AP for ged-emacs-devel@m.gmane-mx.org; Wed, 11 Mar 2020 01:10:47 +0100 Original-Received: from localhost ([::1]:42050 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBoxS-0003dH-Cd for ged-emacs-devel@m.gmane-mx.org; Tue, 10 Mar 2020 20:10:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:53311) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jBowu-00032M-7q for emacs-devel@gnu.org; Tue, 10 Mar 2020 20:10:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jBowt-00024w-4G for emacs-devel@gnu.org; Tue, 10 Mar 2020 20:10:12 -0400 Original-Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]:34846) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jBows-00020g-Ts for emacs-devel@gnu.org; Tue, 10 Mar 2020 20:10:11 -0400 Original-Received: by mail-wr1-x433.google.com with SMTP id r7so322995wro.2 for ; Tue, 10 Mar 2020 17:10:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-transfer-encoding; bh=pohULzPwgKm6O3q+oWesV4LDIdEz7tOWlCW5fPUxJm8=; b=n5RLNvTZTCGJtyKReDsdxblJCfXI1lAQrNG3ZD6My9rT3Me2oxejoH4AK0SZZmEXkJ lCEd/DhG9TvKMFm6VD92pG45Uu05ml9tKs3JP14bpdFowVMRrs0NbgKJ14lmNqh4U0fF yUsVXnjwI3AeaU5fpdE8fr4ikJ5K+GajmYG6iOSJWI14yq9g2ZopcNJbWiaU2IBRzpQ5 j0+6b0ANQbbErhKlQTZT/IFFf6z/BjCwiMNW/qlf3n4gIxRil7uNAfABvM+e+os+I0Bj 8XT6ngqXR6zEKEeUIxEIuYUj1Gzd1PhDXOdb3rDFbOLV1cPT/XDqX/QFI0fEzH3jmg8x 8v9Q== 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:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=pohULzPwgKm6O3q+oWesV4LDIdEz7tOWlCW5fPUxJm8=; b=QLhhLILYaf+MrZ1MZDua01yX72xDUIX/Dr3tBM9oh861FtQdEhkcfeJc0ejr/BsnBE MaJk5CclFVIJcgFRFeQJAlcXt06XN6F6JBds+ueVC8bwre6SBahOjyq5R2Deetk2CpbO quMacToDffdiGHhxCPeqqRRhicdBr2ZsIxOrlyC7LT/LGiMlsGzKDLN1sVeNPAQnpdh1 WqiiLwnvfVj4gkKj4vuNjPW60bkj2kLrHchc+OxBLaNFp/Zrv+V6cqgE++3qRsssuRXp gX+ytoNHS/OJ+29xNFuTSesO9B+xwvttfhlwmD1zC5NjM6csU8/GgB7R+4PNOIAV9ow5 yzuQ== X-Gm-Message-State: ANhLgQ0if9UU/xZJHLTo0apnXJHhuHOJClFd/JQKuEZEI7VhUZmQNCcz tGZRBvM/i0Nwj6smTTdG69w= X-Google-Smtp-Source: ADFU+vvkH7g1FN+fxDmlbTyMLPoBTBozrery4z6/Rp+z9O2zi83Z3W7w8LHRwFqjRYCazcHE/pgczA== X-Received: by 2002:a5d:6a4d:: with SMTP id t13mr434581wrw.344.1583885409182; Tue, 10 Mar 2020 17:10:09 -0700 (PDT) Original-Received: from localhost ([185.112.167.59]) by smtp.gmail.com with ESMTPSA id h15sm1761523wrw.97.2020.03.10.17.10.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Mar 2020 17:10:08 -0700 (PDT) In-Reply-To: <20200310160058.8122E20B7E@vcs0.savannah.gnu.org> (Stefan Monnier's message of "Tue, 10 Mar 2020 12:00:57 -0400 (EDT)") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::433 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:245463 Archived-At: > branch: master > commit 297d3d2e0e17185387c47ad5a0ce4dd448ef7a29 > Author: Stefan Monnier > Commit: Stefan Monnier > > * lisp/subr.el (dlet): New macro >=20=20=20=20=20 > * lisp/calendar/calendar.el (calendar-dlet*): Use it. > --- [...] > diff --git a/lisp/subr.el b/lisp/subr.el > index 13515ca..359f51c 100644 > --- a/lisp/subr.el > +++ b/lisp/subr.el > @@ -2972,13 +2987,14 @@ This finishes the change group by reverting all o= f its changes." > ;; the body of `atomic-change-group' all changes can be undone. > (widen) > (let ((old-car (car-safe elt)) > - (old-cdr (cdr-safe elt))) > + (old-cdr (cdr-safe elt)) > + (start-pul pending-undo-list)) > (unwind-protect > (progn > ;; Temporarily truncate the undo log at ELT. > (when (consp elt) > (setcar elt nil) (setcdr elt nil)) > - (unless (eq last-command 'undo) (undo-start)) > + (setq pending-undo-list buffer-undo-list) > ;; Make sure there's no confusion. > (when (and (consp elt) (not (eq elt (last pending-undo-l= ist)))) > (error "Undoing to some unrelated state")) > @@ -2991,7 +3007,13 @@ This finishes the change group by reverting all of= its changes." > ;; Reset the modified cons cell ELT to its original content. > (when (consp elt) > (setcar elt old-car) > - (setcdr elt old-cdr)))))))) > + (setcdr elt old-cdr))) > + ;; Let's not break a sequence of undos just because we > + ;; tried to make a change and then undid it: preserve > + ;; the original `pending-undo-list' if it's still valid. > + (if (eq (undo--last-change-was-undo-p buffer-undo-list) > + start-pul) > + (setq pending-undo-list start-pul))))))) Was including these bug#39680 (27.0.60; electric-pair-mode broken by undo)-related changes in this commit intentional? --=20 =C5=A0t=C4=9Bp=C3=A1n