GNU bug report logs -
#48176
28.0.50; loadup.el leaves some variables in the lexical environment
Previous Next
Reported by: Philipp Stephani <p.stephani2 <at> gmail.com>
Date: Sun, 2 May 2021 21:45:02 UTC
Severity: normal
Found in version 28.0.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Philipp Stephani <p.stephani2 <at> gmail.com> writes:
> After starting Emacs, some spurious variables like `output' or `success'
> are bound. It looks like they come from loadup.el.
Oh, interesting. So it's these that are in the lexical environment when
we're dumping:
(let ((output (cond ((equal dump-mode "pdump") "emacs.pdmp")
[...]
(let (success)
(unwind-protect
(let ((tmp-dump-mode dump-mode)
(dump-mode nil))
(if (member tmp-dump-mode '("pdump" "pbootstrap"))
(dump-emacs-portable (expand-file-name output invocation-directory))
(dump-emacs output "temacs")
I guess we could rename the variables to something with a private
prefix, but that's kinda hacky. Do we have a way to remove some symbols
from the lexical environment? I.e., extend `dump-emacs-portable' to
take a list of symbols to remove from the dumped lexical environment?
Or... should the dumper just set the variable to (t)? (I'm not very
familiar with the internals of how that's supposed to work...)
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 2 years and 327 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.