From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64272: 28.1; lisp_file_lexically_bound_p behavior mismatches file local variables Date: Sat, 24 Jun 2023 21:52:31 +0300 Message-ID: <83zg4oy9ow.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18238"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64272@debbugs.gnu.org To: LdBeth , Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 24 20:53:30 2023 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 1qD8O2-0004YW-D1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 24 Jun 2023 20:53:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qD8Nb-0001cC-V6; Sat, 24 Jun 2023 14:53:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qD8Nb-0001by-07 for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2023 14:53:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qD8Na-0000t0-Nh for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2023 14:53:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qD8Na-00029J-3v for bug-gnu-emacs@gnu.org; Sat, 24 Jun 2023 14:53:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 24 Jun 2023 18:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64272 X-GNU-PR-Package: emacs Original-Received: via spool by 64272-submit@debbugs.gnu.org id=B64272.16876327548225 (code B ref 64272); Sat, 24 Jun 2023 18:53:02 +0000 Original-Received: (at 64272) by debbugs.gnu.org; 24 Jun 2023 18:52:34 +0000 Original-Received: from localhost ([127.0.0.1]:41513 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qD8N7-00028b-Vo for submit@debbugs.gnu.org; Sat, 24 Jun 2023 14:52:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37150) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qD8N4-00028K-9Z for 64272@debbugs.gnu.org; Sat, 24 Jun 2023 14:52:32 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qD8Mq-0000hq-Lk; Sat, 24 Jun 2023 14:52:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Ns0ZBSKLwhyJ6+8LzIW3ueCosvfjr9ioSrP5xEp+RQk=; b=HZsLZHH84p4e poawvlc4CJ5z5RsOAcBUCyPLKdzRFE7t8XO56W+ltif3y0btUtnPPbAYCQtBAEA/arIRbxD+fz9+g CsKtVoAmxioy2NmHN5ufZBTPQXU6ZMgHOcpQPRpUDjGGEy1e9uu/1G5TQfrLThb49L1c5/XgGeR47 7/yycFNll7/HW8CziQ70xy8lAzZxYsxC0pN4TwEvhSGVY4Ueu5TW4V53Wy9upBnm9d11WtB764j+i SoyyWhKyBhzo+NCIvIKS0yBEiiTGCufsyeZ6/xps9V2jWaU5kDLT8EPZLtomITiRbRHk+qcJ0eDue /WqDiPh0QeEsJ1dzIsRlfA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qD8Mq-0005jM-60; Sat, 24 Jun 2023 14:52:16 -0400 In-Reply-To: (message from LdBeth on Sat, 24 Jun 2023 13:22:38 -0500) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264011 Archived-At: > Date: Sat, 24 Jun 2023 13:22:38 -0500 > From: LdBeth > > > Basically, if an emacs lisp source file starts with some whitespace > > | ;; -*- lexical-binding: t -*- > |(let ((x 1)) (setq foo (lambda () x))) > |(funcall foo) > > rather than > > |;; -*- lexical-binding: t -*- > |(let ((x 1)) (setq foo (lambda () x))) > |(funcall foo) > > that will cause `load' eval the file with `lexical-binding' set to nil, > and would report `x' is a void variable. > > This behavior is in contrast to how file local variables are applied > when opening a file, that is, as long as the variable list is in > the first line, it is applied. > > Either the documentation should bring up this behavior, or the > C function `lisp_file_lexically_bound_p' in `src/lread.c' should be fixed. I think we should do the latter, because hack-local-variables-prop-line is more lenient than lisp_file_lexically_bound_p. Stefan, any comments?