GNU bug report logs - #67321
29.1.90; Different parsing rules for -*- lexical-binding:t; -*- in different circumstances

Previous Next

Package: emacs;

Reported by: Sebastian Miele <iota <at> whxvd.name>

Date: Tue, 21 Nov 2023 08:44:01 UTC

Severity: normal

Tags: confirmed

Merged with 64272

Found in versions 28.1, 29.1.90

Full log


Message #14 received at 67321 <at> debbugs.gnu.org (full text, mbox):

From: Sebastian Miele <iota <at> whxvd.name>
To: Andreas Schwab <schwab <at> suse.de>
Cc: 67321 <at> debbugs.gnu.org
Subject: Re: bug#67321: 29.1.90; Different parsing rules for -*-
 lexical-binding:t; -*- in different circumstances
Date: Tue, 21 Nov 2023 12:07:59 +0100
> From: Andreas Schwab <schwab <at> suse.de>
> Date: Tue, 2023-11-21 11:06 +0100
>
> There are no different parsing rules.  emacs --script just doesn't pay
> attention to file local variables.

That cannot be true.  Running

  #!/path/to/emacs --script
  ;; -*- lexical-binding: t; mode: emacs-lisp; -*-
  (defmacro lexical-binding-p ()
    '(let* ((x t)
            (f (lambda () x))
            (x nil))
       (funcall f)))
  (message "%s %s" lexical-binding (lexical-binding-p))

as a script outputs "t t".  When I change the "lexical-binding: t" into
"lexical-binding: nil", the output is "nil nil".  So that special
file-local variable does receive some handling by emacs --script.




This bug report was last modified 1 year and 156 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.