From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#54399: 27.2; Problems with (let ((custom-variable ...)) (autoload-function ...)) Date: Tue, 12 Apr 2022 11:04:49 -0400 Message-ID: References: <8335ii5y60.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21042"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: michael_heerdegen@web.de, Eli Zaretskii , 54399@debbugs.gnu.org, larsi@gnus.org To: Ignacio Casso Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 12 17:06:27 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 1neI67-0005Fe-8G for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Apr 2022 17:06:27 +0200 Original-Received: from localhost ([::1]:57522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1neI65-00067Z-TT for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 12 Apr 2022 11:06:25 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60844) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1neI5i-000669-3l for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 11:06:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55392) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1neI5h-0000ot-Pq for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 11:06:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1neI5h-0004B2-Lb for bug-gnu-emacs@gnu.org; Tue, 12 Apr 2022 11:06:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 12 Apr 2022 15:06: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.164977590915980 (code B ref 54399); Tue, 12 Apr 2022 15:06:01 +0000 Original-Received: (at 54399) by debbugs.gnu.org; 12 Apr 2022 15:05:09 +0000 Original-Received: from localhost ([127.0.0.1]:49289 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neI4q-00049g-Qw for submit@debbugs.gnu.org; Tue, 12 Apr 2022 11:05:09 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:56080) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1neI4p-00049P-D6 for 54399@debbugs.gnu.org; Tue, 12 Apr 2022 11:05:07 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C7C64100166; Tue, 12 Apr 2022 11:05:01 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 23146100091; Tue, 12 Apr 2022 11:05:00 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1649775900; bh=6CXw+kFmXwGhTACvY4htDF5MIsKV9Ys054o2E8oOSbY=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=c0jogADrvdbq+D4OyIiDWgjP7FmEF/N9Bi0tvMlsqDlhg55DsuDGrqhzXIjmfRJYv zQWQ9OY/48vPckktzXJpaPbJJ6IzksGo4W8Ad4k9kfagfoDCFtmx04upsRr8/tpx+g aQrX5O+aq+Q8VXJKDS9X/IHlLoCm9OqugeyKl05pj5My2zE6M7pvhi5a+Gkmg4ENGU C4H1qFPixdzLhObPYlQnrVLgx2+q648j71Zw+C2L5ILrKQj+54EDdTmLzlgeQ9JlHl R659ilfLdKjaYf1Yn0Xr/+gcuPRB8MqoVWWr9uypfh5jDq5simDjLGFaNnJpp8lTp6 ifcHPbtucoGnA== Original-Received: from pastel (unknown [45.72.221.51]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id D9BDA12056C; Tue, 12 Apr 2022 11:04:59 -0400 (EDT) In-Reply-To: (Ignacio Casso's message of "Tue, 12 Apr 2022 16:27:54 +0200") 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:229767 Archived-At: >>>> ;; 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