Subject: bug#78637: 30.1.90; Calling setopt during init loads cus-start over and over

From: Stefan Monnier <[email-masked]>
Date: Thu, 26 Jun 2025 13:02:57 -0400

>> These changes prevented standard variables from being initialized on
>> Android, which was detected by my automated testing system and which
>> I've attempted to address specifically for that system, but I get the
>> impression that Stefan's solution also produces the very same issues
>> on configurations --with-dumping=none.  Hence the correct solution
>> lies elsewhere.

Hmm... I think `--with-dumping=none` wouldn't be affected.

> I should also clarify that Android builds are dumped with `dump-mode'
> set to nil, during the first startup after initialization, because the
> session where the dumping is conducted subsequently becomes an ordinary
> user session.  (As this is the only opportunity for dumping on Android,
> where no facilities exist for running code during package installation
> or at build time, as Emacs is cross-compiled into a shared object.)

IIUC on Android, the first time the users run their Emacs, you run
a special session started from `temacs` with `dump-mode=nil` but where
you do perform a dump at the end of `loadup` and then continue on to
a normal GUI startup?

In that case, I'd expect that this first GUI session works correctly
(w.r.t `custom-reevaluate-setting`), but indeed the subsequent runs
(which presumably make use of the generated pdmp file) will fail to
reevaluate the settings.

Is that what you saw?

        Stefan