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: Tue, 12 Apr 2022 17:27:04 +0200 Message-ID: References: <8335ii5y60.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16925"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.10; emacs 27.2 Cc: michael_heerdegen@web.de, 54399@debbugs.gnu.org, larsi@gnus.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 12 21:15:11 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 1neLyo-0004BK-VN for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Apr 2022 21:15:11 +0200 Original-Received: from localhost ([::1]:45122 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1neLyn-000731-G9 for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Apr 2022 15:15:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neLyg-00072p-AZ for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 15:15:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:56133) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1neLyg-0002U8-0t for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 15:15:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1neLyf-0007mj-RU for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 15:15: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: Tue, 12 Apr 2022 19:15: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.164979088429885 (code B ref 54399); Tue, 12 Apr 2022 19:15:01 +0000 Original-Received: (at 54399) by debbugs.gnu.org; 12 Apr 2022 19:14:44 +0000 Original-Received: from localhost ([127.0.0.1]:50030 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neLyO-0007lw-G4 for submit@debbugs.gnu.org; Tue, 12 Apr 2022 15:14:44 -0400 Original-Received: from mail-oln040092073031.outbound.protection.outlook.com ([40.92.73.31]:31518 helo=EUR04-HE1-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neLyM-0007li-5I for 54399@debbugs.gnu.org; Tue, 12 Apr 2022 15:14:42 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VP4YO+VdDJNsGS+AFOt0gYAN9kPqQu9ZEtTpJ7M/36jtZnMIiNJkbfNiF+mHZVhWtZoWhWO7DinhEkluE4sNojbeCyYtnLL15Ulh/eztu17Q+mVVEWVAhsVVYRB+aG39nF8jmx70izqGcpd+E6hpZm5cAit7XemB23XpGQhbCc0X/3QPplHHAlbmWmbUYJmmYSYuuw7S/UFpWKl2XGyjWsSAC6TxpRB1TdWobA3DdhRK96oIo+/KPfkjfTYGc/TIsVmNK2KbvvcgSgK5/Ea7HIT5ma6XZ1DGBbNxlPtlTBqCZGd0055Hcb24Y5l3TJAaNvzQUuh/4t8lZdlrqQIy3w== 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=403LbHebQVZsyiRVMYiXlO7yCMryEZctPrFBgcypzEk=; b=T9LJo0mN8UKJH9+QBskWjTQYQ5JE+WJfmr1EH575G8GIX9yLsWE/AV/UqdbbADgq2A57EPMZ4n0AgHOvnMYAmmYoM+jwlibgBQhT3+l4IBwc1RpeFD6wzz9I7vfxi05UeBOLTKCeQI1P83PHGVqr/Vw1Ls2lGuXL6B3xG/mauS0K5dyJq1NmREpA0etJIcpYZQNnXcgcSa49SwzEPXrmn137csAiJ7io1d2x88ffDG6z+aazghQicqdOqHtJriYySXrJzUgKYCa8h4XvLOYCk8/aFwwN3jZjptGh1qsceqYQfAZoy0gj68JjtYMcCoejwF5C/y1flzzPXs4AhMgxMA== 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=403LbHebQVZsyiRVMYiXlO7yCMryEZctPrFBgcypzEk=; b=Hm/lyi9kBwCU+y2OyiTjp2VoEn7Av3hKsmo9I/2tEQ/h5RHqVv7QJJMsssPIpmvvRpwny8t3Jjm1Mak36VYzbC0PpTiEh1CHB+4D3anyOn6DGAoi74nvMUS99AjNtulfOe6jivpAGFY07lcBpTTN7EGy76+yflBVw5ICZaMNummiSwJ6jBM0bLySNFrleFpaqY6O/FxoBFMSVJoR5djYdEwyOlEdtGJchBXVTHtyUG7CQLr5OO82VUTXK7wvTZe/EPRFRC9E1TybwMhE7bBNbTCwsFQ51f5G9eMeQ3Q6u+q1KJQo9MfSmPb7p2od0lCmmFDiWiAQEBdBR8f+8e4ogA== Original-Received: from PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) by AM6PR0602MB3638.eurprd06.prod.outlook.com (2603:10a6:209:8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.29; Tue, 12 Apr 2022 19:14:35 +0000 Original-Received: from PAXPR06MB7760.eurprd06.prod.outlook.com ([fe80::c43d:998b:8b75:5e3a]) by PAXPR06MB7760.eurprd06.prod.outlook.com ([fe80::c43d:998b:8b75:5e3a%5]) with mapi id 15.20.5144.030; Tue, 12 Apr 2022 19:14:35 +0000 In-reply-to: X-TMN: [2O37yEfLM8FBaq5PlafESRxgn1UPDnz7] X-ClientProxiedBy: MR2P264CA0165.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:1::28) To PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) X-Microsoft-Original-Message-ID: <87czhmunaj.fsf@hotmail.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 29471fcc-1010-41f6-b8df-08da1cb8ae28 X-MS-TrafficTypeDiagnostic: AM6PR0602MB3638:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0CQl7lGbLym9uoXms7+vkQEkgkv7qMiqfeWavwP5lZHjhUT/PESVRqygGpvlVQJdwEKX1BzSigiXYPQH8zJnZzGOJht7XgQ/dfgbZhyXNhE2uncrHsZkDU9oE4PJykywjGGnoI6iV4t4Cc/u7fGS6AA4psyPMDFngE7EpoNtm7zteuH4mriYgijF3k43KHnBB3fJRI3snwYOY3nc0lCYj/c7ILJwBH6T+rmPzaqINN4TYWv47sjbey4YtUE3r9AykZTCVDT+x+SL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Iu/rPHFKYudKcLfXk9JYDm9WG9GMfZWmGboY0qL5wRoFYDrU6gp+/mPOr1dXkQqqX0+15LK47RqX8l TKqhsP+BK0aS5J504avQ0AWdcN1tysUrBozYm9XNPYkXqGwIG5SQ/pFZ3xFNXyjkkOghECJdvbAtLDQ+oo65kPx//LPapFlMWY X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-6e454.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 29471fcc-1010-41f6-b8df-08da1cb8ae28 X-MS-Exchange-CrossTenant-AuthSource: PAXPR06MB7760.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2022 19:14:35.3604 (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: AM6PR0602MB3638 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:229774 Archived-At: Stefan Monnier writes: >>>>> ;; default defined, buffer-local undefined >>>>> (defvar var1 "default") >>>>> (let ((var1 "inside let")) (default-value 'var1)) ;; returns "inside let" >>>>> >>>>> ;; default defined, buffer-local defined >>>>> (defvar var2 "default") >>>>> (setq-local var2 "buffer-local") >>>>> (let ((var2 "inside let")) (default-value 'var2)) ;; returns "default" >>>> >>>> I would expect both snippets to return the same. >>> >>> That's because you expect the "default" in `default-value` refers to the >>> let-nesting dimension rather than the buffer dimension. >> >> No, I just expect to refer to any of those consistently, I don't mind >> which one. If it's the buffer dimension, even inside let bindings, both >> forms should return "default". > > If there's no buffer-local value and `default-value` operates in the > buffer-local dimension, why do you expect it to return a different value > from `symbol-value`? > > > Stefan Probably because I don't really understand all the concepts involved here. But I expect functions that operate on the default value of the buffer-local dimension to behave the same way regardless of whether the current buffer happens to have actually a local value. So if `default-value' returns something different as `symbol-value' when there is a buffer-local value, I expect the same to occur when there is no buffer-local value. But never mind, I just wanted to ensure that the current behavior was the expected one before updating the docstring for `default-boundp', and you already confirmed that. And this is an uncommon corner case for which I can't think of real use cases, aside from the one of autoloading inside a let binding of a variable a file which defines that (custom) variable, for which we are already using `default-toplevel-value' and `set-default-toplevel-value'. So let's leave it at that.