From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Add new csetq macro Date: Sat, 3 Sep 2022 08:16:50 -0700 Message-ID: References: <20220903140723.809684-1-lucien@phundrak.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38163"; mail-complaints-to="usenet@ciao.gmane.io" To: Lucien Cartier-Tilet , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Sep 03 17:17:50 2022 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 1oUUu6-0009lF-4R for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Sep 2022 17:17:50 +0200 Original-Received: from localhost ([::1]:60938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUUu5-0000vx-7U for ged-emacs-devel@m.gmane-mx.org; Sat, 03 Sep 2022 11:17:49 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42230) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUUtC-00080p-BR for emacs-devel@gnu.org; Sat, 03 Sep 2022 11:16:56 -0400 Original-Received: from mail-oa1-x2f.google.com ([2001:4860:4864:20::2f]:44635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oUUtA-0008OR-Mv for emacs-devel@gnu.org; Sat, 03 Sep 2022 11:16:54 -0400 Original-Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-11eab59db71so11770590fac.11 for ; Sat, 03 Sep 2022 08:16:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:from:to:cc:subject:date; bh=1eFz9PuE5v7Csgw1+8dVLw9Rxnbv849VraKJwPoTJCU=; b=mczdlhseOaEXVBaqSd+5Mo99reXaQzXRllZriOzMv5p8ImE2aftoAwcp5JVKvzxMFq ICqLJ4P12UxnCEIXOzI83RJuuU1L8nAuBVUbnYeeIcs+4XFrshgIUJfygXXbrINoNxMb vp33/Oe9yQgmgPx5Ak+bxKy3Ey+HHdtNDshhnWCXrNZaXSJOqysEOPmZ1bEnyBnOvUju 4qyt4ovwsszpGfczpLolN+NMGmn+UDBSNcPPCld3hjEWct32BEYWbBGOsvJ8OWgcj916 NMLKSFVNDx5PFrAL9BnGDXdqKc2+oL2XBzauUOJY1HpfdF4vA8pMNDmr0afjDoIQlPCF 0hEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:to:subject:message-id:date:mime-version :references:in-reply-to:from:x-gm-message-state:from:to:cc:subject :date; bh=1eFz9PuE5v7Csgw1+8dVLw9Rxnbv849VraKJwPoTJCU=; b=f31ZAy4QGyntBAfd/3TlRviIlgXC7hNVQipVbQhSm0TlY63MHjwtsoF7hHBC7jjIHt b0KQBaAqx+FmyQTWnn+GHjb8oZF/yhAW21Q0U4nf09eiuxh3Pgy6mXW8RDD2gCHg3q3e rRVzywjDTi5njG/LaoUZyvEYEBGRLWRjPY6KvF6AiPE8faPo05Dk9jELLVhCyXGtgd5N f6BlUwmqW6kWqgGJQiWx8SUqc5lXwKPwxaxlNX3Rh71il4gKm5AEiHKG+FkSXj9eXroN z/3oTQOpdSC1r2qRylOcLU4WwSwXO9hqIWFxR0hxwDTou01uQfgi5a2BS56JhOVjWHy9 8Cfg== X-Gm-Message-State: ACgBeo0fg1fYKrcIqBebW4rr79Fo5tU1DfLLSlPuAwr2d8Sx9a/f2gzr RbS5tHfCvq3Ub9/VGXoPligiadn2Z7wMZub0YP0= X-Google-Smtp-Source: AA6agR6OPoshr4DgQp4u2p7UUJDuhTNVOLOSmIsgk1hgqEkbiSzoerxRqFiMpLHfwcWgGcuTLEuPq412V5HrcOG5S0o= X-Received: by 2002:a05:6808:f14:b0:343:5f65:a540 with SMTP id m20-20020a0568080f1400b003435f65a540mr3899158oiw.92.1662218211387; Sat, 03 Sep 2022 08:16:51 -0700 (PDT) Original-Received: from 753933720722 named unknown by gmailapi.google.com with HTTPREST; Sat, 3 Sep 2022 08:16:51 -0700 In-Reply-To: <20220903140723.809684-1-lucien@phundrak.com> X-Hashcash: 1:20:220903:lucien@phundrak.com::c6oFNRdeXgEPseWz:6IBZ Received-SPF: pass client-ip=2001:4860:4864:20::2f; envelope-from=stefankangas@gmail.com; helo=mail-oa1-x2f.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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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:294660 Archived-At: Lucien Cartier-Tilet writes: > The csetq macro is a quality of life macro for Emacs users and wraps > `custom-set-variable' in a `setq'-like macro, hence its name. > > It avoids repetition of `custom-set-variable' when setting the value > of custom variables, while keeping the same syntax as `setq'. I > believe this could also help and encourage people to switch more > easily to the correct way of setting the value of custom variables > instead of using raw `setq's, since `setq' doesn't call the setter of > a custom variable =E2=80=93if it exists=E2=80=93 while `custom-set-variab= le' does. Thanks. How does it compare to the recently added `setopt' macro though? They look rather similar to me. Am I missing something?