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 16:27:54 +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="422"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.10; emacs 29.0.50 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 16:31:21 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 1neHY9-000ASP-HE for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Apr 2022 16:31:21 +0200 Original-Received: from localhost ([::1]:37486 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1neHY8-0006vv-Cc for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Apr 2022 10:31:20 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51722) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neHXq-0006tR-Bw for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 10:31:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55301) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1neHXq-0003e4-3T for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 10:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1neHXp-0003Ay-Sq for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 10:31: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 14:31: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.164977384412180 (code B ref 54399); Tue, 12 Apr 2022 14:31:01 +0000 Original-Received: (at 54399) by debbugs.gnu.org; 12 Apr 2022 14:30:44 +0000 Original-Received: from localhost ([127.0.0.1]:49198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neHXX-0003AO-Se for submit@debbugs.gnu.org; Tue, 12 Apr 2022 10:30:44 -0400 Original-Received: from mail-am6eur05olkn2090.outbound.protection.outlook.com ([40.92.91.90]:1249 helo=EUR05-AM6-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neHXW-0003A7-Co for 54399@debbugs.gnu.org; Tue, 12 Apr 2022 10:30:42 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z3CVCDTJWVI8gCbIxoVgkH53diN3yjpXKNAysnc2E5AQ4fu0DY2nBMZy8iJZ+ohimkffCRDVXln1jXLwrcrDJndOMgK+3RXo0Vwm7TNs/J9ABls035K3wGvzrKPdciAB7De/oNLNZUdzHuJzXdSpr0KlK8pHtE3eGgKwu3CHFeFIXavJbksMFsKDlfTZy1bRVY/Bq53fuLNafX165uBsbJRSILF2tMlgG60mgiD1z/ofWK5gsAk4eHbhlL5rxkJCYs+fCUu3kDJLClxNa6Su5l/SI3J1L1DMUcaOsOrr23kvxX/nga72UmlK83+jmkAFgUamtkVqQkmn9X3VsMTl1A== 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=9Jnaft/rg368E0FtY1KMqFdfckgtKN5eglqgkIfHMYI=; b=bLAdn1YSnDz1DkaBhpC+bLC3cqOy00d3stwFhnJidIv45/3Vckn0jSfZvawQubirTwpNFhuWyiue3xKzZbyBR0IbBHv49cpj8VByY2aiKCr1EAW9UEN9/lvEP2q9ETnmwEUSz8scj6IXdLw4uhZVbYHPbSfIBgun0p78lthDo40BzIlGclkLqVQQHbL+pebYknuqtX368dhaq2HJdvDodsmHU0j/Gzw21Wo01CnbGFSIF4BsiEu65jmE9xe9fN7p1Ry06w3P9SlIqAxvEWIFeHftz/Ct4hLaX8b6lJmMRCTPw24Ru82zXNowSKmUB+IwpLbk94p7QfXRU1YakYba0g== 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=9Jnaft/rg368E0FtY1KMqFdfckgtKN5eglqgkIfHMYI=; b=f4u5FLtgTHv+UTBE224a2dXVe/eyKftSJlUuhSFGddz3wwuD1NLh2KQQV9g/8C9A9wZx3iDTbLI8mo1VvwAxrZETMJAzm/BSUMoh6WiJNPCFy35HCVFRF7Kn0g6Grj2FXvhJtUAv44ZFekOJDKcxSPWEOqtph/jvnEjp0X1AGmc6mhaEdQJRirluOzbUV2qO/+Wjj5R41WJBnq9eZnzXhsaj2ReQYQlNNj7NhZCcQe205ba/ynRzZCZybD/vus9WfkogNObBh+RrlSrhLlSZPco3hxg+y95RFd4Y2h+MspdblWEV8jDHCwJDwsHvcJ17NWZzKmbOcCmF/ldNKZjFsg== Original-Received: from PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) by DB8PR06MB6473.eurprd06.prod.outlook.com (2603:10a6:10:fc::11) 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 14:30:36 +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 14:30:36 +0000 In-reply-to: X-TMN: [kSCNkh2JP311aK5twrLCY2LHFvPaL6eb] X-ClientProxiedBy: MR1P264CA0035.FRAP264.PROD.OUTLOOK.COM (2603:10a6:501:2f::22) To PAXPR06MB7760.eurprd06.prod.outlook.com (2603:10a6:102:155::8) X-Microsoft-Original-Message-ID: <87mtgq2x2u.fsf@hotmail.com> X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 18121b82-5f37-4637-26d2-08da1c9101f4 X-MS-TrafficTypeDiagnostic: DB8PR06MB6473:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: mNXPWtBKaWHC+N2ulft85xAAQfQha0EAjt15ZazRIXPd/EdLLr9ESbUPoko9UiGMv/jgiMwC8fMKrXTsz54dxDsuD5Q1h4BiRUoromHcaAlP876eaR0ZQ24z8/A9sT1ZfwSTr+UM7dCeEvcArRvGIwaGfyW8gwPU2FfCcXuTelOrNJDKTfxd5s/0KJqy5arjtsD0Tbc4jCvXYuGBrTPto4gNM+BlN+3p0bd6C6O8atGmXsEVxTMnwDlPq99OZQ9SVl00mrftNedBU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iHN0o1TGkQ+6f0ifyrvF8RQ5So0A4gQsEBhpyY+yzW5Qz8Pvm/7OdVDnUxqcg8uQgQzumH1qOdqQqbX Eq3ASjYvBStswxpVWZYEJe938vH+CybrG0RBHSLxXRXrRuDwjShsh6G5Qzj/bGk9jwwig5BFpEGzDjTX8dn8A3a5S67aBjyC+q X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-6e454.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 18121b82-5f37-4637-26d2-08da1c9101f4 X-MS-Exchange-CrossTenant-AuthSource: PAXPR06MB7760.eurprd06.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2022 14:30:35.8096 (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: DB8PR06MB6473 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:229766 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 inside let bindings the buffer dimension is "eclipsed", both should return "inside let". If `default-value' inside a let binding just has undefined behavior, it should produce an error, or at least be documented somewhere. But right now is neither of those, and it just depends of whether the current buffer actually has a local value for the variable, which I find inconsistent.