From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hendrik Tews Newsgroups: gmane.emacs.bugs Subject: bug#55914: 28.1; Defining as dynamic an already lexical var Date: Sat, 11 Jun 2022 23:33:24 +0200 Message-ID: <87zgiilwbf.fsf@cert2.kernkonzept.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40943"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) To: 55914@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 11 23:34: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 1o08kE-000APh-Tj for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 23:34:10 +0200 Original-Received: from localhost ([::1]:41246 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o08kD-00088R-No for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Jun 2022 17:34:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o08k6-00088J-KD for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 17:34:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:60262) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o08k6-0008Ph-C3 for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 17:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o08k6-0004GI-5g for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 17:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Hendrik Tews Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Jun 2022 21:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55914 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.165498321916346 (code B ref -1); Sat, 11 Jun 2022 21:34:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Jun 2022 21:33:39 +0000 Original-Received: from localhost ([127.0.0.1]:54159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o08ji-0004FZ-RN for submit@debbugs.gnu.org; Sat, 11 Jun 2022 17:33:39 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:48738) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o08jf-0004FQ-1a for submit@debbugs.gnu.org; Sat, 11 Jun 2022 17:33:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o08je-00087p-Pp for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 17:33:34 -0400 Original-Received: from serv1.kernkonzept.com ([2a01:4f8:1c1c:b490::2]:36360 helo=mx.kernkonzept.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o08jc-0008Na-4I for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 17:33:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kernkonzept.com; s=mx1; h=Content-Transfer-Encoding:Content-Type: MIME-Version:Message-ID:Date:Subject:To:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=t0fgYOlYx1E97mBqGvYhC4JZ/3ay0VJpRj/n9mObKLM=; b=oLIniCL+TG5jFSw+LKdnCOK3xu BvcTIba8cGfJPEd6Nt0MtOAHP0BD6VNtZv9NXTmZwIrddZTt9NIJCo1xk5pO6fAKVEIBVnJNir58x i4G2MW3XYyB52Lgplk/exKLjbX4R4b6ksDcIklpeZQdDBKq18BS9fKN+OJRoFaDcJIArDUpX+GY9X /tE1YUsBu6QYYBdY6KIx8x9q7eKxjpnzoRYOtlcPW+TeN03EMRiyz20q1ZGQcSxzPO2iwCnB6o2wh AZSp2GAr5UzzQBCc2oCqQ2+EJII7NayT2mFzoIKu0jggPJTEP70OaAhjY94WgT21oHK5N+0F50gCl xcELk/cQ==; Original-Received: from [2a02:810a:8d00:56bc:caea:3529:f8e9:e9c2] (helo=cert2) by mx.kernkonzept.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2) id 1o08jV-004s24-Ta for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 23:33:26 +0200 Original-Received: from localhost ([::1] helo=cert2) by cert2 with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1o08jS-001mpI-UH for bug-gnu-emacs@gnu.org; Sat, 11 Jun 2022 23:33:24 +0200 Received-SPF: pass client-ip=2a01:4f8:1c1c:b490::2; envelope-from=hendrik.tews@kernkonzept.com; helo=mx.kernkonzept.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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:234310 Archived-At: Hi, evaluating (let ((test-var nil)) (eval '(defvar test-var t "XXX"))) works fine in emacs 27 but fails in 28.1 with "Defining as dynamic an already lexical var", similarly for defcustom instead of defvar. The elisp manual 28.1 says in 12.5 Defining Global Variables: If SYMBOL is already lexically bound (e.g., if the =E2=80=98defvar=E2= =80=99 form occurs in a =E2=80=98let=E2=80=99 form with lexical binding enabled), = then =E2=80=98defvar=E2=80=99 sets the dynamic value. >From this I would conclude that the error is a bug. Or did I overlook something in the documentation? (I noticed this problem because of failing tests for Proof General with emacs 28, see https://github.com/ProofGeneral/PG/issues/657. There, inside a let binding a Coq file is opened, which causes the Coq instance of Proof General to be loaded, which somewhere contained a defcustom for the variable that was bound with let.) Best regards, Hendrik Tews