Subject: Re: master ab20f38: Fix `custom-delayed-init-variables' problem when re-dumping emacs

From: Stefan Monnier <[email-masked]>
Date: Tue, 18 May 2021 10:48:16 -0400

>     * lisp/startup.el (command-line): Don't bug out on redumping Emacs
>     (bug#48492).
[...]
> @@ -1197,11 +1197,11 @@ please check its value")
>  
>    ;; Re-evaluate predefined variables whose initial value depends on
>    ;; the runtime context.
> -  (setq custom-delayed-init-variables
> -        ;; Initialize them in the same order they were loaded, in case there
> -        ;; are dependencies between them.
> -        (nreverse custom-delayed-init-variables))
> -  (mapc #'custom-reevaluate-setting custom-delayed-init-variables)
> +  (when (listp custom-delayed-init-variables)
> +    (mapc #'custom-reevaluate-setting
> +          ;; Initialize them in the same order they were loaded, in
> +          ;; case there are dependencies between them.
> +          (reverse custom-delayed-init-variables)))
>    (setq custom-delayed-init-variables t)
>  
>    ;; Warn for invalid user name.

While this is a good short term fix, I think what we would ideally want
instead is that those settings be re-evaluated yet-again when we start
the re-dumped Emacs.

So maybe instead of setting the var to t, we should use another var to
denote that we've already init'd those vars (and re-set that other var
some time when we redump).

        Stefan