From: Vitalie Spinu <spinuvit@gmail.com>
To: 46912@debbugs.gnu.org
Subject: bug#46912: 28.0.50; Byte compiled defvar with lexical binding throws (void-variable foo)
Date: Thu, 4 Mar 2021 01:14:50 +0100 [thread overview]
Message-ID: <CAAQMm-85X7hMaYoce-Hw84AL957pQPhi1zZMme2xLrE2CEqmag@mail.gmail.com> (raw)
Hello,
Compiling the following file:
;;; -*- lexical-binding: t -*-
(let ((foo t))
(defvar tmp-bar (if foo 0 1 -1)))
gives:
tmp.el:4:23: Warning: reference to free variable ‘foo’
When loading the .elc file the error
Debugger entered--Lisp error: (void-variable foo)
byte-code("\301\10\203\11\0\302\202\n\0\303!\207" [foo (lambda
(def-tmp-var) (defvar tmp-bar def-tmp-var)) 0 -1] 2)
load(".../tmp.elc" nil nil t)
No problems with emacs-27 branch.
Vitalie
In GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
3.22.30, cairo version 1.15.10)
of 2021-03-03 built on NB277
Repository revision: a350ae058caedcb7be7d332564817954e3624e60
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.11906000
System Description: Ubuntu 18.04.5 LTS
next reply other threads:[~2021-03-04 0:14 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-04 0:14 Vitalie Spinu [this message]
2021-03-04 18:03 ` bug#46912: 28.0.50; Byte compiled defvar with lexical binding throws (void-variable foo) Joseph Mingrone
2021-03-04 20:09 ` Lars Ingebrigtsen
2021-03-04 20:17 ` Joseph Mingrone
2021-03-04 20:48 ` Lars Ingebrigtsen
2021-03-04 21:08 ` Pip Cet
2021-03-04 23:15 ` Joseph Mingrone
2021-03-05 2:52 ` Pip Cet
2021-03-05 3:22 ` Joseph Mingrone
2021-03-05 8:27 ` Vitalie Spinu
2021-03-05 9:10 ` Mattias Engdegård
2021-03-05 9:56 ` Pip Cet
2021-03-04 20:21 ` Pip Cet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAAQMm-85X7hMaYoce-Hw84AL957pQPhi1zZMme2xLrE2CEqmag@mail.gmail.com \
--to=spinuvit@gmail.com \
--cc=46912@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).