From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ignacio Casso Newsgroups: gmane.emacs.bugs Subject: bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)) Date: Thu, 09 Jun 2022 23:19:54 +0200 Message-ID: References: <83sfqi498s.fsf@gnu.org> <87ilrdg837.fsf@web.de> <87ilqb1nwf.fsf@gnus.org> <83r14zp5jz.fsf@gnu.org> <83o803p2p3.fsf@gnu.org> <87tu8t283h.fsf@gnus.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35572"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.10; emacs 27.2 Cc: michael_heerdegen@web.de, Eli Zaretskii , 54399@debbugs.gnu.org, monnier@iro.umontreal.ca To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 09 23:34:17 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1nzPnD-0008xa-FW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 23:34:15 +0200 Original-Received: from localhost ([::1]:41682 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nzPnC-0005ov-1g for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 09 Jun 2022 17:34:14 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nzPn0-0005og-Au for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 17:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54141) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nzPmz-0001cw-UG for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 17:34:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nzPmz-00071Y-QQ for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2022 17:34:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ignacio Casso Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jun 2022 21:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54399 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 54399-submit@debbugs.gnu.org id=B54399.165481041426963 (code B ref 54399); Thu, 09 Jun 2022 21:34:01 +0000 Original-Received: (at 54399) by debbugs.gnu.org; 9 Jun 2022 21:33:34 +0000 Original-Received: from localhost ([127.0.0.1]:48038 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzPmX-00070p-Kz for submit@debbugs.gnu.org; Thu, 09 Jun 2022 17:33:34 -0400 Original-Received: from mail-oln040092075055.outbound.protection.outlook.com ([40.92.75.55]:43649 helo=EUR04-VI1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nzPmQ-00070T-Fl for 54399@debbugs.gnu.org; Thu, 09 Jun 2022 17:33:31 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FGPJki087Z/AeI5vD5u9laTmpiFd5lwiF6yupT7js41lWLiFizZeG9R01/YwFckvnlNTDHJQZs1IVyJmqif9kDVIBM1ED4wVpSq7EeQKd8NwIExL8+zr/26UAjA6TCfRgKFw+9nBC39KnKZk2y/LfqN2/TAVqJZfX0MNfljQjPVWxCceGe8LpcBYudRy1FWnGYQ1s2FQiOqjETG0UP72HEoo0swJlCJPOCMFK36S0f4xcMVt8IN5137NBqUNoc1dnAxE0rBuumNiR+la2BT8xAAWHKLi9Fyg83MUW73cP7VfPVjWhWxo/ARgpUSMafsOoZppSYwlTJkFqsOZijUi9g== 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=VY4rrqR8STDx6eR3YhSdng6toKTnrR5dGK7IdmTADq0=; b=VhG5iiu1Lgd8hqneNb7iDOBRX+Nhg49j9HHIjnVSVQBDAzQFKKDIJoYwzBY4FNPGtxnlgf1i5LB5cknJtnEZB3BCVff1ZKPaNK3d7lLR65nzl63/lEpq3ZWQtHxh6Zg+XsPAg2YmYR2IJMTCk4g044JIqxsSV3LQqKh5Dfv03hr/y44F8YY+E+8XnwVXezsXVAOcCMSOGEYBw8dTH7IlCzeR5jSIiJRZ3svQQQ0SH5h9Tnq2uSYU8AkNMpTZ91RXmcFGLFVpjwQyJdcy5DmLvq87N2TTRNHMrIdZD2uA5cO+xqeifMVn+OGjzokA4jHUWzfNvVwCocwiwYJeySfavg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VY4rrqR8STDx6eR3YhSdng6toKTnrR5dGK7IdmTADq0=; b=c63rZWFa5YHherjzPZ3THZ/lJknYWjN3kuXNLNxmIXz48+DARS24APxpXvi21u2zgh/gpw2ZsrOhzm/9EsSMwLbJprHJ9ObKMY5fbDGok1ewqcmjCeoKjzOLP3PQCTGnmonTbCF/fg1aPWl1ieHb7efKphzzRUVFJssZXKVp0g+/RsaMpg/mG+cXFB98N8jsQ4SS5XUFz4S3EqydfoP+bSiCLSoJ8AwMr48vcUQ/78xQ8PadfB4g7csEnKahPynLODbDztVPvvdBlnHn/YOXOMDv7AHHAXtUmBGdYFiulK9pHZg4/o7Iwqf/7HhcnmuVVCQg1ncXhFnkmHmORbhC8Q== Original-Received: from DB6PR0601MB2087.eurprd06.prod.outlook.com (2603:10a6:4:4f::26) by DB8PR06MB6091.eurprd06.prod.outlook.com (2603:10a6:10:104::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5314.18; Thu, 9 Jun 2022 21:33:18 +0000 Original-Received: from DB6PR0601MB2087.eurprd06.prod.outlook.com ([fe80::cdbe:e542:a1b6:1a2]) by DB6PR0601MB2087.eurprd06.prod.outlook.com ([fe80::cdbe:e542:a1b6:1a2%2]) with mapi id 15.20.5314.022; Thu, 9 Jun 2022 21:33:18 +0000 In-reply-to: <87tu8t283h.fsf@gnus.org> X-TMN: [jky93ToRASXoQQ0NLZBC/Q0F2nFP+NmL] X-ClientProxiedBy: PR2P264CA0013.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::25) To DB6PR0601MB2087.eurprd06.prod.outlook.com (2603:10a6:4:4f::26) X-Microsoft-Original-Message-ID: <87fskdh698.fsf@hotmail.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c457fa9e-11e8-4b7c-ab3c-08da4a5faade X-MS-TrafficTypeDiagnostic: DB8PR06MB6091:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: jbTw737utHEzwk5e5Ed3rijByFbFvUgakHKRQYVHoxh/UVvwYCSHMIeLbxZUq8WASnJXsXEtoALpF+toaAvf2742CPK+1Gwx8sCb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RipLGGP91CzGP9OC8bSxE0b9tZ2WF1y9B4kKde451OwBWKLjEt8YPBk7ujrF+viywfuT3RmL7N0nqJZ+mb6ueAZCeACxG3h0ccJa+/QtT1gSIFMjyF5GZWJ2LAKR6YbFn2H2geGJ5e+1tMTn+KhkZgWPExf9SC5bIy3V1k5OpcWFsGaSh6GbJ2XRHvf1m8aBAOqk5+yKhSE3TiHOvmJQ5K6gUas2wPP2ENEI3WnOdedh51l7CgvhjK CB/jyKWUvemG0M+r/mi8Vh9R30JmJfTK4p7+KyQH4wBS1eGiB9GH2XtgpnK+lUXlIuGrqF/ysjsnhErDM5sHRRohQB4sZZqf28 X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-6e454.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: c457fa9e-11e8-4b7c-ab3c-08da4a5faade X-MS-Exchange-CrossTenant-AuthSource: DB6PR0601MB2087.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2022 21:33:17.9164 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR06MB6091 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:234174 Archived-At: --=-=-= Content-Type: text/plain Lars Ingebrigtsen writes: > Ignacio Casso writes: > >> These two I thought that I had remove them. Ignore them, they will not >> be there in the next version of the patch > > Ignacio, did you have a new version of the patch that we missed? Not really, just the last one but without those two changes. I guess I was waiting for all of you to agree before sending it (you and Eli did, but Stefan did not answer) and I forgot eventually. Here it is: --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=0001-updated-some-documentation-regarding-customize-and-d.patch Content-Description: Patch for bug#54399 >From 6f0791ce7d5189af29362e8570659881776d7748 Mon Sep 17 00:00:00 2001 From: Ignacio Casso Date: Thu, 12 May 2022 10:37:10 +0200 Subject: [PATCH] updated some documentation regarding customize and default values --- doc/lispref/customize.texi | 8 ++++---- lisp/custom.el | 14 +++++++------- src/data.c | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 54059d7b6e..06a2f5365d 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -376,7 +376,7 @@ Variable Definitions the value properly for this option (which may not mean simply setting the option as a Lisp variable); preferably, though, it should not modify its value argument destructively. The default for -@var{setfunction} is @code{set-default}. +@var{setfunction} is @code{set-default-toplevel-value}. If you specify this keyword, the variable's documentation string should describe how to do the same job in hand-written Lisp code. @@ -387,7 +387,7 @@ Variable Definitions option. The function @var{getfunction} should take one argument, a symbol, and should return whatever customize should use as the current value for that symbol (which need not be the symbol's Lisp -value). The default is @code{default-value}. +value). The default is @code{default-toplevel-value}. You have to really understand the workings of Custom to use @code{:get} correctly. It is meant for values that are treated in @@ -409,7 +409,7 @@ Variable Definitions @item custom-initialize-default Like @code{custom-initialize-set}, but use the function -@code{set-default} to set the variable, instead of the variable's +@code{set-default-toplevel-value} to set the variable, instead of the variable's @code{:set} function. This is the usual choice for a variable whose @code{:set} function enables or disables a minor mode; with this choice, defining the variable will not call the minor mode function, but @@ -424,7 +424,7 @@ Variable Definitions @item custom-initialize-changed Use the @code{:set} function to initialize the variable, if it is already set or has been customized; otherwise, just use -@code{set-default}. +@code{set-default-toplevel-value}. @item custom-initialize-delay This function behaves like @code{custom-initialize-set}, but it diff --git a/lisp/custom.el b/lisp/custom.el index a084304ff8..84c740f73b 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -68,7 +68,7 @@ custom-initialize-default (defun custom-initialize-set (symbol exp) "Initialize SYMBOL based on EXP. If the symbol doesn't have a default binding already, -then set it using its `:set' function (or `set-default' if it has none). +then set it using its `:set' function (or `set-default-toplevel-value' if it has none). The value is either the value in the symbol's `saved-value' property, if any, or the value of EXP." (condition-case nil @@ -81,7 +81,7 @@ custom-initialize-set (defun custom-initialize-reset (symbol exp) "Initialize SYMBOL based on EXP. -Set the symbol, using its `:set' function (or `set-default' if it has none). +Set the symbol, using its `:set' function (or `set-default-toplevel-value' if it has none). The value is either the symbol's current value (as obtained using the `:get' function), if any, or the value in the symbol's `saved-value' property if any, @@ -100,7 +100,7 @@ custom-initialize-changed "Initialize SYMBOL with EXP. Like `custom-initialize-reset', but only use the `:set' function if not using the standard setting. -For the standard setting, use `set-default'." +For the standard setting, use `set-default-toplevel-value'." (condition-case nil (let ((def (default-toplevel-value symbol))) (funcall (or (get symbol 'custom-set) #'set-default-toplevel-value) @@ -114,7 +114,7 @@ custom-initialize-changed symbol (eval (car (get symbol 'saved-value))))) (t - (set-default symbol (eval exp))))))) + (set-default-toplevel-value symbol (eval exp))))))) (defvar custom-delayed-init-variables nil "List of variables whose initialization is pending until startup. @@ -262,11 +262,11 @@ defcustom when using the Customize user interface. It takes two arguments, the symbol to set and the value to give it. The function should not modify its value argument destructively. The default choice - of function is `set-default'. + of function is `set-default-toplevel-value'. :get VALUE should be a function to extract the value of symbol. The function takes one argument, a symbol, and should return the current value for that symbol. The default choice of function - is `default-value'. + is `default-toplevel-value'. :require VALUE should be a feature symbol. If you save a value for this option, then when your init file loads the value, @@ -717,7 +717,7 @@ custom-set-default (if custom-local-buffer (with-current-buffer custom-local-buffer (set variable value)) - (set-default variable value))) + (set-default-toplevel-value variable value))) (defun custom-set-minor-mode (variable value) ":set function for minor mode variables. diff --git a/src/data.c b/src/data.c index 72dcf6f878..9b36ecc1b2 100644 --- a/src/data.c +++ b/src/data.c @@ -1939,9 +1939,9 @@ default_value (Lisp_Object symbol) DEFUN ("default-boundp", Fdefault_boundp, Sdefault_boundp, 1, 1, 0, doc: /* Return t if SYMBOL has a non-void default value. -A variable may have a buffer-local or a `let'-bound local value. This +A variable may have a buffer-local value. This function says whether the variable has a non-void value outside of the -current context. Also see `default-value'. */) +current buffer context. Also see `default-value'. */) (Lisp_Object symbol) { register Lisp_Object value; -- 2.25.1 --=-=-=--