From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.devel Subject: Re: master 527413f: Go back to not using custom-push-theme when enabling a theme Date: Fri, 6 Nov 2020 12:30:41 -0300 Message-ID: References: <20201106123610.24601.8123@vcs0.savannah.gnu.org> <20201106123612.2172F20B2C@vcs0.savannah.gnu.org> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000f1d26105b371e51d" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34714"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 06 17:53:53 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 1kb4zp-0008wF-9C for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Nov 2020 17:53:53 +0100 Original-Received: from localhost ([::1]:32970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kb4zo-00033O-84 for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Nov 2020 11:53:52 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38944) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kb3hZ-0000Hc-8e for emacs-devel@gnu.org; Fri, 06 Nov 2020 10:30:57 -0500 Original-Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]:40370) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kb3hX-0002NX-BP for emacs-devel@gnu.org; Fri, 06 Nov 2020 10:30:56 -0500 Original-Received: by mail-wm1-x333.google.com with SMTP id k18so1697174wmj.5 for ; Fri, 06 Nov 2020 07:30:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LnFu4PW6X168b1MD2NpuIdEQ/WJJtifMe+GOgTLgLak=; b=hjxFramyyO/DW4WzYDsiyTJqu/bQ7C5mH5ePd6pQlZSFdfp1zW/gkgM2GUCnbOkUCg xtITYMfFNBwtQEhtdyfVhVWFk6wAPpae7OnBLp7znoPXSJPL6KtvAMglqaYF1D8iy76S YE30DYvUqe+JN7rXdlPTW2UUZ/guX17cSgD52B8OkW4COhj8s7zi2k+KZwMEY28J/aYz Uygv7oag4OT/ZIYssgluemAGemfXpNrSvOPh6AAgYpSisuGm2USLU+t7oGy6ti3Vu5JX lArmVapSGT4OoW1TDRtfzvm/fSvKsSZx2cZmAcuoyOL6MVhx6CTgOC3F9GtzyHpNut6W FI+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LnFu4PW6X168b1MD2NpuIdEQ/WJJtifMe+GOgTLgLak=; b=exb7k9tfi0eTF2foAEXwJSMnsB4pDTjeFwjktCFKYToGMftThEvIpSEgPSqj1WIHst k32JxTDy+89BUnbYICTyUkkwTCN9qckyCYjQGPq75biM87Q4E8GqORIroDpl3pZovb7z L+Maj+PrScM8yUsX9Rs15vgMKKWrnp9GmFIb6BkWSuCDT3FEP0beh28w5RX21Up2are+ SiGdF5c9NT823yqHrS1Ab5fDJUmwLQ+lEkjG2X0KVQhN6BWg2IbFGjSaMEBRSL5ivuGE eEL4MKiLyLsZUFV7sfbrcH8kfJ0XcZBpnzJydqzflwg6WAXZ/uvaXdQgouJ5fUab4NHx ttsg== X-Gm-Message-State: AOAM530RbhA2TbMF3e0+wFkBcNC60AUGFv5pVHUU7ORzPJN8Y5DRS+88 c8IQLQdAG4UVMl2oBWz0TJohP7NQ0EFS4B7ZcO0= X-Google-Smtp-Source: ABdhPJxgSSnUJIoafryL6B0OEG8KSgKszoGM2ScP+IPg4qONWWwu4FrsZo30HxLP91+9//Z7tR5Fj2IlTEF94th5okg= X-Received: by 2002:a1c:f311:: with SMTP id q17mr169841wmq.28.1604676654058; Fri, 06 Nov 2020 07:30:54 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=maurooaranda@gmail.com; helo=mail-wm1-x333.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, 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-Mailman-Approved-At: Fri, 06 Nov 2020 11:52:18 -0500 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:258833 Archived-At: --000000000000f1d26105b371e51d Content-Type: text/plain; charset="UTF-8" Stefan Monnier writes: > Hi, could you explain what's the motivation behind this change? > Is it an optimization (i.e. with hopefully no visible effect), or does > it fix an actual problem? If it fixes an actual problem, could you try > and add a corresponding regression test for it? I made a dumb mistake while fixing Bug#34027. When enabling a theme we need to change the theme-value or theme-face property of the symbols the theme customizes, and also save a "changed" value, in case there is any. Since custom-push-theme did that, I thought it was fine to call custom-push-theme here and in disable-theme (I haven't had the time yet to test if something bad happens in disable-theme). As a result, theme settings, saved under the theme-settings property of THEME, got duplicated (you can see the code that adds each setting, at the end of custom-push-theme). So, this change fixes that bug I introduced. Since the test for Bug#34027, custom--test-theme-variables, still pass after the change, I didn't consider adding a test for this. But sure, it should be easy to add one. --000000000000f1d26105b371e51d Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Stefan Monnier <monnier@iro.umontreal.ca> writes:

> Hi, coul= d you explain what's the motivation behind this change?
> Is it a= n optimization (i.e. with hopefully no visible effect), or does
> it = fix an actual problem?=C2=A0 If it fixes an actual problem, could you try> and add a corresponding regression test for it?

I made a dumb= mistake while fixing Bug#34027.=C2=A0 When enabling a theme we
need to = change the theme-value or theme-face property of the symbols
the theme c= ustomizes, and also save a "changed" value, in case there is
a= ny.=C2=A0 Since custom-push-theme did that, I thought it was fine to callcustom-push-theme here and in disable-theme (I haven't had the time y= et
to test if something bad happens in disable-theme).

As a resul= t, theme settings, saved under the theme-settings property of
THEME, got= duplicated (you can see the code that adds each setting, at
the end of = custom-push-theme).=C2=A0 So, this change fixes that bug I
introduced.= =C2=A0 Since the test for Bug#34027, custom--test-theme-variables,
still= pass after the change, I didn't consider adding a test for this.
Bu= t sure, it should be easy to add one.
--000000000000f1d26105b371e51d--