From unknown Thu Jun 19 16:24:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 16:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60162 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: 60162@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167129491119600 (code B ref -1); Sat, 17 Dec 2022 16:36:02 +0000 Received: (at submit) by debbugs.gnu.org; 17 Dec 2022 16:35:11 +0000 Received: from localhost ([127.0.0.1]:56795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6a9X-000564-F7 for submit@debbugs.gnu.org; Sat, 17 Dec 2022 11:35:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:59852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6a9V-00055w-Oo for submit@debbugs.gnu.org; Sat, 17 Dec 2022 11:35:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6a9V-0007Ja-JI for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 11:35:09 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6a9T-0001Wt-GW for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 11:35:09 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9A82D240027 for ; Sat, 17 Dec 2022 17:35:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671294905; bh=IZtw7BJD/re1Ambhr3pM1eCbuTM2xLHNCQoW5uWYo7k=; h=From:To:Subject:Date:From; b=AEKx9ScxbSK/U0KaMiydrOs8lokLx8opZMR2n1ephngueCwLPwXcFQusiVAlqC81l bjixvjhB6VgMYZ9S+G9O6wD/sxn2aF8sPbImTS+j2+1Rh/1Fi/XjivIYGrX9oU3wIj CeFhl5hPHFHNbt1JF5LKxnjYh9w3jZrbaM9a/uV8e9DJQS30/tI5nVCEPNSkQsbFBS nS6/1TAydeNt59uEOSnS4BDNEcMx4EWLxBaLq9GzGCklAHAGY5iFk56JVmUQTzUM8w ue2NubTswl+CGU+eZxaEeXpeyEc5KgAHvSoRdh+mwyR46JFTfLU20A1r1Ei9nzflbb 8tyDaw5WyZ4Dg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NZBQd12S4z9rxD for ; Sat, 17 Dec 2022 17:35:04 +0100 (CET) From: Philip Kaludercic Date: Sat, 17 Dec 2022 16:35:08 +0000 Message-ID: <87a63mvvib.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Setopt checks the :type of a user option, and raises an user-error if the value doesn't match the type. This can be annoying during initialisation, because minor mistakes interrupt everything and you are let with a partially loaded configuration. I'd propose replacing the `user-error' with a `warn', that would still indicate mistakes, but continue loading the init.el. In GNU Emacs 29.0.60 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.16.0) of 2022-12-14 built on quetzal Repository revision: 622838b957e240d700585050e9ddbd036e690513 Repository branch: emacs-29 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --with-pgtk --with-imagemagick' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-lisp-cus-edit.el-setopt-set-Warn-instead-of-rasing-a.patch >From ced6b44050b417391e0675acc850d1a0030ef13f Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Dec 2022 17:29:24 +0100 Subject: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error --- lisp/cus-edit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 0e09e99da9..ab2f74dbb8 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1073,7 +1073,7 @@ setopt--set ;; Check that the type is correct. (when-let ((type (get variable 'custom-type))) (unless (widget-apply (widget-convert type) :match value) - (user-error "Value `%S' does not match type %s" value type))) + (warn "Value `%S' does not match type %s" value type))) (put variable 'custom-check-value (list value)) (funcall (or (get variable 'custom-set) #'set-default) variable value)) -- 2.35.1 --=-=-=-- From unknown Thu Jun 19 16:24:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 17:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60162 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic , "60162@debbugs.gnu.org" <60162@debbugs.gnu.org> Received: via spool by 60162-submit@debbugs.gnu.org id=B60162.167129884422221 (code B ref 60162); Sat, 17 Dec 2022 17:41:02 +0000 Received: (at 60162) by debbugs.gnu.org; 17 Dec 2022 17:40:44 +0000 Received: from localhost ([127.0.0.1]:57094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6bAx-0005mL-Nj for submit@debbugs.gnu.org; Sat, 17 Dec 2022 12:40:44 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:14180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6bAv-0005mC-MB for 60162@debbugs.gnu.org; Sat, 17 Dec 2022 12:40:42 -0500 Received: from pps.filterd (m0333520.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BH6vObR028905; Sat, 17 Dec 2022 17:40:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=srQjME2Gw2EMe0bzuY3v44rrG4aSFxMe8a5ziJ/B9Dg=; b=tdpkUB3S6pGsjK1s5HFXUN9wTwzHJop7eVv1P/SZus55psGKlaEOtBKNaJI+IJ5Xkeju DrbxbZ5Ef7/GVQpdySubuqhyY+K48pJGlxD5DHZxBG+Q1e4t2HAcq0u1TPs7e5kfNktU m6rufQ8I7m0XEMjTuTK4j45SwxQd1316mO7atMsaadjzCMfhbzi3dhCnkT934l+ptsLG BUBE4TF9v37iu5+B8/XEm0nOFM++zjh/w7OTdCquEGsygqjmZWU1hXQELPwIhWO15ZGv SXz/jOXbQJfUSTE+hKa+nTvVdRaTYo1PwKyrGQWj1JycQ7c/YPbhvSqZ247B4+grxdMx bA== Received: from iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta01.appoci.oracle.com [130.35.100.223]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3mh6tsrka2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 17 Dec 2022 17:40:40 +0000 Received: from pps.filterd (iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2BHFUKf5024752; Sat, 17 Dec 2022 17:40:40 GMT Received: from nam12-dm6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2171.outbound.protection.outlook.com [104.47.59.171]) by iadpaimrmta01.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3mh47831hd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 17 Dec 2022 17:40:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Pk9Ux1iyqNjicHjQWVx1qrbxYh7GWau+ZJib4dCFMU/ZmJDVx/CSUkZ2sp8PiItad2wBH+JgVhLaC5ucsYtRhrc/0pu2Uzd8ZsY0dInj/lDCQTV+C2XcFNBQwYZ84quoaDFu69+T2U3HE7iz3Xq0jG2lEYUm59ET77Xg0QIBhkL2TUHCMBmWatiPKZ3613/7NQkS05Ntmba5RwTA0NK7Mu9P/wBNyEhcmHGNfmPqxlvJT4A7jcC/JT8iqXFrLRhNy9KjDcF51u/jpsDXtVSzL7QS1aRjMe9Iu9P8LeuF2XXDAimAfjiZrJT4OVhFYVkTwWD9lqMmx+Ja82qS1nkHcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=srQjME2Gw2EMe0bzuY3v44rrG4aSFxMe8a5ziJ/B9Dg=; b=dDamdh/9J252Nx9SGZOraOA+MYzYL2aPVhBqVdBEZsf8VosDyd9jWITsxi583hdCYIHDZBc/RuiJPDOCJ9luH2KNrCVtch2Li2kwv5h1vWM8DMh8MpmvrL+/p/xAxpdbQCcvWIrUKx0fIUeP3wLEAwOgAlTsnK2Rl8ySx61NVmtI8F64qZoJ/YqaB1AXFrxLrxCGDUVJssigUzf9kkh1CLdKTuNrhusnFRa6eh0Y7Pw40+yawjC8I4NmSUUr270Wkb9gijWNGh3U97ugnv+9pejX4sDsO77LN4SmOdFZjDqVJgVwvJIv+PdMx1mwslp99CFGpttOCOIqkE6mcN7bGA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=srQjME2Gw2EMe0bzuY3v44rrG4aSFxMe8a5ziJ/B9Dg=; b=Pi9/94m9Eyfc1O4+8H+X+HqaemHSmX2EkZLm3UPtUkINZJmBax9myvX5W2ujrfEswE8vpM4+6SgB1e0bhhKQ8uT//wlqDEW1NSAAFKYrgV9u4wkWmoGhHq7hnCvP54yEDFqIMXJV6RySFkKzCTl+7G/812HwsW61045ezSLQU80= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by MN2PR10MB4285.namprd10.prod.outlook.com (2603:10b6:208:198::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5924.16; Sat, 17 Dec 2022 17:40:38 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::176d:3689:aa5b:91b]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::176d:3689:aa5b:91b%2]) with mapi id 15.20.5924.012; Sat, 17 Dec 2022 17:40:37 +0000 From: Drew Adams Thread-Topic: [External] : bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Thread-Index: AQHZEjW0r57i4h26eEm6Ln3RkkJi5a5yVJYA Date: Sat, 17 Dec 2022 17:40:37 +0000 Message-ID: References: <87a63mvvib.fsf@posteo.net> In-Reply-To: <87a63mvvib.fsf@posteo.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|MN2PR10MB4285:EE_ x-ms-office365-filtering-correlation-id: d32a0596-54f6-4fbb-fdf0-08dae055cf2e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8NR8O2iC3K1C9uGztvwtjdXgdHIOgQXigsv/VXsYQNFjDHyvRqFk86Ll0f5GbK8cX9G/7iN6hdNAZiVlLsrHZHp6OJrCsz2wLRHhZeTir5jZwuO5PXKaXrNw7MZhd8+dLsPybDMT+ayDLwD+qRW5g/XABTArHhpc4ZR1AlWoSZrI+fRHxCC8iZXzYdXuDUOqpSnTAws7FQL7nvSUBSDjbjcu4wJ8LOBL8DXvs8EDwEFEsagnzC9NQCZ1GqkB3+m5LgTQrl+Zl9bT6TG4h5f6MFBcf/SwcgJE9yIVDkrKSzcuuPZptY0L1mniVvJ9/BUsKU+7AM9fkoNaQIyBT9EWap1SrCjRFTHdB38hqWWLU2yoIQ4BuS8tGs3g6DYTjA+cNbAQF4iy1QrZuPiXiA7+xGAF8fzc2uNgqXLNOYo2RthiD0WYG8NurRvx5EGY6jEk7Yt0ul9dazLY3FuAuWEQBhbxjynypvpOlfdHNvLdgmvtRncWFepyE/v4Hc3d9n9q35LME1KO2nSU7p/BCOcArR7YTLhchtylGAPNZo+XU4efwuDMYnsWyUel4OGNuNfXvJS1j9CIvgXutUNRbyzzE8drX0t9yvkqwmWxU22uIFu1d8AlOWbjW37Mj/njfBRYzxFiTfdD0SYg2qP4QIqYZFFB0ryQIAFbsMYWgMQ0DtGR8BrGaEndvyQj6MpdBl3NKaUxKXrWp/3vRj2FpM4nmg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(136003)(346002)(376002)(366004)(39860400002)(451199015)(52536014)(8936002)(5660300002)(44832011)(66446008)(66476007)(66556008)(6506007)(7696005)(8676002)(33656002)(64756008)(41300700001)(66946007)(76116006)(9686003)(2906002)(86362001)(55016003)(38100700002)(38070700005)(186003)(26005)(122000001)(110136005)(478600001)(71200400001)(316002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: /mtu4vQ5TonqC+g9b38002XMq0xef7efrQhRFufLG5VA/uwtDZ8Q0n0KlZHde/6Ld15uJVJCJbl1LEa+mDXDSUP31W8Pn9UHs+gmu1hg/UYd6SLLV5i2eqMPJkrOH9pTZujkEN9tNilpcJ+6oaqRarXxqbgGcXu0hWaxaqMmiCn3em0hpN0fIQhX1k+VHSGOnERaY6Vl1OKmENPCzZy4JAdwLEj8AmjQaTzPHCr+Mg6kQa3HHHyM7DmGraCHtXRn0uLZn5To8zMniLkf3PFcFDUnaQiGlU2EXhf1NUcp8H7w1wLKJL8aJ8z0d8arZTMOIANRx4p+9G/Ti0ovUFMwXmGBIDcX7k4w/8gzQuict4QSfowIUbMLZIrR9dLOs/axthAI43WYF1xBABIWBoSM1d7YLhB6+ujlWvVVkVng/qvTmoHEpHsLkgSGYDfeCEOOW4KWogrrzawGOQpTy1KR8knllPS0EWJqOEfI+mrJBlBifIEH7EQr1s2QQ91MPJnxp3Vb1ex9LUVxqhLNfEE64LOkuWNUbdV4EZejtJkTwF6qKxU90ApkLeo/iB5hYtLMuZLfKacWhQfuHr4wywgyNAiMXAIyVEXCJpRW5YUeXIfRMBrhbRpxgzI0pfT9iO8AKQywYG/uroK+h/2pRwae81Vz95I16SqNu6zA56kHkU39wruHjwBdLYYuRX9vAtU6rxPR9KYahrNzZwfI2Qza20HA7pSUcrU+YxgI5Rh+HOJyOCM5+XB7HNgkbl9sYWH7s6cT6d9hV65Poc01In8h2i/ciqrJT1UxUTSs9hlfs//P1he6K2PLzp4w2tn2AvLGMNeM1s6SN4/r/dKUi6qHHKW+C1OTScbHe/gkXbXPIunj5ADvbkG3eBhh45YdOhJYyfCBl5ffqIBUDSQcKDkoSt8VwpNJltKwiUTuob5Aqq4wetq4funU956lxk6Z56KQvqH5I+BQPLA7YEb3zmEqg0EVwq0x/1jTN66zwffvV7bZPNDMNMYknDsu+oQCsikcnlec852bvrShajHFGGg7jgHkJzpdI/yMo41BtvU3Gkp5aPTZ/7LSHkF2ynBS45oShf4ib7HBOaD9FLNnc+ZLzj806t46mMMxqWiQQ/fr/5Gt4QUENiccyJFbttoThpVgrwLzoThjTzuZ8kesb0GBigyNNlOdiMiHn3YFrcPd/8fn8/3TcYOtlH9AZ4gXLI5j7bs2NcKlBwmue0Ws7qhTTerSatb1O9wqFRRWP2fYvf7zJfqMblakxwcf/RChzj6yHj+3eE16ep+z2nVfuIlI+/gxzSk9230Wh8Th4oq0XM1isxvbdE15uRLAfS246v02O6sIuqlwhEA0lDAkdKzY1fatCIIST5RYVzAYAJzN8OJybVMHDDUath62muMhegrFTWq7sGYrb41FsLZD3C0qBaOXlUirwcDLRcgSj4QTtrmsd6KNE2J0O25BHSUwNPjywVoshbuDPNkhKhM94rUlgYL/jPRWCPKlIVgbJ9ZTrRCX5Z3TRUPDqj8urnnpH3WW8QwT6jBebfS/R7W2IVe4hfxpGKzqsPL1Cf6oM+20Kx0SvtXXPfvkM0QIQke1wiMx Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: d32a0596-54f6-4fbb-fdf0-08dae055cf2e X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2022 17:40:37.8683 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: LKK1zgNLoPu9XlOtIOtAjc/+syWmTZ0yvqW7epwf+rVFHoBmCDbrGTjNfsQVzRxw0jFqb1K7bm7jw+PxGhHmrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR10MB4285 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-17_09,2022-12-15_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 mlxlogscore=999 phishscore=0 bulkscore=0 malwarescore=0 spamscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212170162 X-Proofpoint-ORIG-GUID: SWcgmIp6oJUd3cyVhVrfy5ZDkuKK6gLE X-Proofpoint-GUID: SWcgmIp6oJUd3cyVhVrfy5ZDkuKK6gLE X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > Setopt checks the :type of a user option, and raises an user-error if > the value doesn't match the type. This can be annoying during > initialisation, because minor mistakes interrupt everything and you are > let with a partially loaded configuration. >=20 > I'd propose replacing the `user-error' with a `warn', that would still > indicate mistakes, but continue loading the init.el. I don't have Emacs 29, so I don't know what `setopt' is/does. But if it does more or less what `customize-set-variable` does then: Can `setopt' be used interactively? `customize-set-variable' raises an error when used interactively, if the type doesn't match. It does that in the `interactive' form, with `custom-prompt-variable'. But `customize-set-variable' _doesn't_ raise an error when called from Lisp with a type mismatch (the type check is done only in `interactive'). Since you mention "initialisation" I guess this is about calls from Lisp. ___ [If `setopt' does what `customize-set-variable' does, why was it added? If not, what's its particular use case? Just curious; I can always wait to find out what Emacs 29 presents...] From unknown Thu Jun 19 16:24:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 18:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60162 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Drew Adams Cc: "60162@debbugs.gnu.org" <60162@debbugs.gnu.org> Received: via spool by 60162-submit@debbugs.gnu.org id=B60162.167130005032130 (code B ref 60162); Sat, 17 Dec 2022 18:01:02 +0000 Received: (at 60162) by debbugs.gnu.org; 17 Dec 2022 18:00:50 +0000 Received: from localhost ([127.0.0.1]:57206 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6bUP-0008MA-Q7 for submit@debbugs.gnu.org; Sat, 17 Dec 2022 13:00:50 -0500 Received: from mout02.posteo.de ([185.67.36.66]:41363) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6bUN-0008Ly-Cn for 60162@debbugs.gnu.org; Sat, 17 Dec 2022 13:00:48 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 3D999240103 for <60162@debbugs.gnu.org>; Sat, 17 Dec 2022 19:00:40 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671300041; bh=5kceszv/5sDLQC1lpAvKURJ7uYc3IPyR0Gueuih7mJI=; h=From:To:Cc:Subject:Date:From; b=gNtJbtP83D9B9IXNuZdllbS2lalmHJhgGO07B/Enhj4Zd3qIpPFBdSDj0nHzMEh5G 8IxSFg0Lvdrw6aIBKtjmJvJCkfcFUE+6434J8DTYOzutG6Yh8C2W6myLbxvBCqE/vz 832FrJidQNb4HjoHKyiw2yqhvk5TqOrrOnsVzQeRXjFIScI8RjgH5NEYI6sOabTBxg w7w3jxjsqCZwkgmO2cfOMU9g52OPkTOpXLyRIIGw//bzvJtSKNTUXuFCRHe3urh30+ Hs0ALwBtT0gbHGoPu2GJJWZ2VQnN1rDY7xWxtQPphJJYwVSBX2zzzet+HIQGwlBRR/ Aiee7rHitUt7A== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NZDKM5J98z6tn5; Sat, 17 Dec 2022 19:00:39 +0100 (CET) From: Philip Kaludercic In-Reply-To: (Drew Adams's message of "Sat, 17 Dec 2022 17:40:37 +0000") References: <87a63mvvib.fsf@posteo.net> Date: Sat, 17 Dec 2022 18:00:43 +0000 Message-ID: <87y1r56hbo.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Drew Adams writes: >> Setopt checks the :type of a user option, and raises an user-error if >> the value doesn't match the type. This can be annoying during >> initialisation, because minor mistakes interrupt everything and you are >> let with a partially loaded configuration. >> >> I'd propose replacing the `user-error' with a `warn', that would still >> indicate mistakes, but continue loading the init.el. > > I don't have Emacs 29, so I don't know what > `setopt' is/does. But if it does more or less > what `customize-set-variable` does then: It is a macro that allows customising user options like setq +++ ** New macro 'setopt'. This is like 'setq', but is meant to be used for user options instead of plain variables, and uses 'custom-set'/'set-default' to set them. > Can `setopt' be used interactively? No, for it is a macro. > `customize-set-variable' raises an error when > used interactively, if the type doesn't match. > It does that in the `interactive' form, with > `custom-prompt-variable'. > > But `customize-set-variable' _doesn't_ raise > an error when called from Lisp with a type > mismatch (the type check is done only in > `interactive'). Yes, take a look at the changed definitions: --8<---------------cut here---------------start------------->8--- ;;;###autoload (defmacro setopt (&rest pairs) "Set VARIABLE/VALUE pairs, and return the final VALUE. This is like `setq', but is meant for user options instead of plain variables. This means that `setopt' will execute any `custom-set' form associated with VARIABLE. \(fn [VARIABLE VALUE]...)" (declare (debug setq)) (unless (zerop (mod (length pairs) 2)) (error "PAIRS must have an even number of variable/value members")) (let ((expr nil)) (while pairs (unless (symbolp (car pairs)) (error "Attempting to set a non-symbol: %s" (car pairs))) (push `(setopt--set ',(car pairs) ,(cadr pairs)) expr) (setq pairs (cddr pairs))) (macroexp-progn (nreverse expr)))) ;;;###autoload (defun setopt--set (variable value) (custom-load-symbol variable) ;; Check that the type is correct. (when-let ((type (get variable 'custom-type))) (unless (widget-apply (widget-convert type) :match value) (warn "Value `%S' does not match type %s" value type))) (put variable 'custom-check-value (list value)) (funcall (or (get variable 'custom-set) #'set-default) variable value)) --8<---------------cut here---------------end--------------->8--- You see that `customize-set-variable' isn't used at all, to prevent modifying the user theme. The error/warning is raised by `setopt--set'. > Since you mention "initialisation" I guess > this is about calls from Lisp. > ___ > > [If `setopt' does what `customize-set-variable' > does, why was it added? If not, what's its > particular use case? Just curious; I can always > wait to find out what Emacs 29 presents...] As mentioned above, it allows user options to be set like variables using setq. That means no quoting of user option names and multiple options can be set in a single call. From unknown Thu Jun 19 16:24:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 20:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60162 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: "60162@debbugs.gnu.org" <60162@debbugs.gnu.org> Received: via spool by 60162-submit@debbugs.gnu.org id=B60162.16713104326125 (code B ref 60162); Sat, 17 Dec 2022 20:54:01 +0000 Received: (at 60162) by debbugs.gnu.org; 17 Dec 2022 20:53:52 +0000 Received: from localhost ([127.0.0.1]:57927 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6eBs-0001aj-Ab for submit@debbugs.gnu.org; Sat, 17 Dec 2022 15:53:52 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:51596) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6eBo-0001ab-SM for 60162@debbugs.gnu.org; Sat, 17 Dec 2022 15:53:50 -0500 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2BHKpviC028309; Sat, 17 Dec 2022 20:53:48 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-transfer-encoding : mime-version; s=corp-2022-7-12; bh=IIyOXjo6l8CWYaZBO6djrriFiawRnkAe5dUkCNR+ELQ=; b=LVSMuKsVbr8qeZx/GbKh8eA2uD7GoXEFLj7/ivlnsq8jNHvf7QHCUmQyXJqbIuFF4mXd +Z44Zeh28vOa8soUWMhWp4tjb5HyOK4m6nIOy1Isu7nSwUVew9dtoCvFAZqC6j5iPGtG ymKVRyxVv8J/CWgnVr2I/Px0KG0tWueqOXddbdbqaLCTxBdoJ14vu9Zvk+78Q/iuh/c2 rY5kWBThQhTmQMm5ZkMOKPcHJ2/cH5tYTAgiELYq3yfqq8sr/8Yh8xIbvksymZpq+oNe 0ByRZBo4A9sZ19PXXHuw2kzOP7ou/7oOaZ5miwG84+cabXOQDJRoxoiVZEhU6tFBxsSH Zw== Received: from phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta02.appoci.oracle.com [147.154.114.232]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3mh6tm0pm6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 17 Dec 2022 20:53:48 +0000 Received: from pps.filterd (phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.5/8.17.1.5) with ESMTP id 2BHFhEAx012687; Sat, 17 Dec 2022 20:53:47 GMT Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10lp2101.outbound.protection.outlook.com [104.47.70.101]) by phxpaimrmta02.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3mh471wsf0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sat, 17 Dec 2022 20:53:47 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gydGZPtpuiX0Ww4Mpl++n20yNfQUvXlFUK05qRuaZ3egauXnp84zRGnQC3OcdSXrC3IJ29IGAlZM2C8IkPyD/ngQkuL0vWPrtWwNqdMVyrudkh0G4c6bVQ+GFIX+Aba4ixmQadJ6rHh6GyyABmFPFa+ojibLT7i1ocQVsW6ALorNYogTlQZM18Cw7VvtHsGsPv6wQaO7tpRUTZgWrmgyxl+nFMTkI0yMVqcPbqLW6Wi6dbely4VKs5If0KpvAEXr1ndOY/8HOSwhrWm8/W8JYmE2uyjufb8MfFCSXqkMYj6H58M8T0waZakqnnr9G8J0PVySxhluqoJjV/8CnxP2SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=IIyOXjo6l8CWYaZBO6djrriFiawRnkAe5dUkCNR+ELQ=; b=aFpxUyjMKWJdY3wCutG92kumJs1AfxS+HQx/x0K4sbLaLPD53NazbhPNLW+1DC/ZioZSO9Kf+bmstPIPcR8Mi3LdqhvmkoEFu7eOwfQZMOaDR5tqFhxDukdZO+S7Hn5cyIkRUaX6Lzgz+aEbrTZmwv+sELdut4A0NPRHf0SZeW9O+TmKzCaZ72NLa89YDmmxnCD5VqtpiJzHwK53MRxzuWbYnkz6Wcz/Stw11dmaw+JeYWrpoxlGlcNyxmq7srKimQ30AnyP9qoBVDuDkiH2HsatFX6kzymsiicBkZRk8OZUJXB6WW5nrJPud9COg+cqOQqtbHHd+Vco3LT8HdxcgA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=IIyOXjo6l8CWYaZBO6djrriFiawRnkAe5dUkCNR+ELQ=; b=u7nSI5dNPtiZ8cq1sPBv5ck3f9Srh9fPL6cnlXJlzzWAqno/mzigDghfEugSBKc3JQAzWS45+gnyUQF0Wmaas1hUETVBnwWMUxM4ccgFQXjWDfgU9w7L1HxC6jz1qAp/SVbOmUa1AqqvqVi+0S3VVd+UW7Safw8DF/MzKS7XV+0= Received: from SJ0PR10MB5488.namprd10.prod.outlook.com (2603:10b6:a03:37e::19) by BL3PR10MB6115.namprd10.prod.outlook.com (2603:10b6:208:3ba::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.19; Sat, 17 Dec 2022 20:53:43 +0000 Received: from SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::176d:3689:aa5b:91b]) by SJ0PR10MB5488.namprd10.prod.outlook.com ([fe80::176d:3689:aa5b:91b%2]) with mapi id 15.20.5924.016; Sat, 17 Dec 2022 20:53:43 +0000 From: Drew Adams Thread-Topic: [External] : bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Thread-Index: AQHZEkJ1PQyuE+Z+30i0KaBee4u6i65yfaTg Date: Sat, 17 Dec 2022 20:53:43 +0000 Message-ID: References: <87a63mvvib.fsf@posteo.net> <87y1r56hbo.fsf@posteo.net> In-Reply-To: <87y1r56hbo.fsf@posteo.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: SJ0PR10MB5488:EE_|BL3PR10MB6115:EE_ x-ms-office365-filtering-correlation-id: a213df2d-d007-4507-5696-08dae070c8b1 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0wB0No0qpZJJe76Th8dQhI5vZMkfVhjQDT3/MftZRIYxIVfcXjlYZrh/baehteS3ngrpVhkzaz0cM6FgbRcRxBLWeep57hZmofd8b7C+A1JV/bHkCc99jpVWEOpC0a+p7sH8fZvThx/kafncfN51peNTtEG6gFVOFyqT3DgJ8mofqrO4FExuHEntY2I1dyepsJVENnTy6yeVlRfIceMH/1P+9t1G66oH2BxVomN8fXrWm84WH2vH0g0LMRwZXHiUyV5ZtQT3ZBJYSmM/xwSvVFgRSsaTlHIJU/Msw0C2mxX9tUsHE7aHWn8uiF5D5UNIoqY4afWTlkzQW9XMNBtml6wYMWIQ8KcfmZ8zFzjPaYTfOF0pNQfMQ+j0mBfdjZwxh1GGJCY03E8rqyz/VJIM4xvv429Vmlgs+wB3WGh0j6Nz+U03vRFxDOUHkmgGDeixuv+ykkAojCyhEAtc7I6oEmPKRHdVF48S2TutQ13WwYa6g8od2Gw3vucCjt8v3fkh7lZpsBLZ0NBsWLan2kYQwYngYTE2i/syrYBSO1JPSi35vUF92j3pdksfM56FYjNy59xv651K7ifcpw+AWEzXrckkfuqN7FwyG/OlZRYrd+v1DHcVodrtZYObfsK5UxtNcpc0hbslQWdiypIE6oloIbdwUZ2nk6043WCraoNS7q0DZMV3v0DxFgkDz43GNkp8WE7nG5Qo0tWaythVgo5v/g== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR10MB5488.namprd10.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(366004)(136003)(346002)(376002)(396003)(451199015)(38100700002)(55016003)(2906002)(122000001)(44832011)(38070700005)(26005)(7696005)(478600001)(8676002)(76116006)(52536014)(71200400001)(66476007)(66446008)(64756008)(66556008)(4326008)(5660300002)(186003)(66946007)(6506007)(8936002)(41300700001)(86362001)(9686003)(316002)(83380400001)(33656002)(6916009); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: AGiEwRzyv5JxJi9Mm7tZMSe1Mzk+/skd38ET4ewzhgvuCZlRPPK0oSM0HDLMPOyUKal42PofcFvswPZL6qsRkhjizohRm9TE7VfZEXBDzOsahG1CJpqxuk2XMmoE8o2phRW61Kulf0IeezJ/DdO7Hp4ygAO8oco+wMGT1hwg6cckcUasmoc+ic6bXkh75Sf8m3xd+G/eWKI9v6g7OdZaEQ+LXr2jPDJZCUjf6PaooNNLAF+eAZLcb+HKuPWAy+vw94z5d372oGClNfHBdfmjog9c8/284T5QQbdboHOGNgcgiJlPLl3f+HNXCfOxPgsFqOfm07x2VGwnIBt3hQIhHf43mdWevJR/hRi+kUjvkooXkTKhPTuYMQ3OrrqNIlvGIdWmhZw0o46Iu63YZ7355HG6QsDWgqeuCl5au8Rbr5xRxvRbe9z6fdkJQW9JV8d6Cmfqa6i5jeAbOiH6Z9+UQR5KjI82DTa3rvjexGtzSOxSFJEfIkGZgvn1j/Qb6Oiw2rBD9Spu+nOE3vvjd+uS71GITS0lymb7f7mN0gfRDXNeVzxF5+rM3MCoB7w2UiazUifR+cLhvIXA2rbD32HBMceiU0lKyybT0A9ooTQTySwxHYJbXAE8UZSq2Xa8lCPmKA0WbfsS4k/Matv+of+9s/8oX8LLpXQkhlguaxY52trm2ja3pQchnFj2v134J0s7ZHcVjeRpUQKAv4/YhGsLfkAm5GqqAzQGjCiQ1ps3UVObh+skFL8qdme8r4ZeYBvzR/eXUTxIl7+DoEgrQwh/a4Es6C9LaB2Vos8FFaUPE1Rqmk8S/PdjgAbBpXND1vAlzePytWkP4cApsJ7jFQc+JZ2faLb3Py3A9RSE8uJA5tdDdNyaQ1Zl8e9tPk8LZ8tT84XIalA7YL4PV4iYkOPsHkugwiMZQ0+ClbzKUcVK1WX2nvyNPHmBHddlsXoBR4FdB7gfrSrRp0TIj/GSZlxSQhK0VB8KPPdmcLnhjgt1OkoObn+IQIotEoKW9xLKvdxl4y4iSRe2ynqhXaF7OWHsFdywYvrMyWBcp8HuwlC8yaM8NSasjGaXWLI0xd69n8APebvBVw1FiH/IYb4Uh5hHd0gncBQs1lEqTlmVJu/U+kPvQdZgBVDxHPZq6dp47WTpZ79gNPYLtmYXd2O2EEuAjudFcimWw5DgMBtB/KZocNfHG+v3KiplsfAB5Zq/khvywKhjKjK1ZLSGkn6ctogfwzRnj2Gk1BadhBmjq6hVApy/gSyuhfF3EoRdneHxoKUkhePiDGxuaoimR2WtJqD6z6a1B+ry0NVrugWKSFHTtr75ZnrPg9MTfTeCzRs8/yKeTo/VYXK6XvW3/go3oibry4FdJccZn0TOCnr07ZY+IhC5V5lymfPjQGNbGray36hoHBBpLCPZr5VuZeEXVyyIVXEcgpcOD/EhVi1D1FZ34J945r/d5KdDVUVJplui4/Orpzh0A/Uj+RIcjpyvyuFzWY+iHRBzNLfGM960AsU5suETbjwVuafGa3FYqrjbhjTYPyEPoihi9Yz36m4EFYl5JR2moHrSXY9Gw98oheKXpJHtaQOis/tFdFV3mpYDrBAD Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR10MB5488.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a213df2d-d007-4507-5696-08dae070c8b1 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Dec 2022 20:53:43.4214 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: YqHpLIXhc9nWikTuqcQtoKgwm/v+f5oDlpy2+nMHdzHrobagnq5KADhFpk9jdBQRIvAxujYFO7LYbkVDCXXTaA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR10MB6115 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.923,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-12-17_09,2022-12-15_02,2022-06-22_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 phishscore=0 suspectscore=0 adultscore=0 malwarescore=0 spamscore=0 mlxlogscore=999 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2212170195 X-Proofpoint-GUID: 0aPM56YwhI3GhUuOZOz8nkVv6eQmhNy2 X-Proofpoint-ORIG-GUID: 0aPM56YwhI3GhUuOZOz8nkVv6eQmhNy2 X-Spam-Score: -0.7 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > `customize-set-variable' isn't used at all, > to prevent modifying the user theme. =20 1. Why? Why should the two differ wrt whether theme `user' gets modified? Why does updating that theme make sense in the one case but not in the other? 2. And now that this is brought to my attention, I really wonder why `customize-set-variable' pushes the new setting to the `user' theme. AFAIK, there's nothing at all that requires, or that should assume, that that function is called by the current user, or that even if it is, that that user wants theme `user' updated that way. This is apparently the case at least since Emacs 22. Emacs 20 had no custom themes, and I don't have the source for Emacs 21. But a guess is that whoever (Chong Yidong?) added custom themes to Emacs decided to add this to `customize-set-variable'. 3. Why is modifying theme `user' a good idea for any function that changes an option value? Especially, why should that be hardcoded (i.e., not an optional parameter)? I see that we modify themes when a _face_ is changed with `face-spec-set' (via `face-spec-recalc'). But I don't see that we do that if you instead use `set-face-attribute' or similar. What criteria decide whether to modify themes when a face gets modified? 5. Does the Emacs 29 manual call out this difference between `setopt' and `customize-set-variable'? I see it only in your email, not in the doc strings or the code comments (in what you included in your mail). 6. Coming back to your fix: why is warning instead of raising an error TRT? You say it's to be able to continue loading an init file. Do we do that with other attempts to set a user option/face to a bad value when loading code? I think not. For `customize-set-variable', `customize-set-value', and `setq'/`set' we issue no warning and raise no error. Runtime "warnings" are generally a _bad_ idea, IMO. Even "warnings" during code loading are a bad idea. My suggestion is to either raise an error or do what `customize-set-variable' and the rest do, which is set the value and ignore whether it might be bad - don't even test it. ___ `setopt' was added for Emacs 29, which isn't out yet. Is the behavior appropriate? What's the rationale, besides not having to quote and allowing for multiple settings? Other than quoting, why should it behave differently from `customize-set-variable'? From unknown Thu Jun 19 16:24:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Resent-From: Philip Kaludercic Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 17 Dec 2022 22:20:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60162 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Drew Adams Cc: "60162@debbugs.gnu.org" <60162@debbugs.gnu.org> Received: via spool by 60162-submit@debbugs.gnu.org id=B60162.16713155609402 (code B ref 60162); Sat, 17 Dec 2022 22:20:01 +0000 Received: (at 60162) by debbugs.gnu.org; 17 Dec 2022 22:19:20 +0000 Received: from localhost ([127.0.0.1]:58267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6fWZ-0002Ra-Rq for submit@debbugs.gnu.org; Sat, 17 Dec 2022 17:19:20 -0500 Received: from mout02.posteo.de ([185.67.36.66]:49471) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6fWY-0002RT-3u for 60162@debbugs.gnu.org; Sat, 17 Dec 2022 17:19:19 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 1F5D7240107 for <60162@debbugs.gnu.org>; Sat, 17 Dec 2022 23:19:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671315552; bh=Jd0nwDIgrySOFkKxVyfsfsinUuXvCKswN1UAThjBvAo=; h=From:To:Cc:Subject:Date:From; b=dJgFOPCA81j0YLeaY5NNrbJWizzM0rUs9Iiha4OSyUwRcFjGz/uV3Mb6vi5W2vL7q WuFyTk30XKc8cdii+2463wrk4QYqO8YH2mhVQVFhyxF3O8Q7qNRm5Kj8FgdpQIx+Db Lydm3a14xCdj78AD8/3+NpkPa+A9DNo7uT26ot/Iucv41vs0XkK1tL1czMOcfciTDp N4M96ChVT8XpIHgmTROOv9MBD6SOdaI4eAXHmuRL7RG3Yw4aCgYySY2uuOFZ/2P3Jw 6nP9iRc/o6UQMXAm05ookTNw/fr0rgah6aAGnackawBZA0/0vK2h+4DLLVDsxsXuhK L+7OeNJbMVkaQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NZL3Z533Xz6tq0; Sat, 17 Dec 2022 23:19:03 +0100 (CET) From: Philip Kaludercic In-Reply-To: (Drew Adams's message of "Sat, 17 Dec 2022 20:53:43 +0000") References: <87a63mvvib.fsf@posteo.net> <87y1r56hbo.fsf@posteo.net> Date: Sat, 17 Dec 2022 22:19:03 +0000 Message-ID: <87wn6py8q0.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Drew Adams writes: >> `customize-set-variable' isn't used at all, >> to prevent modifying the user theme. > > 1. Why? > > Why should the two differ wrt whether theme `user' > gets modified? Why does updating that theme make > sense in the one case but not in the other? If a user option is added to the user theme, then this "pollutes" the `custom-set-variables' block which is IMHO pointless, since the changes are usually already made programmaticaly, so double-saving them will usually cause more fuss than be of any use. > 2. And now that this is brought to my attention, I > really wonder why `customize-set-variable' pushes > the new setting to the `user' theme. So that it is clear what option have to be saved, when customised using the Easy Customization Interface. > AFAIK, there's nothing at all that requires, or that > should assume, that that function is called by the > current user, or that even if it is, that that user > wants theme `user' updated that way. > > This is apparently the case at least since Emacs 22. > Emacs 20 had no custom themes, and I don't have the > source for Emacs 21. But a guess is that whoever > (Chong Yidong?) added custom themes to Emacs decided > to add this to `customize-set-variable'. > > 3. Why is modifying theme `user' a good idea for any > function that changes an option value? Especially, > why should that be hardcoded (i.e., not an optional > parameter)? You mean why "user" and not some other theme? > I see that we modify themes when a _face_ is changed > with `face-spec-set' (via `face-spec-recalc'). But > I don't see that we do that if you instead use > `set-face-attribute' or similar. What criteria decide > whether to modify themes when a face gets modified? > > 5. Does the Emacs 29 manual call out this difference > between `setopt' and `customize-set-variable'? I see > it only in your email, not in the doc strings or the > code comments (in what you included in your mail). (What happened to 4?) It isn't mentioned in either the Emacs or the Elisp manual. > 6. Coming back to your fix: why is warning instead > of raising an error TRT? You say it's to be able to > continue loading an init file. Do we do that with > other attempts to set a user option/face to a bad > value when loading code? I think not. For > `customize-set-variable', `customize-set-value', and > `setq'/`set' we issue no warning and raise no error. > > Runtime "warnings" are generally a _bad_ idea, IMO. > Even "warnings" during code loading are a bad idea. > My suggestion is to either raise an error or do what > `customize-set-variable' and the rest do, which is > set the value and ignore whether it might be bad - > don't even test it. Well an error is already being raised, but as I said, it is my impressions this is too strict. Typing mistakes in regards to user options aren't great, but certainly shouldn't be fatal. Or I haven't ever regarded them as something reliable enough to just assume will always hold -- after all, you can bypass the type checking. The initial version of the macro didn't even have type-checking. It was added later as a convenience feature to assist the user and inform them if a mistake was made but also to incentivise package developers to add types to user options. > ___ > > `setopt' was added for Emacs 29, which isn't out yet. > Is the behavior appropriate? What's the rationale, > besides not having to quote and allowing for multiple > settings? Other than quoting, why should it behave > differently from `customize-set-variable'? From unknown Thu Jun 19 16:24:37 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 18 Dec 2022 11:29:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60162 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch To: Philip Kaludercic Cc: 60162@debbugs.gnu.org Received: via spool by 60162-submit@debbugs.gnu.org id=B60162.167136291229944 (code B ref 60162); Sun, 18 Dec 2022 11:29:01 +0000 Received: (at 60162) by debbugs.gnu.org; 18 Dec 2022 11:28:32 +0000 Received: from localhost ([127.0.0.1]:33398 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6rqJ-0007ms-Ob for submit@debbugs.gnu.org; Sun, 18 Dec 2022 06:28:32 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37994) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6rqH-0007mj-Nx for 60162@debbugs.gnu.org; Sun, 18 Dec 2022 06:28:30 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6rqC-0005bP-88; Sun, 18 Dec 2022 06:28:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ksq9iNauFnucjEaJFAphAywfPITOdWSAreacjfwabm0=; b=X+Puifq1gDOv JBqpyNAgbNO0x1UE8aIXIaCGWqXCzz5AHzz5rbmoj93SmyJg7CRcm+t8+78DZWvMO0V5/rhovekXP bRmIM5/RFlYUKN9MX9hrE3RLji1cBM+Qq240MasSRNtRCDrJEeOq8Lx0zBHkeVmYyBAcrCrTUoWJY Cbnl+TUfeutG376pGfbLAwDzmCY4qTl8o9IRSxwpNpPWvCZsEk6beMdSmxYLO/ZZA11KWn+6nVIYX tO+sIBfqBtr8g1Aq2PfBuePnjOPWKTzVkFZ40RTggGUgy2HL6HD+nFqqjlf2fhLOGKYuN7lZqzeGg zK+ZrOkD04PAc/OrOPWPsg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6rqB-0000MV-Nr; Sun, 18 Dec 2022 06:28:24 -0500 Date: Sun, 18 Dec 2022 13:28:32 +0200 Message-Id: <83ili9eysf.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <87a63mvvib.fsf@posteo.net> (message from Philip Kaludercic on Sat, 17 Dec 2022 16:35:08 +0000) References: <87a63mvvib.fsf@posteo.net> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Philip Kaludercic > Date: Sat, 17 Dec 2022 16:35:08 +0000 > > Setopt checks the :type of a user option, and raises an user-error if > the value doesn't match the type. This can be annoying during > initialisation, because minor mistakes interrupt everything and you are > let with a partially loaded configuration. > > I'd propose replacing the `user-error' with a `warn', that would still > indicate mistakes, but continue loading the init.el. This is fine by me, please install on the release branch. From unknown Thu Jun 19 16:24:37 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Philip Kaludercic Subject: bug#60162: closed (Re: bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error) Message-ID: References: <87v8m9x7c3.fsf@posteo.net> <87a63mvvib.fsf@posteo.net> X-Gnu-PR-Message: they-closed 60162 X-Gnu-PR-Package: emacs X-Gnu-PR-Keywords: patch Reply-To: 60162@debbugs.gnu.org Date: Sun, 18 Dec 2022 11:47:03 +0000 Content-Type: multipart/mixed; boundary="----------=_1671364023-30714-1" This is a multi-part message in MIME format... ------------=_1671364023-30714-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an= error which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 60162@debbugs.gnu.org. --=20 60162: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60162 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1671364023-30714-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 60162-done) by debbugs.gnu.org; 18 Dec 2022 11:46:39 +0000 Received: from localhost ([127.0.0.1]:33483 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6s7r-0007yg-Dy for submit@debbugs.gnu.org; Sun, 18 Dec 2022 06:46:39 -0500 Received: from mout02.posteo.de ([185.67.36.66]:42285) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6s7q-0007yO-8x for 60162-done@debbugs.gnu.org; Sun, 18 Dec 2022 06:46:38 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id BB8F7240103 for <60162-done@debbugs.gnu.org>; Sun, 18 Dec 2022 12:46:32 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671363992; bh=TRjext3bZtL9wLRafjBQLvwkGAm2QL3p/IQbo7HCxdo=; h=From:To:Cc:Subject:Date:From; b=M9StlChXALxQJl0VYgcD7bcPmSryMQ7K1ZcjC2z8/lPH201cNfd7IMmYGcZEDPjui i05QFnOQA+LpjTZRXuMmDbFmRajot47f8ViLp44NcnURbTW4SVz3v08Styh+xP0bJo LbfmmunAv+DBRysB4ZiHhVoxZUTzYqHi+GX/ftrecz0aa2RgbJn4/rxnaug1OGyCtE ITzfc9sk6priRiQB19IwzxF4Ya3toCGVU5f+4WXhxdZMBqFyrCNSYAmJ2JkRslr8QY JUN5+thvSaCOsBUTOoZWXPKctx24YoTCtwztDUvhhEilSoS7pSyb5Bpu+Ldo+fVLQU I/hfAhfDOn0aw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NZgzD2rQ7z9rxD; Sun, 18 Dec 2022 12:46:32 +0100 (CET) From: Philip Kaludercic To: Eli Zaretskii Subject: Re: bug#60162: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error In-Reply-To: <83ili9eysf.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 18 Dec 2022 13:28:32 +0200") References: <87a63mvvib.fsf@posteo.net> <83ili9eysf.fsf@gnu.org> Date: Sun, 18 Dec 2022 11:46:36 +0000 Message-ID: <87v8m9x7c3.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60162-done Cc: 60162-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Eli Zaretskii writes: >> From: Philip Kaludercic >> Date: Sat, 17 Dec 2022 16:35:08 +0000 >> >> Setopt checks the :type of a user option, and raises an user-error if >> the value doesn't match the type. This can be annoying during >> initialisation, because minor mistakes interrupt everything and you are >> let with a partially loaded configuration. >> >> I'd propose replacing the `user-error' with a `warn', that would still >> indicate mistakes, but continue loading the init.el. > > This is fine by me, please install on the release branch. Done. ------------=_1671364023-30714-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 17 Dec 2022 16:35:11 +0000 Received: from localhost ([127.0.0.1]:56795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6a9X-000564-F7 for submit@debbugs.gnu.org; Sat, 17 Dec 2022 11:35:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:59852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6a9V-00055w-Oo for submit@debbugs.gnu.org; Sat, 17 Dec 2022 11:35:10 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6a9V-0007Ja-JI for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 11:35:09 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6a9T-0001Wt-GW for bug-gnu-emacs@gnu.org; Sat, 17 Dec 2022 11:35:09 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 9A82D240027 for ; Sat, 17 Dec 2022 17:35:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1671294905; bh=IZtw7BJD/re1Ambhr3pM1eCbuTM2xLHNCQoW5uWYo7k=; h=From:To:Subject:Date:From; b=AEKx9ScxbSK/U0KaMiydrOs8lokLx8opZMR2n1ephngueCwLPwXcFQusiVAlqC81l bjixvjhB6VgMYZ9S+G9O6wD/sxn2aF8sPbImTS+j2+1Rh/1Fi/XjivIYGrX9oU3wIj CeFhl5hPHFHNbt1JF5LKxnjYh9w3jZrbaM9a/uV8e9DJQS30/tI5nVCEPNSkQsbFBS nS6/1TAydeNt59uEOSnS4BDNEcMx4EWLxBaLq9GzGCklAHAGY5iFk56JVmUQTzUM8w ue2NubTswl+CGU+eZxaEeXpeyEc5KgAHvSoRdh+mwyR46JFTfLU20A1r1Ei9nzflbb 8tyDaw5WyZ4Dg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4NZBQd12S4z9rxD for ; Sat, 17 Dec 2022 17:35:04 +0100 (CET) From: Philip Kaludercic To: bug-gnu-emacs@gnu.org Subject: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error Date: Sat, 17 Dec 2022 16:35:08 +0000 Message-ID: <87a63mvvib.fsf@posteo.net> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.65; envelope-from=philipk@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) --=-=-= Content-Type: text/plain Tags: patch Setopt checks the :type of a user option, and raises an user-error if the value doesn't match the type. This can be annoying during initialisation, because minor mistakes interrupt everything and you are let with a partially loaded configuration. I'd propose replacing the `user-error' with a `warn', that would still indicate mistakes, but continue loading the init.el. In GNU Emacs 29.0.60 (build 5, x86_64-pc-linux-gnu, GTK+ Version 3.24.35, cairo version 1.16.0) of 2022-12-14 built on quetzal Repository revision: 622838b957e240d700585050e9ddbd036e690513 Repository branch: emacs-29 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure --with-pgtk --with-imagemagick' --=-=-= Content-Type: text/patch Content-Disposition: attachment; filename=0001-lisp-cus-edit.el-setopt-set-Warn-instead-of-rasing-a.patch >From ced6b44050b417391e0675acc850d1a0030ef13f Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sat, 17 Dec 2022 17:29:24 +0100 Subject: [PATCH] * lisp/cus-edit.el (setopt--set): Warn instead of rasing an error --- lisp/cus-edit.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 0e09e99da9..ab2f74dbb8 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -1073,7 +1073,7 @@ setopt--set ;; Check that the type is correct. (when-let ((type (get variable 'custom-type))) (unless (widget-apply (widget-convert type) :match value) - (user-error "Value `%S' does not match type %s" value type))) + (warn "Value `%S' does not match type %s" value type))) (put variable 'custom-check-value (list value)) (funcall (or (get variable 'custom-set) #'set-default) variable value)) -- 2.35.1 --=-=-=-- ------------=_1671364023-30714-1--