bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48176: 28.0.50; loadup.el leaves some variables in the lexical envir


From: Lars Ingebrigtsen
Subject: bug#48176: 28.0.50; loadup.el leaves some variables in the lexical environment
Date: Mon, 03 May 2021 10:09:00 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Philipp Stephani <p.stephani2@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]